Some BAM output files (sample.transcript.bam) are sorted whereas others aren't, so it causes an issue if samtools index is used immediately after running RSEM.
[E::hts_idx_push] unsorted positions
One third of the BAM files in the dataset I'm working with don't raise such an error, which is strange. They have not been sorted by me. Could RSEM output be made consistent, ideally always sorted?
@DarioS , All 'sample.transcript.bam' should not be sorted. By default, RSEM will not sort bam files. If you want RSEM sort bam files, you can turn on the '--sort-bam-by-coordinate' option.
Some BAM output files (
sample.transcript.bam
) are sorted whereas others aren't, so it causes an issue ifsamtools index
is used immediately after running RSEM.One third of the BAM files in the dataset I'm working with don't raise such an error, which is strange. They have not been sorted by me. Could RSEM output be made consistent, ideally always sorted?