LeftAlignIndels error
0
0
Entering edit mode
7 weeks ago
mailard • 0

Hello!

I input sorted and indexing bam file to LeftAlignIndels: ~/Soft/gatk-4.1.9.0/gatk LeftAlignIndels -I bam_fin/Exome_dups.bam -R /mnt/lapd/Index_hum/dna2/GRCh_2021.fa -O bam_fin/Exome.bam

And have this error:

'java.lang.IllegalArgumentException: Alignments added out of order in SAMFileWriterImpl.addAlignment for file:///mnt/lapd/Vika_data/RNF_raw/exome/bam_fin/Exome.bam. Sort order is coordinate. Offending records are at [1:152985370] and [1:152985347] at htsjdk.samtools.SAMFileWriterImpl.assertPresorted(SAMFileWriterImpl.java:197) at htsjdk.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:184) at htsjdk.samtools.AsyncSAMFileWriter.synchronouslyWrite(AsyncSAMFileWriter.java:36) at htsjdk.samtools.AsyncSAMFileWriter.synchronouslyWrite(AsyncSAMFileWriter.java:16) at htsjdk.samtools.util.AbstractAsyncWriter$WriterRunnable.run(AbstractAsyncWriter.java:123) at java.base/java.lang.Thread.run(Thread.java:829)'

I want to note that the unsorted file is the output bam.

I appreciate your help!

With best regards, Viktoriia

picard • 328 views
ADD COMMENT
0
Entering edit mode

is Exome_dups.bam sorted and indexed ? what's the output of picard ValidateSamFile with Exome_dups.bam ?

ADD REPLY
0
Entering edit mode

Yes, the file was sorted and indexed.

ValidateSamFile output
 `INFO  2021-11-26 12:06:52 SamFileValidator    Seen many non-increasing record positions. Printing Read-names as well.
INFO    2021-11-26 12:07:42 SamFileValidator    Validated Read    10,000,000 records.  Elapsed time: 00:00:50s.  Time for last 10,000,000:   50s.  Last read position: 16:2,971,202.  Last read name: A00175:147:H3MH3DMXY:1:1231:26973:34992
INFO    2021-11-26 12:08:31 SamFileValidator    Validated Read    20,000,000 records.  Elapsed time: 00:01:38s.  Time for last 10,000,000:   48s.  Last read position: 19:50,278,169.  Last read name: A00175:147:H3MH3DMXY:1:1361:12617:29418
INFO    2021-11-26 12:09:19 SamFileValidator    Validated Read    30,000,000 records.  Elapsed time: 00:02:27s.  Time for last 10,000,000:   48s.  Last read position: 16:31,473,305.  Last read name: A00175:147:H3MH3DMXY:1:2105:11812:14340
INFO    2021-11-26 12:10:08 SamFileValidator    Validated Read    40,000,000 records.  Elapsed time: 00:03:15s.  Time for last 10,000,000:   48s.  Last read position: 10:122,618,152.  Last read name: A00175:147:H3MH3DMXY:1:2256:16034:20588
INFO    2021-11-26 12:10:57 SamFileValidator    Validated Read    50,000,000 records.  Elapsed time: 00:04:04s.  Time for last 10,000,000:   49s.  Last read position: 5:105,805,689.  Last read name: A00175:147:H3MH3DMXY:1:2418:8214:16626
INFO    2021-11-26 12:11:45 SamFileValidator    Validated Read    60,000,000 records.  Elapsed time: 00:04:53s.  Time for last 10,000,000:   48s.  Last read position: 18:48,921,880.  Last read name: A00175:147:H3MH3DMXY:2:1164:6605:22326
INFO    2021-11-26 12:12:34 SamFileValidator    Validated Read    70,000,000 records.  Elapsed time: 00:05:41s.  Time for last 10,000,000:   48s.  Last read position: 3:30,039,304.  Last read name: A00175:147:H3MH3DMXY:2:1307:23104:14920
INFO    2021-11-26 12:13:22 SamFileValidator    Validated Read    80,000,000 records.  Elapsed time: 00:06:30s.  Time for last 10,000,000:   48s.  Last read position: 16:21,419,589.  Last read name: A00175:147:H3MH3DMXY:2:1438:20717:23281
INFO    2021-11-26 12:14:11 SamFileValidator    Validated Read    90,000,000 records.  Elapsed time: 00:07:18s.  Time for last 10,000,000:   48s.  Last read position: 20:63,555,689.  Last read name: A00175:147:H3MH3DMXY:2:2181:19497:15468
INFO    2021-11-26 12:14:59 SamFileValidator    Validated Read   100,000,000 records.  Elapsed time: 00:08:07s.  Time for last 10,000,000:   48s.  Last read position: 3:187,229,812.  Last read name: A00175:147:H3MH3DMXY:2:2341:1994:27461
HISTOGRAM   java.lang.String
Error Type  Count
ERROR:INVALID_INDEX_FILE_POINTER    1
ERROR:MISMATCH_FLAG_MATE_NEG_STRAND 842976
[Fri Nov 26 12:15:47 UTC 2021] picard.sam.ValidateSamFile done. Elapsed time: 8.92 minutes.
Runtime.totalMemory()=2587885568
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp`
ADD REPLY
0
Entering edit mode
INVALID_INDEX_FILE_POINTER

you should try to re-sort and/or re-index your file.

ADD REPLY
0
Entering edit mode

your bam is not sorted. you got Last read position: 16:2,971,202 and then Last read position: 19:50,278,169 and then chr16 again 16:31,473,305 ...

ADD REPLY

Login before adding your answer.

Traffic: 2816 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6