Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1. Population Size from Genomes

How can one person’s genome record population sizes thousands of generations ago? Start with the four DNA windows in E.1. Estimate a three-epoch history, then compare one pair with all 28 pairs from four diploid individuals. At the end, compare a population size decline with a decline in gene flow.

Read Pritchard, Chapter 3.3, Fig. 3.63 alongside Population Size from One Genome in the lecture.

Four DNA windows

In the local-ancestry HMM, the hidden state records the source of a chromosome copy. Here it records the local common ancestor’s time bin. The window index moves along the chromosome. Time within a state counts generations backward. Recombination can change the state. Given ancestor time tt, the chance of at least one heterozygous site in LL callable bases is approximately 1−e−2μLt1-e^{-2\mu Lt}. The model averages this emission within each bin.

Loading...
Loading...
Loading...

Run EM on the same four windows

Start at N=10,000N=10{,}000 and fix the older size at 10,000. In the E-step, forward–backward gives the posterior probability of each time bin at each window. The joint posterior of two adjacent states also gives the expected number of transitions between bins. There are three boundaries in the observation vector (1,1,0,0)(1,1,0,0).

Let aja_j be the posterior probability of state jj at the first window, bjkb_{jk} the expected number of transitions from jj to kk, and cjyc_{jy} the expected number of windows with state jj and observed value yy. The M-step maximizes

Q(N)=∑jajlog⁡πj(N)+∑j,kbjklog⁡Ajk(N)+∑j,ycjylog⁡ej(y;N).Q(N)=\sum_j a_j\log\pi_j(N)+\sum_{j,k}b_{jk}\log A_{jk}(N) +\sum_{j,y}c_{jy}\log e_j(y;N).

Recompute the weights after every update. The likelihood of the observed windows should increase each time.

Loading...
Loading...
Loading...

Estimate size in three epochs

The four-window fit estimated one unknown size. Here all three sizes vary. The boundaries at 2,500 and 7,000 generations are supplied. Simulate 32 independent 300 kb blocks, each carrying the two copies of a diploid, under a bottleneck. Fit the 1 kb window observations by maximizing the HMM likelihood directly. Use more hidden time bins than size parameters, so two local ancestors can have different ages within the same demographic epoch.

Loading...
plot without title

The fit estimates the level of each step. The step locations came from the design. Compare uncertainty separately for the recent, bottleneck and older periods. The jackknife omits groups of whole blocks so it keeps linked windows together.

Sample DNA under two size histories

Both populations had Ne=10,000N_e=10{,}000 before 5,000 generations ago. Their recent sizes are 3,500 and 14,000. For each history we simulate two panels, each with 24 independent 300 kb regions from four diploid individuals. Recombination generates linked local trees. Mutations on those trees generate the sequences. We carry those same sequences through all the fits below.

For the DNA fits, a 1 kb window records whether the pair differs at any site. The finer HMM uses ten time bins, with more resolution near the present. Its SMC′ transition allows a recombined lineage to rejoin the branch it left. That recombination event can leave the local pairwise time unchanged.

Compare the fitted and recorded local times

First use the first two copies in each region. For one region, plot the fitted probability that the local ancestor lived before the size change. Add the state read from the recorded trees at each window center. The fit uses only the DNA. This is the single-genome check on Which Local Ancestor Times Can PSMC Recover?.

plot without title

Fit one pair and all 28 pairs

This follows the comparison in MSMC2 Combines Many Pairs of Copies. The eight copies give 28 pairs within each population. We sum their log likelihoods. They share ancestors within a region, so we omit whole regions in turn when measuring uncertainty. The older size and epoch boundary stay fixed throughout. To check the effect of time resolution, we also fit the four-window model’s two states to the same DNA.

 panel population truth coarse onePair allPairs regionSE
     1    Smaller  3500   2633    3412     3114    193.8
     2    Smaller  3500   2932    3522     3745    247.3
     1     Larger 14000   7547   19262    13197   1389.0
     2     Larger 14000   7273   10943    12566    952.3
