This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Looking For A Vcf/Bcf C++ Library

I am looking for a liberally licensed C++ library that can parse both VCF and BCF. I like vcflib, but it does not handle BCF. Suggestions?

vcf

2 answers

Try Heng's https://github.com/samtools/htslib

If you can work in the SAM or BAM formats you can do a lot with the samtools header files.

http://samtools.sourceforge.net/samtools/masterTOC.shtml

On the same topic Bamtools also offers an API

https://github.com/pezmaster31/bamtools

Do you need to process the BCF?

Unfortunately, I can only be assured of having VCF/BCF files, and not necessarily the original aligned BAMs. I am working on a variant annotator, and I would like for it to able to take either VCF or BCF as input, and produce the same for output.

Log in to answer this question.