But is it possible to filter with allele count? I want to filter out all the sites having >3 het or want to include only sites with >2 homozygous alleles. Thanks,
How to calculate frequency of heterozygous SNPs in multisample VCF file and to filter out over a specific range?
Hi, I've a multi-sample vcf file of a highly heterozygous plant species. I could calculate the individual-wise heterozygosity using -het option in vcftools. But I also want to know the frequency of heterozygous SNPs in my data. And then to filter out some SNPs where the frequency of heterozygous allele is > 50% and in another filter I want to keep only those SNPs where minor homozygous allele count is >3. Is it possible with vcftools or bcftools? Thanks,
• 2,467 views
•
link
1 answer
Not 100% sure what you need, but try something like this (not tested)
bcftools stats -i"GT='het'" in.bcf
• 0 views
•
link
• 0 views
•
link
Log in to answer this question.