Loading...
Plot with title “Larger”

Compare the two panels to see how much the result changes with the sample. Compare the two HMMs on the same panel to see how much the transition approximation and time bins matter. This example fits one recent size per population. The research fit estimates a size curve across time.

Li and Durbin, PSMC · Wilton et al., SMC′ · Schiffels and Wang, MSMC2 · Chak et al., farming and foraging histories

Population size decline or reduced migration?

In the lecture, the Chabu have a lower recent fitted NeN_e and longer runs of homozygosity than nearby farmers. Could isolation contribute to these patterns? Compare two demographic models by calculating their merger probabilities.

  • Reduced migration. Two demes have 5,000 diploid individuals each throughout. In forward time, the symmetric migration probability mm drops from 0.002 to 0.00002 at 3,500 generations ago. Tracing backward, a surviving pair changes between the same-deme and different-deme states when exactly one lineage migrates, with probability 2m(1−m)2m(1-m). After migration, a pair in the same deme merges with probability 1/(2Ndeme)1/(2N_{\rm deme}).

  • Population size decline. Use one random-mating population and set its size in each generation to 1/[2hwithin(t)]1/[2h_{\rm within}(t)], where hwithin(t)h_{\rm within}(t) is the first model’s merger probability at time tt for a pair still separate and originally sampled within one deme.

The single-population history is constructed to match the within-deme merger probabilities of the structured history. The migration probability changes in one step. The merger rate also depends on where the surviving lineages are distributed over the following generations.

Loading...
plot without title

Compare pairs within and between populations

The size curves agree because the within-group merger rates agree. Now sample one copy from each deme. A merger requires the lineages to enter the same deme, so low migration can slow down between-deme mergers.

The relative cross-coalescence rate is the between-deme merger rate divided by the mean of the two within-deme rates. Symmetry makes those two within-deme rates equal here. In one random-mating population, group labels assigned to the sampled copies have no effect on the merger probability, giving a ratio of 1. The dashed green line shows a second two-deme model with constant migration of 0.002 per generation.

Plot with title “Compare Where Pairs Are Sampled”

With Chabu and its neighbors, the corresponding comparison would use pairs within each population and pairs spanning the two populations. The plotted rates here are calculated from the two specified models. With genomic data, the rates must be inferred from sequence differences, as in the earlier HMM example.

Mazet et al., population structure and pair coalescence

References
  1. Li, H., & Durbin, R. (2011). Inference of human population history from individual whole-genome sequences. Nature, 475(7357), 493–496. 10.1038/nature10231
  2. Wilton, P. R., Carmi, S., & Hobolth, A. (2015). The SMC′ Is a Highly Accurate Approximation to the Ancestral Recombination Graph. Genetics, 200(1), 343–355. 10.1534/genetics.114.173898
  3. Schiffels, S., & Wang, K. (2020). MSMC and MSMC2: The Multiple Sequentially Markovian Coalescent. In Statistical Population Genomics (pp. 147–166). Springer US. 10.1007/978-1-0716-0199-0_7
  4. Chak, B., Wu, E., Perry, G. H., Dominy, N. J., Dumaine, A., Enard, D., Aguirre-Gamboa, R., Patin, E., Quintana-Murci, L., Henn, B. M., Moller, M., Myrick, J., Negash, A., Norman, P. J., Scelza, B., Uren, C., Shedd, N., Weng, Z., Ranasinghe, R., … Barreiro, L. B. (2026). Genomic signatures of recent human adaptation to the foraging-to-farming transition. Nature Ecology & Evolution. 10.1038/s41559-026-03227-7
  5. Mazet, O., Rodríguez, W., Grusea, S., Boitard, S., & Chikhi, L. (2015). On the importance of being structured: instantaneous coalescence rates and human evolution—lessons for ancestral population size inference? Heredity, 116(4), 362–371. 10.1038/hdy.2015.104