Question: VCF file with AF(allele frequency)
gravatar for Parimala Devi
3.8 years ago by
India/Bangalore/Jubilant Biosys
Parimala Devi70 wrote:


I need to analyse SNPs based on Allele frequency(AF) and not the AF1. The vcf file I obtained by using samtools excludes the INFO for AC. 

##FORMAT=<ID=DV,Number=1,Type=Integer,Description="# high-quality non-reference bases">
##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  A.sorted.bam
Y55.chr10       5       .       N       C       24.0    .       DP=15;VDB=8.264144e-07;AF1=1;AC1=2;DP4=0,0,15,0;MQ=12;FQ=-72    GT:PL:GQ        1/1:57,45,0:66
Y55.chr10       6       .       N       C       23.0    .       DP=16;VDB=6.101920e-07;AF1=1;AC1=2;DP4=0,0,16,0;MQ=11;FQ=-75    GT:PL:GQ        1/1:56,48,0:68
Y55.chr10       7       .       N       A       22.0    .       DP=16;VDB=6.101920e-07;AF1=1;AC1=2;DP4=0,0,16,0;MQ=11;FQ=-72    GT:PL:GQ        1/1:55,45,0:64

Is there any way I can obtain the allele frequency in my vcf? Any other variant calling tool that would provide me with the AF?

Thank you,


snp samtools allele frequency vcf • 9.0k views
ADD COMMENTlink modified 24 months ago by gsr9999110 • written 3.8 years ago by Parimala Devi70

Estimating AF from DP4 in a VCF file

you should go

ADD REPLYlink written 20 months ago by Anop Singh Ranawat0
gravatar for Naga
3.8 years ago by
Naga450 wrote:

If you are looking for frequency of variants in the population, i.e., Minor allele frequency (MAF), annotate the variants with 1000 genome data or ExAC.

And if you are looking for variant allele frequency (VAF), to determine, whether it is heterozygous or homozygous, use DP4 field. 

DP4 is Number of 1) forward ref alleles; 2) reverse ref; 3) forward non-ref; 4) reverse non-ref alleles, used in variant calling. 

VAF = (forward non-ref + reverse non-ref alleles) /  (forward ref alleles + reverse ref + forward non-ref + reverse non-ref alleles)

ADD COMMENTlink written 3.8 years ago by Naga450

Thank you for the reply. I'm looking for the Allele frequency AF in the INFO. I have 2 vcf files. I need to plot a graph comparing the AF at each position for each chromosome using the 2 vcf files. I used the following command from vcftools.

./vcftools --vcf input_data.vcf --freq --out output

Y55.chr10    5    2    2    N:0    C:1
Y55.chr10    6    2    2    N:0    C:1
Y55.chr10    7    2    2    N:0    A:1
Y55.chr10    8    2    2    N:0    C:1
Y55.chr10    9    2    2    N:0    A:1
Y55.chr10    10    2    2    N:0    C:1
Y55.chr10    11    3    2    N:0    C:1    A:0

Could anyone explain the columns?

Thank you,



ADD REPLYlink modified 3.8 years ago • written 3.8 years ago by Parimala Devi70
gravatar for gsr9999
24 months ago by
United States
gsr9999110 wrote:

bcftools plugins can be used to get the AF tag and value to your vcf file

export BCFTOOLS_PLUGINS="~/bcftools/bcftools-1.3.1/plugins/"

bcftools plugin fill-tags -Oz -o output_variants.vcf -- -t AF

ADD COMMENTlink written 24 months ago by gsr9999110
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 920 users visited in the last hour