Tutorials › Statistical Genetics › Comparing PCA and Clustering Ancestry Estimates

Ancestry and Population Structure · Tutorial 157 of 989

Comparing PCA and Clustering Ancestry Estimates

Learn how PCA and ancestry clustering represent genetic structure differently, and how to compare their individual-level results without treating them as interchangeable estimates.

Intermediate 10 min read

What You'll Learn

  • Distinguish principal-component scores from model-based ancestry proportions
  • Describe the variance-maximizing objective of PCA and the allele-frequency mixture used in ancestry models
  • Interpret a hypothetical cohort in both coordinate systems
  • Explain how continuous structure can appear in both summaries without making the summaries equivalent
  • Identify design and model choices that can produce apparent disagreement
  • Compare methods using patterns and sensitivity checks rather than direct numerical equivalence

Two Summaries of Genetic Structure

Principal-component analysis (PCA) and model-based ancestry clustering are often applied to the same genotype data, but they answer different mathematical questions. PCA places each individual at coordinates along directions of genetic variation in the analyzed sample. An ancestry model represents each individual by proportions assigned to a chosen set of allele-frequency components. A PC score is therefore not an ancestry proportion, and a proportion from an ancestry model is not a rescaled PC score.

The distinction matters when describing individuals. A person can lie between two groups on a principal-component plot without the plotted distance having a direct interpretation as ancestry fractions. Conversely, a model may estimate a mixture of components even when the cohort's variation is better described as a continuous geographic gradient. Comparing the methods means comparing their patterns and assumptions, not expecting their numerical outputs to match.

Definition: A principal-component score is an individual's coordinate along a principal-component direction derived from the genotype data and the chosen preprocessing. A model-based ancestry proportion is an estimated fraction assigned to one of the model's \(K\) components, with the individual's \(K\) proportions nonnegative and summing to one. The two quantities have different definitions, scales, and interpretations.

What Each Method Summarizes

For PCA, let \(X\) be the genotype matrix after the selected centering, scaling, and marker filtering. Rows represent individuals and columns represent markers. PCA finds orthogonal directions through the marker space that successively capture as much sample variation as possible. If \(v_r\) is the loading vector for component \(r\), then individual \(i\)'s score on that component is the projection \(t_{ir}=x_i^\mathsf{T}v_r\), where \(x_i\) is that individual's row of \(X\). Scores depend on the analyzed sample and preprocessing; their signs are arbitrary, and a score's units are not proportions.

A model-based ancestry method instead posits \(K\) allele-frequency components. In a simplified model for unlinked biallelic markers, let \(f_{k\ell}\) be the allele frequency for component \(k\) at marker \(\ell\), and let \(q_{ik}\) be individual \(i\)'s proportion from that component. Then the individual's allele probability at that marker is modeled as a mixture of the component frequencies:

$$ p_{i\ell}=\sum_{k=1}^{K}q_{ik}f_{k\ell}, \qquad G_{i\ell}\mid p_{i\ell}\sim\operatorname{Binomial}(2,p_{i\ell}), \qquad q_{ik}\geq 0,\quad \sum_{k=1}^{K}q_{ik}=1. $$

Here \(G_{i\ell}\) is the count of the coded allele in a diploid genotype. This simplified likelihood assumes allele copies are sampled from the mixture and are in Hardy–Weinberg proportions conditional on \(p_{i\ell}\); the model also treats the markers as unlinked or otherwise accounts for dependence according to its specification. Practical implementations can differ in details, but the interpretation remains tied to the model's components, chosen \(K\), and allele-frequency assumptions. The components are statistical constructs, not automatically named or pure historical populations.

Why the Objectives Are Different

PCA chooses directions that maximize projected variance. An ancestry model chooses component frequencies and individual proportions to make the observed genotypes plausible under its likelihood. The following short derivation shows why the first objective produces coordinates rather than mixture proportions.

