I have performed variant calling using the Platypus tool but cannot find allele frequency (AF) in the output file. I am trying to read the vcf file in VariantAnnotation and vcfR packages and want to calculate AF and add it into the INFO field of the VCF file. Please guide me how to calculate AF from my VCF file.

Find the info and geno field of vcf file,

  GRanges with 5 metadata columns: paramRangeID, REF, ALT, QUAL, FILTER
  DFrame with 25 columns: FR, MMLQ, TCR, HP, WE, Source, FS, WS, PP, TR, NF, TCF, NR, TC, END, MGOF, SbPval, START, ReadPosRankSum, MQ, QD, SC,...
                  Number Type    Description                                                                                         
   FR             .      Float   Estimated population frequency of variant                                                           
   MMLQ           1      Float   Median minimum base quality for bases around variant                                                
   TCR            1      Integer Total reverse strand coverage at this locus                                                         
   HP             1      Integer Homopolymer run length around variant locus                                                         
   WE             1      Integer End position of calling window                                                                      
   Source         .      String  Was this variant suggested by Playtypus, Assembler, or from a VCF?                                  
   FS             .      Float   Fisher's exact test for strand bias (Phred scale)                                                   
   WS             1      Integer Starting position of calling window                                                                 
   PP             .      Float   Posterior probability (phred scaled) that this variant segregates                                   
   TR             .      Integer Total number of reads containing this variant                                                       
   NF             .      Integer Total number of forward reads containing this variant                                               
   TCF            1      Integer Total forward strand coverage at this locus                                                         
   NR             .      Integer Total number of reverse reads containing this variant                                               
   TC             1      Integer Total coverage at this locus                                                                        
   END            .      Integer End position of reference call block                                                                
   MGOF           .      Integer Worst goodness-of-fit value reported across all samples                                             
   SbPval         .      Float   Binomial P-value for strand bias test                                                               
   START          .      Integer Start position of reference call block                                                              
   ReadPosRankSum .      Float   Mann-Whitney Rank sum test for difference between in positions of variants in reads from ref and alt
   MQ             .      Float   Root mean square of mapping qualities of reads at the variant position                              
   QD             1      Float   Variant-quality/read-depth for this variant                                                         
   SC             1      String  Genomic sequence 10 bases either side of variant position                                           
   BRF            1      Float   Fraction of reads around this variant that failed filters                                           
   HapScore       .      Integer Haplotype score measuring the number of haplotypes the variant is segregating into in a window      
   Size           .      Integer Size of reference call block                                                                        
  SimpleList of length 6: GT, GQ, GOF, NR, GL, NV
       Number Type    Description                                                                                                               
   GT  1      String  Unphased genotypes                                                                                                        
   GQ  .      Integer Genotype quality as phred score                                                                                           
   GOF .      Float   Goodness of fit value                                                                                                     
   NR  .      Integer Number of reads covering variant location in this sample                                                                  
   GL  .      Float   Genotype log10-likelihoods for AA,AB and BB genotypes, where A = ref and B = variant. Only applicable for bi-allelic sites
   NV  .      Integer Number of reads containing variant in this sample                                                                         


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.