adding allele frequencies to a vcf
1
0
Entering edit mode
3 months ago
eric.londin ▴ 50

Hi all, I have a vcf file generated from a few hundred samples. For each variant within the file, I would like to calculate the allele frequency of each allele and then add that information as a field into the 'INFO' field of the file. I know that I can use vcftools to generate the allele frequencies, but I'm at a bit of a loss as to how I can add that back into the INFO section of the vcf. Alternatively, is there an annotation tool (such as SnpSift, VEP, or some other) that can calculate and do this. If not, I would be left to creating my own script to do it, which I would prefer to avoid. Thanks for any help

allele vcf maf frequencies • 252 views
3
Entering edit mode
3 months ago
4galaxy77 ★ 1.3k

Try this

bcftools +fill-tags in.bcf -Ob -o out.bcf -- -t all

0
Entering edit mode

Thanks. that works. I was unaware of that option in bcftools!