Why Check Allele Frequencies?
A genotype file can contain calls for every sample and still have a problem at a particular variant. For a biallelic variant, the frequency of one allele summarizes the balance of its observed copies among called genotypes. A value that is surprising in context can help flag a coding error, a file mismatch, or a variant whose calls need review. It is a quality-control signal, not a diagnosis: a frequency alone does not establish why the value is unusual.
This tutorial considers autosomal, diploid genotype calls at a biallelic variant. The genotypes are reference/reference, reference/alternate, and alternate/alternate. Calls marked missing do not contribute to the frequency calculation. These restrictions matter: the calculation below assumes each included sample contributes exactly two allele copies at the locus.
The denominator is the number of called allele copies, not the number of samples: there are two called copies per included diploid sample. If the file has missing genotypes, those samples are excluded from both the genotype counts and the denominator. A frequency calculation therefore depends on correctly identifying the called samples, the allele labels, and the ploidy represented by the data.
The estimate describes the genotypes in the specified set of called samples. It is not, by itself, a test of whether the value is statistically unusual, a claim about a wider population, or evidence that a particular genotype-calling error occurred. For QC, the useful question is whether the observed value is consistent with the intended variant record and with suitably comparable data.
Calculating and Checking a Frequency
Before interpreting a value, verify the ingredients of the calculation. Confirm that the variant is biallelic as represented in the file, that the genotype categories match the stated reference and alternate alleles, and that the counts include only called diploid samples. Then calculate the alternate copies and divide by all called copies. The following short derivation shows why the numerator and denominator have this form.
Worked Example: Calculating a Frequency With Three Genotype Classes
Suppose a hypothetical autosomal variant has 62 reference/reference calls, 31 reference/alternate calls, and 7 alternate/alternate calls. All other records are missing. Calculate the alternate-allele frequency among the called samples.
The number of called samples is \(N=62+31+7=100\), giving \(2N=200\) called allele copies. The number of alternate copies is \(31+2(7)=45\). Therefore,
The estimated alternate-allele frequency among these called genotypes is 0.225, or 22.5%; the corresponding reference-allele frequency is \(1-0.225=0.775\), or 77.5%. These are descriptions of the called data. Whether 22.5% is a QC concern depends on the variant, the sample set, and the data the results are being compared with.
Frequency checks are most informative when a comparison is appropriate. An allele frequency may differ across groups because the groups contain different people or populations; their values need not match just because the same locus was measured. A useful QC comparison therefore checks that the sample sets, variant representation, allele labels, and called-sample rules are aligned. If these conditions are uncertain, a difference may reflect the comparison rather than an error.
Extreme Values and Unexpected Monomorphism
An estimated frequency of zero means there are no alternate copies among the called samples in the calculation. An estimated frequency of one means every called copy is alternate. Either result can be correct. A variant may be monomorphic (only one allele is observed) in a particular sample set, even if it is polymorphic elsewhere. Conversely, if a site expected to have both alleles in a well-matched comparison appears monomorphic, the result deserves a data check.
Before treating monomorphism as suspicious, verify the number of called samples and inspect the genotype counts. A very small called sample can show only one allele by chance. Also check whether the intended variant and allele labels were read correctly, whether the calls were filtered or lost, and whether the same samples and locus are represented in the comparison file. A zero frequency is a description of these observed calls; it does not prove that the allele is absent from a broader population.
Worked Example: A Monomorphic Call Set
In a hypothetical file, an autosomal biallelic site has 80 reference/reference calls, no heterozygotes, and no alternate/alternate calls. There are no other samples at this site. Calculate the frequency and decide what the result says for QC.
There are \(N=80\) called samples and \(2N=160\) called allele copies. The alternate-copy count is \(0+2(0)=0\), so
The observed alternate-allele frequency is zero among these 80 called samples. Suppose, hypothetically, that a validated file with the same sample set and correctly matched variant record shows alternate copies at this site. That discrepancy is a reason to inspect the variant record, allele coding, genotype calls, and sample matching. The zero alone does not identify the cause, and without a reliable comparison it does not show that the calls are erroneous.
The distinction is important: “no alternate copies were observed here” is supported by the calculation; “the alternate allele does not occur in the population” is not.
Comparisons Across Files and Batches
A frequency discrepancy can reveal that two data sources may not be describing the same genotypes in the same way. For example, the files could differ in sample membership, missingness, allele order, variant identification, or genotype calls. A biallelic frequency may change from \(\hat{p}_A\) to \(1-\hat{p}_A\) if the same alleles are labelled in the opposite order. That numerical complement is a clue to check coding, not sufficient evidence that coding is the cause.
Batch comparisons also require care. Frequencies that differ between batches can flag a problem for investigation, but batches may contain different sample compositions. The observed difference does not establish a technical batch effect by itself. Check that the locus is represented consistently and that the compared sample sets and allele definitions are understood before drawing conclusions.
Worked Example: A Frequency Disagreement Between Files
Two hypothetical files are intended to contain calls for the same 100 diploid samples at the same autosomal biallelic variant, using the same allele labels. File 1 reports 60 reference/reference, 30 reference/alternate, and 10 alternate/alternate calls. File 2 reports 90 reference/reference, 10 reference/alternate, and 0 alternate/alternate calls. Calculate both frequencies and interpret the discrepancy.
For File 1, there are \(2(100)=200\) called copies and \(30+2(10)=50\) alternate copies:
For File 2, there are also 200 called copies and \(10+2(0)=10\) alternate copies:
The observed alternate-allele frequencies differ by \(0.250-0.050=0.200\), or 20 percentage points. Under the stated expectation that the files contain the same samples, variant, allele labels, and calling scope, this is a substantial inconsistency to investigate. Compare the sample and variant identifiers, inspect the allele coding and genotype records, and check whether any processing or filtering differed. The arithmetic does not establish which file is correct, nor does it show that a particular error occurred.
A Practical QC Interpretation
Frequency checks are useful because they compress genotype counts into a value that is easy to compare and review. Their strength is also their limitation: different underlying problems can produce similar frequencies, and real differences in the compared samples can also produce different values. Treat a suspicious result as a prompt to verify the inputs and the comparison, then inspect the underlying records rather than relying on the summary alone.
A disciplined check can follow these steps:
Check that the calculation concerns a biallelic, diploid locus and a defined set of samples.
Confirm which allele is called reference and alternate, and that genotype counts represent the intended categories.
Exclude missing calls from both the genotype counts and the denominator, then count alternate copies over total called copies.
Check sample membership, variant identity, allele coding, and calling scope before interpreting a difference across files or batches.
Review records that could explain an extreme or inconsistent value; do not treat frequency alone as proof of error or as a population conclusion.
Common Pitfall
Wrong reasoning: “The alternate-allele frequency is zero in this file, so the alternate allele is absent from the population.” This moves from a result about observed calls in a particular sample set to a claim about a broader population, which the calculation does not support.
Correction: State exactly what was observed: no alternate copies were present among the called genotypes in this file. Then check whether the sample count, variant identity, allele coding, and comparison data make the result unexpected. A frequency check can flag a possible data problem, but it cannot by itself distinguish an error from a genuine feature of the sampled data.
The same caution applies to a frequency that looks implausible. There is no single value that is automatically an error in every study. The relevant comparison depends on the intended variant and sample set, and the cause must be investigated in the underlying data.
Check Your Understanding
Use the stated genotype counts and explain what each calculation can and cannot establish.
- A file contains 25 reference/reference, 40 reference/alternate, and 15 alternate/alternate calls. What is the alternate-allele frequency?
- Why are missing diploid genotypes excluded from both the genotype counts and the frequency denominator?
- A variant has no alternate copies among 50 called samples. State one conclusion supported by this observation and one broader conclusion it does not support.
- Two files have frequencies \(0.18\) and \(0.82\) at a biallelic variant. Name one coding issue worth checking and explain why the frequencies alone do not prove it occurred.
- Two batches have different allele frequencies. What should be checked before attributing the discrepancy to a technical problem?