alexdobin / STAR

RNA-seq aligner
MIT License
1.86k stars 506 forks source link

error reading STAR bam file with samtools collate #1054

Open JennyFrodoBrynnNick opened 4 years ago

JennyFrodoBrynnNick commented 4 years ago

Hi, I generated bam files by aligning to the genome and outputting the alignments in transcriptome coordinates by setting --quantMode TranscriptomeSAM in STAR. Then I tried to randomize the bam files (as required for salmon) by using samtools collate. I have used collate in the past without any problems on bam files generated by alignment to the genome. But now, when I try to run collate on the bam files generated with --quantMode TranscriptomeSAM, I get error messages that look like this: [E::bam_read1] CIGAR and query sequence lengths differ for A00257:310:HYL2GDSXX:1:1312:3115:21449 Error reading input file. Does someone know why this happens? Thanks, Ina

alexdobin commented 4 years ago

Hi Ina,

not sure what's going on there, could you extract the problematic read and post the SAM lines?

Cheers Alex