Adding allele frequency to the genotype field of a VCF file
1
0
Entering edit mode
8.0 years ago
Nonny27 • 0

I'm wondering if there is an way to get the allele frequency (AF1) from the INFO field VCF file into the genotype field instead (or as well), that way when I merge these files into a multi-sample VCF I can still easily access this information.

I have managed to isolate the allele frequency values from the INFO column using a sed command based on the flanking strings:

sed -e 's/.*;AF1=\(.*\);AN.*/\1/' file.vcf > output.txt

However, I can't work out how to append this to the genotype field. ie. GT:GQ:PL:AF1

Any help would be greatly appreciated!

sequencing SNP next-gen • 2.7k views
ADD COMMENT
0
Entering edit mode
7.9 years ago

VCFFIXUP in vcflib should do what you want.

https://github.com/vcflib/vcflib

ADD COMMENT

Login before adding your answer.

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