Tutorials › Statistical Genetics › Estimating Haplotype Frequencies from Phased Chromosomes

Haplotypes and Linkage Disequilibrium · Tutorial 127 of 989

Estimating Haplotype Frequencies from Phased Chromosomes

Use chromosome counts from fully phased samples to estimate haplotype frequencies and calculate the corresponding sample estimates of \(D\) and \(r^2\).

Intermediate 12 min read

What You'll Learn

  • Count each phased chromosome once to estimate two-locus haplotype frequencies
  • Check that the four estimated frequencies sum to one
  • Derive estimated allele frequencies from the haplotype estimates
  • Calculate sample estimates of linkage disequilibrium \(D\) and \(r^2\)
  • Distinguish sample estimates from the underlying population quantities
  • Recognize when chromosome counting cannot be used directly

From Phased Chromosomes to Frequency Estimates

At two biallelic loci, each chromosome carries one allele at each locus. If the alleles are \(A\) or \(a\) at the first locus and \(B\) or \(b\) at the second, the possible haplotypes are \(AB\), \(Ab\), \(aB\), and \(ab\). When the phase is known, each chromosome can be assigned to exactly one of these four categories. Counting those categories gives direct estimates of their frequencies.

The distinction between a population frequency and a sample estimate matters. A population haplotype frequency describes the fraction of chromosomes in a specified population that carry that haplotype. A sample frequency is the fraction among the chromosomes actually observed. The sample value is an estimate of the population quantity, not the quantity itself.

Definition: Suppose \(m\) fully phased chromosomes are observed, and \(n_{AB}\), \(n_{Ab}\), \(n_{aB}\), and \(n_{ab}\) are their respective haplotype counts. The estimated haplotype frequency for a haplotype is its count divided by \(m\); for example, \(\hat p_{AB}=n_{AB}/m\). The four estimates sum to one.

For \(n\) sampled diploid individuals with both chromosomes observed and phased, \(m=2n\). A haplotype count is a chromosome count, not a count of people with a particular genotype. Each individual contributes two chromosomes, which may carry the same haplotype or different haplotypes.

Estimating Allele Frequencies and Linkage Disequilibrium

The allele frequencies at each locus follow by adding the estimated frequencies of haplotypes carrying that allele. Thus \(\hat p_A=\hat p_{AB}+\hat p_{Ab}\), and \(\hat p_B=\hat p_{AB}+\hat p_{aB}\). The corresponding frequencies of \(a\) and \(b\) are \(1-\hat p_A\) and \(1-\hat p_B\).

The population linkage disequilibrium coefficient \(D\) can be written as \(p_{AB}-p_Ap_B\). Its sample estimate is obtained by substituting the sample estimates for those population frequencies. The squared allelic correlation \(r^2\) is calculated from \(D^2\) divided by the product of the two allele-frequency variances. Here, the estimates of \(D\) and \(r^2\) are plug-in estimates: they are calculated from the estimated frequencies.

$$ \hat D=\hat p_{AB}-\hat p_A\hat p_B =\hat p_{AB}\hat p_{ab}-\hat p_{Ab}\hat p_{aB} $$
$$ \widehat{r^2} =\frac{\hat D^2} {\hat p_A(1-\hat p_A)\hat p_B(1-\hat p_B)} $$

The second expression for \(\hat D\) is useful as a check on arithmetic. It follows from the fact that the four haplotype frequencies sum to one. In particular, substituting the marginal allele frequencies gives \(\hat p_A\hat p_B=(\hat p_{AB}+\hat p_{Ab})(\hat p_{AB}+\hat p_{aB})\). Subtracting this product from \(\hat p_{AB}\), and using \(1=\hat p_{AB}+\hat p_{Ab}+\hat p_{aB}+\hat p_{ab}\), leaves \(\hat p_{AB}\hat p_{ab}-\hat p_{Ab}\hat p_{aB}\).

