I don't think you can't do that using vcffilter
'GT=1|1' >= 0.05
Hi all
Is it possible to use vcftools to filter vcf files based on % of heterozygosity ?!
best
M
I don't think you can't do that using vcffilter
'GT=1|1' >= 0.05
If you're looking to do something like that you'll need to use a tool that already calculated the number of heterozygotes in your multi-sample VCF, write a wrapper script around another tool, or use the vcftools Perl API. I had assumed you already had your % heterozygosity calculated using an annotation tool and had it in your VCF in the INFO field. Otherwise you need to calculate this before you can filter on it.
Log in to answer this question.