This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Example of simple repository using htslib API to read in .bcf

I am looking to implement the htslib API in some software to more efficiently read in .bcf/.vcf files. I am aware most of the info is in the vcf.h header. However, I am finding it a bit of a struggle to figure out what's going on without any help.

I was wondering if anyone could point me towards a piece of sofrware / repo where someone has implemented the API to read in a bcf so that I could learn from it. There are a few like shapeit4 and eagle2 - but they are a bit complex with a few different headers going on. Ideally, the repo would be something quite simple which doesn't rely on lots of complex header files and outside libraries.

Thanks for your help.

htslib

1 answer

here is a simple example printing the variants where POS%10==0

this is perfect thank you

Log in to answer this question.