Closed alexpenson closed 7 years ago
Hmm. This error is thrown by the SAMtools java utilities. Basically, your BAM file is malformed and does not adhere to the current SAM specification (v1.4).
My bet would be either (1) it was created a long time ago, and adheres to an older (looser) specification, or (2) it's been run through a conversion utility that is designed to conform to an older (looser) specification.
It looks like it has to do with half-mapped read-pairs (read-pairs where one read is mapped, and the other is not). You might want to just filter out these reads using samtools.
samtools view -b -F 4 -F 8 myBamFile.bam > filteredBam.bam
Or you can pipe this directly into QoRTs using linux pipes:
samtools view -b -F 4 -F 8 myBamFile.bam | java -jar QoRTs.jar QC [...qorts options...] - gtffile.gtf outputDir
Try this out and let me know. Depending on your version of samtools this might not work either, since samtools might also crash when it finds the bad read.
It works for me. Thanks a lot!
Running on a STAR alignment from TCGA (
TCGA-2J-AAB6-01A-11R-A41B-07
) I get the following error:The offending read looks like this:
Let me know if you have any suggestions Thanks Alex