1
Write the PCA variance.
For centered data with sample covariance matrix \(S=X^\mathsf{T}X/(n-1)\), the variance of the projected data \(Xv\) is \(v^\mathsf{T}Sv\). Constrain the direction to have unit length, \(v^\mathsf{T}v=1\).
2
Maximize over directions.
The Lagrangian is \(L(v,\lambda)=v^\mathsf{T}Sv-\lambda(v^\mathsf{T}v-1)\). Setting its derivative with respect to \(v\) to zero gives \(2Sv-2\lambda v=0\), or \(Sv=\lambda v\). Thus a variance-maximizing direction is an eigenvector of \(S\), and its projected variance is the corresponding eigenvalue.
3
Contrast the ancestry objective.
The simplified model uses genotype probabilities to form a likelihood for the observed \(G_{i\ell}\), then estimates \(q_{ik}\) and \(f_{k\ell}\) subject to the mixture constraints. It does not maximize projected variance. Consequently, neither the PCA eigenvectors nor scores are required to equal the model's components or proportions.

This difference also explains why a PCA plot may change when the sampled individuals or marker processing changes: the covariance structure being summarized has changed. An ancestry estimate can also change with the component count, reference information, or model assumptions. Agreement across methods is informative, but it does not make their estimands identical.

Worked Example: Reading Two Summaries for the Same Individuals

Suppose a hypothetical cohort has four individuals. A PCA using two components gives scores \((-2.0,0.1)\), \((-0.8,0.0)\), \((0.9,-0.1)\), and \((2.1,0.0)\). A two-component ancestry model gives corresponding proportions \((0.90,0.10)\), \((0.65,0.35)\), \((0.30,0.70)\), and \((0.08,0.92)\).

The scores order the individuals from the negative to the positive end of the first PC. For example, the first-to-fourth difference on PC1 is \(2.1-(-2.0)=4.1\) score units. The second component varies little in these data, but its score still has no direct fractional interpretation.

For the ancestry model, each pair sums to one: \(0.90+0.10=1.00\), and likewise for the other individuals. The first-to-fourth difference in the first component is \(0.90-0.08=0.82\), or 82 percentage points of the model's first component. This is not equivalent to the 4.1-unit PC1 difference. The methods show a similar ordering here, but one uses sample coordinates and the other uses constrained mixture proportions.

A defensible description is that both summaries place the four hypothetical individuals along a similar ordering of genetic variation. It would not be defensible to call the PC1 scores “ancestry percentages,” or to conclude from the numerical sizes alone that one method detects more ancestry difference.

Continuous Structure and Component Mixtures

A useful comparison is a population distributed along a geographic cline. PCA can show a gradual change in scores along one or more directions. A model-based method with two components may also estimate gradual changes in \(q\), particularly if its components capture the ends of that cline. These descriptions are compatible, but they are not the same claim: PCA summarizes variation in the sample, while the model expresses genotype frequencies as mixtures of its fitted components.

The mixture interpretation does not prove that an individual has literal fractions of descent from two discrete, historically separate populations. With continuous structure, the fitted components may approximate ends of a gradient. The meaning of the estimated proportions depends on how well the model's components and assumptions represent the sampled populations.

Worked Example: A Clinal Ordering in Both Methods

Consider five hypothetical individuals ordered across a geographic transect. Their PC1 scores are \(-2.0,-1.0,0.0,1.0,2.0\), and their two-component estimates for component A are \(0.95,0.75,0.50,0.25,0.05\); each component B estimate is one minus the component A estimate.

The PC1 score increases by 1.0 unit at each step. The component A estimate falls by 0.20, 0.25, 0.25, and 0.20 across successive pairs. These are both gradual orderings, not evidence that PC1 is a percentage scale. For the middle individual, PC1 is 0.0 and the modeled proportions are 0.50 and 0.50; zero on PC1 means a coordinate at the chosen score origin, not “no ancestry” or an equal mixture.

A reasonable conclusion is that both outputs are consistent with a gradual structure in this hypothetical transect. Whether the components represent meaningful reference groups, or merely summarize the ends of a cline, requires evaluating the model specification and sampling context. The matching ordering alone cannot decide that question.

When the Individual-Level Conclusions May Disagree

Disagreement is not automatically a software error. The methods can emphasize different features of the same genotype data, and their outputs depend on choices that need not be identical. Interpret a mismatch by checking what each analysis was designed to summarize and which individuals and markers informed it.

Source of differencePossible effect on the comparison
Different summariesPCA captures directions of sample variance; ancestry proportions fit a constrained allele-frequency mixture.
Choice of \(K\) or reference informationThe ancestry components and an individual's proportions are defined relative to the fitted model and available reference information.
Sample compositionAdding or removing groups can change PCA directions and the location of individuals in the analyzed cohort.
Marker processing and dependenceScaling, marker selection, and linkage disequilibrium can affect the information that dominates either analysis.
Unmodeled structure or technical effectsEither summary can reflect structure beyond the intended ancestry contrast, including sampling or data-quality effects.

