Skip to content

PCA in population genetics: smartpca and projecting ancient genomes

PCA places genomes on axes of genetic variation. How smartpca works, why ancient genomes are projected, and what a PCA position does not mean.

Updated 3 min read

Principal component analysis (PCA) summarises the genetic variation in a set of genomes as a few axes, and places each genome on them. Genomes that share more ancestry sit closer together. On a PCA of Europeans, the first two axes often look like a map of Europe.

The standard tool is smartpca, from the EIGENSOFT package (Patterson, Price and Reich 2006). It is how most ancient DNA papers draw their first figure.

How PCA works

Each genome is a long row of genotypes, one number per SNP. PCA finds the direction through these rows along which the genomes vary most: the first principal component (PC1). PC2 is the direction of most remaining variation at right angles to PC1, and so on. Each genome gets a coordinate on each component.

smartpca reports, for each component:

  • Eigenvalue: how much variation it explains.
  • Explained variance: the eigenvalue as a share of the total.
  • Tracy–Widom statistic: a test of whether the component reflects real structure rather than noise.

Projecting ancient genomes

Ancient genomes have a lot of missing data, and most are pseudohaploid: one allele is read at each site. If they help to build the axes, their missing data and damage pull the axes. The usual approach is to:

  1. compute the axes from high-quality present-day genomes, for example the Human Origins West Eurasian panel;
  2. project each ancient genome onto those axes, using only the SNPs it has.

smartpca does this with lsqproject: YES, which fits each projected genome by least squares and copes with missing SNPs. An uploaded consumer genome is projected the same way.

How to read a PCA plot

  • Clusters are groups of genomes with similar ancestry.
  • Clines are lines of genomes between two clusters. A cline often means mixture between the two ends, but drift and geography can also produce one.
  • Position is relative. The axes reflect the populations used to build them. Change the panel and the plot changes.

The PANE method, below, reads a cline genome by genome.

What PCA does not tell you

  • A PCA position is not an ancestry proportion. A genome halfway between two clusters may be a 50/50 mixture, or it may come from a population that drifted, or from a third source the axes do not show. Test mixtures with qpAdm.
  • Only the top components are shown. Ancestry that differs along PC5 or PC10 is invisible on a PC1/PC2 plot.
  • Sample sizes shape the axes. A population with many genomes in the panel pulls the axes towards its own variation.

McVean 2009 showed that PCA coordinates reflect average coalescence times between samples, which explains why PCA usually tracks geography and mixture, and also why it sometimes misleads.

PANE: describing a cline genome by genome

PANE (Molinaro et al. 2025) places each genome of a target population as a non-negative mixture of source populations on the PCA's coordinates. It describes where each genome sits between the sources. Its authors say it is not a formal admixture test: fit any share you report with qpAdm.

Running PCA

EIGENSOFT's smartpca runs from the command line with a parameter file. Nexju runs smartpca on the Max plan: you choose the populations that build the axes, project ancient genomes and your own upload, and read eigenvalues, explained variance and Tracy–Widom results. Max also includes PANE.

References

QQuestions

Frequently asked questions

Short answers to the questions people ask most about this topic.

Why are ancient samples projected onto a PCA instead of used to build it?

Ancient genomes have much missing data and are usually pseudohaploid. Used to build the axes, they would distort them. Projecting them with smartpca's lsqproject option places them on axes built from complete present-day genomes, using only the SNPs each one has.

Does a PCA plot show ancestry percentages?

No. A position between two clusters can come from mixture, drift or a source the plot does not show. Use qpAdm to test a mixture and estimate its proportions.

What is smartpca?

smartpca is the PCA program in EIGENSOFT, from David Reich's and Alkes Price's laboratories. It computes principal components from genotype data, projects samples with missing data, and tests each component with the Tracy–Widom statistic.

Why does my PCA change when I add populations?

The axes are the directions of most variation in the genomes that build them. Adding or removing populations changes that variation, so the axes, and every position on them, change too.

Every help article

Allow analytics cookies? They help us see how the site is used so we can improve it. Your DNA and results are never included. Details