-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat: Add rust_htslib::bcf::index::build #408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test case?
Sure! I added some basic tests for successful construction from bcf + vcf.gz, as well as assert errors on building the wrong index format. It would be convenient if it automatically chose 14 for a min shift for CSI files, or if we autodetected the index type to build, but I'm not sure it would make sense for the library. I'm happy to if you think it's worth it. Thanks for building such a great resource! |
Sure, feel free to extend the functionality in that direction in a follow-up PR! And thanks for liking rust-htslib! |
Pull Request Test Coverage Report for Build 7822478621Details
💛 - Coveralls |
May I ask you to update to merge in the latest upstream master branch? It contains fixes for the failing tests. |
Done - and thanks for figuring that out. Hope this fixes the tests! 🤞 |
Builds a bcf/vcf index using the htslib bindings. It was useful to us, so I'm happy to share.
It's modeled after the equivalent in
rust_htslib::bam::index
. I've used it myself to verify behavior, but I haven't built any doc or unit tests.Hope it's helpful!
Best,
Daniel