Entering edit mode
10.5 years ago
Alex Reynolds
36k
I have an indexed BAM file foo.bam
and its index foo.bam.bai
. When I run samtools idxstats
to get information about the index, I get the following error:
$ samtools idxstats foo.bam
[bam_idxstats] fail to load the index.
Both foo.bam
and its index file are in the same directory. Is there anything I'm missing about this command?
Here is the version of samtools I am running:
Program: samtools (Tools for alignments in the SAM format)
Version: 0.2.0-rc8-60-g2455fd2-dirty (using htslib 0.2.0-rc8-20-g34082df)
No, you are not missing anything in the command. Needless to ask but have you tried recreating the "index" file and running
idxstats
again.No, I don't own the directory these files are located in. I can make a copy to test locally but it will take time. Are there issues accessing indexed BAM files with a newer version of
samtools
, when it is almost certain the index was generated with an older tool?Perhaps there is a bug with this version of
samtools
?Yeah, you'll want to use the version on sourceforge still.
Thanks, that's what I'll do.