How to calculate frequency of heterozygous SNPs in multisample VCF file and to filter out over a specific range?
1
0
Entering edit mode
3.0 years ago
kumar.vinod81 ▴ 330

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,

bcftools vcftools • 1.7k views
ADD COMMENT
0
Entering edit mode
3.0 years ago
4galaxy77 2.8k

Not 100% sure what you need, but try something like this (not tested)

bcftools stats -i"GT='het'" in.bcf
ADD COMMENT
0
Entering edit mode

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,

ADD REPLY

Login before adding your answer.

Traffic: 2806 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6