Entering edit mode
5.5 years ago
jaqx008
▴
110
Hello all,
I encountered an error while trying to make index for a bam file. How do I correct it? by the way, my bam was generated from sam after mapping with bowtied2. Thanks
samtools index file.bam
[E::hts_idx_push] NO_COOR reads not in a single block at the end 38 -1
samtools index: failed to create index for "file.bam"
validate your bam file.
what is the output of
samtools view -c file.bam
?if there is an error, it doesn't come from
index
but from your upstream workflow.Thanks for your response, the problem was I did not sort the bam. I sorted it now and I dont get the error anymore. Thank you