Remove sites with heterozygote excess with VCFtools
1
0
Entering edit mode
2.9 years ago

I am trying to filter out SNPs with heterozygote excess p-value less than 0.05 using VCFtools, but I can't find a command that allows me to do this. I have tried doing that using the --hwe command, but this seems to do the filtering based on the HWE p-value, removing more than I actually need do. On the other hand, the --hardy command creates a .hwe file, where I can check manually the problematic sites, but still I don't get how I can remove them from the original .vcf file. Any ideas/suggestions on how to proceed?

SNPs genomics VCFTools hetexcess • 1.8k views
ADD COMMENT
1
Entering edit mode
2.9 years ago
ucbtsm8 ▴ 20

vcftools is depcrecated - don't use it anymore

bcftools +fill-tags in.bcf -Ou -- -t all | bcftools view -e'HWE<=0.05' > out.bcf
ADD COMMENT
0
Entering edit mode

Worked like a charm. Cheers!

ADD REPLY

Login before adding your answer.

Traffic: 2518 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