Component labels also have no intrinsic ordering: exchanging labels and the matching proportions leaves the same mixture description. PCA signs are arbitrary as well, and directions within a set of equal or nearly equal eigenvalues may not have a unique orientation. Therefore, compare plots only after aligning the relevant directions or component labels; never infer a substantive reversal merely because a sign or label changed.

Worked Example: Similar PCA Coordinates, Different Model Estimates

In a hypothetical dataset, two individuals have PCA scores \((0.20,0.10)\) and \((0.30,0.00)\). Their Euclidean distance in the two plotted coordinates is

$$ \sqrt{(0.30-0.20)^2+(0.00-0.10)^2} =\sqrt{0.01+0.01} =\sqrt{0.02} \approx 0.141. $$

Thus they are close on these two displayed PCA axes. In one two-component model fit, however, their proportions are \((0.80,0.20)\) and \((0.25,0.75)\). The absolute difference in the first component is \(|0.80-0.25|=0.55\), or 55 percentage points. The model's two-component L1 distance is \(|0.80-0.25|+|0.20-0.75|=1.10\).

The outputs appear discordant, but the PCA distance uses only two sample-derived coordinates, whereas the proportions come from a fitted mixture model. The appropriate next checks include whether the same individuals and markers were used, whether the plotted PCs capture the relevant structure, and whether the ancestry model's components and reference information are suitable. The calculations do not establish that either summary is wrong; they show why closeness in one representation does not guarantee closeness in another.

How to Compare the Methods Responsibly

Start by defining the target of each comparison. To ask whether both methods order individuals similarly, compare the corresponding patterns rather than equating raw units. For a chosen component or score, a scatterplot can reveal whether individuals with higher values in one summary tend to have higher values in another, once component labels and PC orientation are aligned. A correlation can summarize a roughly linear ordering, but it does not establish that the quantities have the same interpretation or that either is a direct measure of historical ancestry.

For groups of individuals, compare relative positions and broad gradients, and report which PCs and ancestry components are being compared. If estimates change substantially across plausible preprocessing choices, sample definitions, or model settings, describe that sensitivity rather than presenting a single set of proportions as uniquely determined. Individual estimates can also be uncertain; a point estimate alone does not show how much the data and model constrain it.

The central practical question is not “Which method gives the true ancestry number?” It is “What structure does each method summarize under its assumptions, and are the conclusions relevant to the scientific question?” PCA is useful for exploring major axes of variation in the analyzed sample. Model-based proportions can summarize a sample in terms of specified allele-frequency components. Neither summary, by itself, establishes a person's social identity, a unique genealogical history, or a causal explanation for an outcome.

Common Mistake

Wrong reasoning: “An individual has PC1 equal to 0.4, so the individual has 40% ancestry from the first population; if the clustering model gives 60%, one of the methods must be incorrect.”

Correction: PC1 is a coordinate along a variance-maximizing direction, with an origin and scale determined by the analysis. A model-based proportion is a constrained estimate relative to fitted components. They are not expressed in common units. Investigate why the summaries differ, and state what each estimates, instead of converting one into the other.

Key takeaway: PCA scores describe locations along sample-derived axes of genetic variation; model-based ancestry proportions describe fitted mixtures of allele-frequency components. Compare their individual-level patterns with attention to scale, labels, sample design, and assumptions, but do not treat the outputs as interchangeable.

Check Your Understanding

Answer each question by distinguishing the method's output from its interpretation.

  1. Why does a PC1 score of zero not imply that an individual has zero ancestry from a component?
  2. In a two-component model, an individual's estimates are 0.35 and 0.65. What constraint do these values satisfy, and what additional assumptions are needed before giving the components a population interpretation?
  3. A cohort shows a gradual PC1 gradient and gradually changing two-component estimates. Give one conclusion supported by both patterns and one conclusion that the patterns alone do not establish.
  4. What does it mean for PCA to maximize projected variance, and why does that objective differ from fitting ancestry proportions?
  5. Two individuals are close on the first two PCs but have different fitted proportions. Name two analysis features you would check before deciding that the results conflict substantively.
Clinical Biostats