iqbal-lab-org / varifier

Variant call verification
MIT License
15 stars 3 forks source link

Add ability to read BCF #14

Open mbhall88 opened 4 years ago

mbhall88 commented 4 years ago

As varifier uses pyfastaq to parse VCF it is unable to parse BCF format.

I know this is probably a big-ish change but I would suggest switching to using an API such as cyvcf2. This way the user doesn't have to convert all of their BCF files to VCF in order to use varifier. Additionally, cyvcf2 will likely give a decent speedup.

mbhall88 commented 4 years ago

As a temporary workaround, you can convert with bcftools and pipe into stdin of varifier

bcftools view -O v test.bcf \
| varifier vcf_eval truth.fasta ref.fasta - out_dir
martinghunt commented 4 years ago

changing to cyvcf2 is a bigger change than I want to spend time doing. We could just have an open VCF function that pipes through bcftools if the file name ends with .bcf.