This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools " Assertion `iter->curr_off == iter->off[iter->i].v' failed". "

Hi, I meet a problem when I run samtools. The error message is

 "bam_index.c:695: bam_iter_read: Assertion `iter->curr_off == iter->off[iter->i].v' failed".

I would like to ask how the question happened and how to resolve it. Thank you !

samtools

is your bam sorted ? is your bai file up-to-date ?

Please provide the exact command your were using.

Also what version of samtools do you have?

2 answers

That error message indicates that you are using samtools 0.1.19. This was released almost six years ago, and still using it is a problem in itself…

Thank you very much ! The problem has been solved. I edit the bam header and then the command can run.

Could you please provide more information about what was the problem with your header and how you have fixed it.

Doing this, you can help other people facing the same problem to solve it.

Thanks!

fin swimmer

Log in to answer this question.