Exception in thread "main" java.lang.IllegalArgumentException: Alignments added out of order in SAMFileWriterImpl.addAlignment
REQUIRED for all errors and issues:
a) GATK version used:
b) Exact command used:
c) Entire program log:
My GATK version used is gatk/4.2.6.1
I used the command:
java -XX:ParallelGCThreads=2 -jar $picard AddOrReplaceReadGroups -I 701.f.bam -O 701.rmdup.groups.bam -RGID 701 -RGLB gatc_kit -RGPL ILLUMINA -RGSM 701 -RGPU xxx -SORT_ORDER coordinate
But I got the error:
Exception in thread "main" java.lang.IllegalArgumentException: Alignments added out of order in SAMFileWriterImpl.addAlignment for file:///project/qcb_640/yliu4093/SRA/fastq_701/701.rmdup.groups.bam. Sort order is coordinate. Offending records are at [9:138334554] and [10:10886] at htsjdk.samtools.SAMFileWriterImpl.assertPresorted(SAMFileWriterImpl.java:197) at htsjdk.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:184) at picard.sam.AddOrReplaceReadGroups.doWork(AddOrReplaceReadGroups.java:185) at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:308) at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103) at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113) [W::bam_hdr_read] EOF marker is absent. The input is probably truncated [E::bgzf_read] Read block operation failed with error 4 after 63 of 184 bytes samtools index: failed to create index for "701.rmdup.groups.bam": No such file or directory
I have checked with my bam file and it has already been sorted by coordinate. Therefore I have no idea why this error still occurred.
-
Hi Chloe Liu
Can you post the header of your original input file? Also can you try running this using the latest GATK 4.4.0.0 or Picard 3.10?
Regards.
Please sign in to leave a comment.
1 comment