The estimated \(D\) has a sign: it is positive when \(AB\) is observed more often than expected from the estimated allele frequencies, and negative when it is observed less often. The estimated \(r^2\) is nonnegative and describes the squared allelic correlation represented by the sample frequencies. If either locus is monomorphic in the sample, the denominator for \(\widehat{r^2}\) is zero, so this formula does not define an estimate of \(r^2\).

Worked Example: Counting Ten Fully Phased Individuals

Suppose a hypothetical sample contains 10 diploid individuals, so 20 phased chromosomes. The observed counts are \(n_{AB}=8\), \(n_{Ab}=4\), \(n_{aB}=3\), and \(n_{ab}=5\). The counts total \(8+4+3+5=20\), as required.

Haplotype frequencies. Divide each count by 20:

$$ \hat p_{AB}=\frac{8}{20}=0.400,\quad \hat p_{Ab}=\frac{4}{20}=0.200,\quad \hat p_{aB}=\frac{3}{20}=0.150,\quad \hat p_{ab}=\frac{5}{20}=0.250. $$

These estimates sum to \(0.400+0.200+0.150+0.250=1.000\). The estimated allele frequencies are \(\hat p_A=0.400+0.200=0.600\) and \(\hat p_B=0.400+0.150=0.550\).

Linkage disequilibrium. Substituting into the marginal-frequency expression gives \(\hat D=0.400-(0.600)(0.550)=0.400-0.330=0.0700\). As a check, the cross-product expression gives \((0.400)(0.250)-(0.200)(0.150)=0.100-0.0300=0.0700\).

Squared correlation. The estimated allele-frequency variances are \(0.600(0.400)=0.240\) and \(0.550(0.450)=0.2475\). Therefore, \(\widehat{r^2}=0.0700^2/(0.240\times0.2475)=0.004900/0.05940=0.08249\). These are sample estimates based on the 20 observed chromosomes; they do not establish the exact population values.

Worked Examples: Negative and Unequal Haplotype Counts

Worked Example: A Negative Estimate of \(D\)

In a second hypothetical sample of 10 diploid individuals, the 20 phased chromosomes have counts \(n_{AB}=2\), \(n_{Ab}=8\), \(n_{aB}=6\), and \(n_{ab}=4\). The counts sum to 20. The estimated frequencies are \(0.100\), \(0.400\), \(0.300\), and \(0.200\), respectively.

The estimated allele frequencies are \(\hat p_A=0.100+0.400=0.500\) and \(\hat p_B=0.100+0.300=0.400\). Thus, \(\hat D=0.100-(0.500)(0.400)=0.100-0.200=-0.100\). The cross-product check gives \((0.100)(0.200)-(0.400)(0.300)=0.0200-0.120=-0.100\).

The estimated \(D\) is negative because the observed sample frequency of \(AB\) is below the product of the estimated marginal allele frequencies. For the squared correlation, \(\widehat{r^2}=(-0.100)^2/[0.500(0.500)0.400(0.600)]=0.0100/0.0600=0.1667\). Squaring removes the sign, so \(\widehat{r^2}\) is positive even though \(\hat D\) is negative.

Worked Example: Counting Both Chromosomes From Each Person

Consider six hypothetical diploid individuals with the following phased chromosome pairs: \(AB/ab\), \(AB/ab\), \(AB/Ab\), \(aB/ab\), \(AB/aB\), and \(ab/ab\). Each slash separates the two chromosomes of one individual. Count all 12 chromosomes, rather than assigning one observation to each person.

The counts are \(n_{AB}=4\), \(n_{Ab}=1\), \(n_{aB}=2\), and \(n_{ab}=5\): for example, the two \(ab/ab\) chromosomes contribute two to \(n_{ab}\). The counts total 12, and the frequency estimates are \(\hat p_{AB}=4/12=1/3\), \(\hat p_{Ab}=1/12\), \(\hat p_{aB}=2/12=1/6\), and \(\hat p_{ab}=5/12\).

The estimated allele frequencies are \(\hat p_A=(4+1)/12=5/12\) and \(\hat p_B=(4+2)/12=1/2\). Then \(\hat D=1/3-(5/12)(1/2)=8/24-5/24=3/24=1/8=0.1250\). For \(r^2\), the denominator is \((5/12)(7/12)(1/2)(1/2)=35/576\), while \(\hat D^2=1/64=9/576\). Therefore, \(\widehat{r^2}=(9/576)/(35/576)=9/35=0.2571\).

What the Estimates Represent

The counts above estimate frequencies in a target population only insofar as the sampled chromosomes provide appropriate information about that population. For example, if sampling gives some population groups more weight than they have in the intended target, the pooled sample frequencies describe the sample’s mixture of groups and may not estimate the target population’s frequencies. The sampling design and the population being described should therefore be stated when reporting estimates.

A basic sampling model is that individuals are sampled representatively from the target population and their two chromosomes at the loci are observed without missing calls or phase errors. Under that setup, the chromosome-count frequencies are the direct empirical estimates. For this calculation, no special adjustment is needed when both chromosomes from a person carry the same haplotype: each is still one observed chromosome. However, the two chromosomes from one person should not automatically be treated as independent people when making claims about uncertainty.

These calculations also require the haplotype on each chromosome to be known. If the observed genotypes do not identify which alleles occur together on each chromosome, simply counting the genotypes does not provide the four haplotype counts. The direct counting method applies to fully phased chromosome data; it does not resolve unknown phase.

QuantityPopulation meaningSample calculation
Haplotype frequencyFraction of target-population chromosomes with that haplotypeHaplotype count divided by observed phased chromosomes
\(D\)Difference between the \(AB\) frequency and the product of its allele frequencies\(\hat p_{AB}-\hat p_A\hat p_B\)
\(r^2\)Squared allelic correlation based on population frequencies\(\hat D^2/[\hat p_A(1-\hat p_A)\hat p_B(1-\hat p_B)]\)

Common Mistakes

  • Dividing by the number of people. With \(n\) diploid individuals and two observed chromosomes per individual, the denominator is \(2n\), not \(n\). Count both chromosomes.
  • Counting genotype categories as haplotypes. A person has two chromosomes. Use the phased pair to count each chromosome separately; a pair with two copies of \(ab\) contributes two \(ab\) chromosomes.
  • Using the wrong marginal frequencies in \(D\). Calculate \(\hat p_A\) by adding the two haplotypes carrying \(A\), and \(\hat p_B\) by adding the two carrying \(B\), before evaluating \(\hat D\).
  • Calling a sample estimate the population truth. The observed ratios are exact for the sample, but are estimates of the corresponding population frequencies and LD quantities.
  • Giving \(r^2\) the sign of \(D\). \(D\) is signed, but \(r^2\) uses \(D^2\) and cannot be negative.
Key takeaway: With fully phased data, estimate each haplotype frequency by its chromosome count divided by the total number of observed chromosomes. Derive the allele frequencies from those four estimates, then calculate \(\hat D\) and \(\widehat{r^2}\) as sample quantities.

Check Your Understanding

Use the definitions and calculations above to answer the following questions.

  1. A sample of 15 diploid individuals has complete phase at both loci. How many observed chromosomes contribute to the haplotype-frequency denominator?
  2. For counts \(n_{AB}=5\), \(n_{Ab}=3\), \(n_{aB}=4\), and \(n_{ab}=8\), calculate all four estimated haplotype frequencies and check their sum.
  3. Using the counts in question 2, calculate \(\hat p_A\), \(\hat p_B\), and \(\hat D\).
  4. Why does a negative estimate of \(D\) not imply a negative estimate of \(r^2\)?
  5. What information is missing if two-locus genotypes are observed but the chromosome phase is unknown?
Clinical Biostats