Skip to content
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

Skip the warnings? #303

Open
AugustinMro opened this issue Apr 10, 2024 · 2 comments
Open

Skip the warnings? #303

AugustinMro opened this issue Apr 10, 2024 · 2 comments

Comments

@AugustinMro
Copy link

Working on large data and using the cyvcf2 module in python3, I got tons of warnings
[W::vcf_parse] Contig 'chr[X]' is not defined in the header. (Quick workaround: index the file with tabix.)
It would be great if these warnings could be silenced, or if they used Python's warning handling system. As it is, I haven't figured out how to easily shut them up. Would that be possible?

Thanks for your help and for the module anyway.

@brentp
Copy link
Owner

brentp commented Apr 10, 2024

hi, these messages come directly from htslib.
I'd accept a PR that allowed setting the hts_log_level with an environment variable.
meanwhile, you can index the file to stop these warnings.

@AugustinMro
Copy link
Author

Thank you for the quick reply.
Indexing the files does indeed work, I'm going to do that.
Have a good day !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants