New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"[E::idx_find_and_load] Could not retrieve index file" when AlignmentFile #939
Comments
Hi. I am also experiencing this issue. I can confirm that I indeed don't have an index file, but this is the expected operation for my program. Is there a way to suppress this warning message or explicitly indicate an index file is not expected? |
Use samtools index command to build a index file can solve this problem. |
I am seeing the same issue with the with |
This is a diagnostic that is new (in these circumstances) in HTSlib 1.10. In the context in which pysam is calling it it is just a warning and can be ignored — the It could be suppressed by using |
@jmarshall This is preventing us from updating pysam in our production code, so I am willing to invest a little bit of time investigating fixes. Is there a tl;dr for building pysam locally so I can try building with different htslibs? (UPDATE: never mind, I think I'm running now...) |
FWIW (following @jmarshall's suggestion):
I was hoping there was an easy way to handle the library versions with ifdefs, but I don't see a way to make that work with Cython extensions. |
Yes, that's pretty much the patch I had in mind, and I was hoping the same thing. It can also be worked around by explicitly suppressing HTSlib's messages for the duration: save = pysam.set_verbosity(0)
aln = pysam.AlignmentFile("test.bam", "rb")
pysam.set_verbosity(save) and I suppose If this HTSlib diagnostic output behaviour change has caused you difficulty in updating your production code, you should raise the issue with samtools/htslib. |
Thanks, we can live with the Python workaround for now. |
…velopers/pysam#939) causing the logfile not to be detected by the multiqc-blr stats module.
Can be reverted once pysam-developers/pysam#939 is fixed
…ostic message in unindexed stream (pysam-developers/pysam#939)
[E::idx_find_and_load] Could not retrieve index file for 'test.bam'
Got this error when I do
aln = pysam.AlignmentFile("test.bam", "rb")
in pysam version 0.16.0.1 but not in version 0.15.3.However, I think it might not affect the output. But please advise. Thanks
The text was updated successfully, but these errors were encountered: