Hello everyone. I've scourged the internet and this forum in particular and I have not been able to get past this problem. Ultimately, I want to be able to use Picard's Mark Dups.
I have paired-end reads aligned to the human genome using GSnap. From previous experience, I already know that to use MarkDups I had to go through all of the pre-processing just to get the bam file up to Picard's standards. And so, I used FastQtoSam to make an unaligned bam file (queryname sorted). I then went to merge this unaligned file with my original GSnap output. I get this error:
Exception in thread "main" java.lang.IllegalStateException: Aligned record iterator (HWI-ST970:586:C2PY6ACXX:1:1115:10000:27368) is behind t
he unmapped reads (HWI-ST970:586:C2PY6ACXX:1:1115:10000:3435)
at net.sf.picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:332)
at net.sf.picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:156)
at net.sf.picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:236)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:177)
at net.sf.picard.sam.MergeBamAlignment.main(MergeBamAlignment.java:205)
I even tried merging my unaligned bam file with a sorted version of my aligned bam file (I tried both using coordinate sorted and queryname). In each try I get the same exact error. I am using the latest version of Picard and I can find nothing else on the internet that has solved my problem. Thanks in advance for any suggestions.
I have paired-end reads aligned to the human genome using GSnap. From previous experience, I already know that to use MarkDups I had to go through all of the pre-processing just to get the bam file up to Picard's standards. And so, I used FastQtoSam to make an unaligned bam file (queryname sorted). I then went to merge this unaligned file with my original GSnap output. I get this error:
Exception in thread "main" java.lang.IllegalStateException: Aligned record iterator (HWI-ST970:586:C2PY6ACXX:1:1115:10000:27368) is behind t
he unmapped reads (HWI-ST970:586:C2PY6ACXX:1:1115:10000:3435)
at net.sf.picard.sam.AbstractAlignmentMerger.mergeAlignment(AbstractAlignmentMerger.java:332)
at net.sf.picard.sam.SamAlignmentMerger.mergeAlignment(SamAlignmentMerger.java:156)
at net.sf.picard.sam.MergeBamAlignment.doWork(MergeBamAlignment.java:236)
at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:177)
at net.sf.picard.sam.MergeBamAlignment.main(MergeBamAlignment.java:205)
I even tried merging my unaligned bam file with a sorted version of my aligned bam file (I tried both using coordinate sorted and queryname). In each try I get the same exact error. I am using the latest version of Picard and I can find nothing else on the internet that has solved my problem. Thanks in advance for any suggestions.
Comment