# Variant allele frequency versus population frequency

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9160216/#:~:text=Allele%20frequency%20is%20calculated%20by,can%20differ%20substantially%20between%20positions

Allele frequency is calculated by dividing allele count by allele number, hence, allele frequency represents the frequency of confidently sequenced haplotypes that carry the allele in question (because coverage and sequencing quality varies across the genome, the allele number can differ substantially between positions). Allele frequency is not equivalent to the percentage of individuals that carry the allele, but is a suitable value for expressing the frequency of a variant in the general population. The number of individuals carrying a variant will depend on the number of heterozygous and homozygous individuals but can be calculated from the data provided in the variant table.

Does this mean, for getting the frequency of each allele in gnomAD, one could use Allele frequency (AF) column or must calculate population frequency?

• What VCF fields are you comparing? I see the gnomAD has the overall AF field and various AF fields calculated by sample subset. Jan 11 at 13:48
• How did you subset gnomAD VCF to non-finnish samples only? Jan 11 at 14:14
• You might find gnomAD's non-cancer AF fields useful. I'll try to decipher the formula. AN/2 is the number of samples (assuming all samples are diploid). AC - num_homo gives you 2*(num(hets)). Dividing this by number of samples gives you frequency of samples with at least one ALT allele. Jan 11 at 15:35

gnomAD provides a global Allele Frequency as well as AF values for most subsets. gnomAD does not provide individual genotypes (as far as I know), so calculating custom AF for non-precomputed subsets might not be possible.

Since you're interested in the NFE (non-Finnish European) sub-population, the nfe_*_AF fields might be of interest to you.

As far as calculating the fraction of non-WT samples from num_homozygous_samples, AC, and AN goes, your formula seems spot on. Here's my deconstruction of the formula:

Your formula is: (AC - num_homozygous_samples)/(AN / 2))

AN/2 is the number of samples (assuming all samples are diploid). AC - num_homo gives you 2 * num_hets. Dividing this by number of samples gives you frequency of samples with at least one ALT allele.

For example, let's take a dataset of 200 diploid samples where 100 are WT, 75 are het and 25 are hom-alt for a biallelic variant.

Since there are 200 diploid samples, AN is 400.

AC for the ALT allele is (75 * 1) + (25 * 2) = 125.

Since 100 are WT, it is known that fraction of samples with mutation = 1 - (100/200) = 0.5. This number can be arrived using your formula:

(AC - num_homozygous_samples) / (AN/2)
= ((125 - 25) / (400/2))
= 100 / 200
= 0.5