Draft: work in progress. This recipe is not finished yet; sections may be incomplete and results may change.

Status: draft (2026-11-20), sections 1-10 (section 9 and the end of section 8 added 2026-11-21, runs with 6.1.97 and 7.0.121). The 5 kb runs used migrate-n 6.1.96 (5.0.7 tree, commit 42bab43, which includes the fixes for fixed split priors and the x wildcard of bayes-priors); the 1 kb runs of section 7 an earlier 6.1.96 build.

11a took a two-population model from stdpopsim. This recipe takes a tree of four populations with ancient samples: modern humans, Neanderthals and Denisovans from the model of Jacobs et al. (2019), plus a chimpanzee outgroup. The archaic genomes are 50,000 to 200,000 years old, so their sampling ages enter the analysis through a date file (02-divergence, 07-haplotyping). The recipe shows what Migrate’s split model recovers from two ancient genomes, why adding more ancient genomes made the result worse here, and why loci of 1,000 sites were too short. Read 02-divergence, 10-loci-and-units and 11a first.

Contents

  1. The model
  2. The data
  3. The Migrate model and the parmfile
  4. Results: the Altai pair
  5. Converting to years
  6. More ancient genomes
  7. Short loci
  8. A matched-model control
  9. Which archaic lineage continues?
  10. What next

1. The model

stdpopsim HomSap, model PapuansOutOfAfrica_10J19 (Jacobs et al. 2019, Cell 177:1010). Backward in time (lineage view), in generations of 29 years:

  • the sampled Neanderthal lineage (Altai Neanderthal, 2612 generations, 76 ky) joins the sampled Denisovan lineage (Altai Denisovan, 2058 generations, 60 ky) at 15,090 generations (438 ky);
  • the archaic ancestor joins the modern human lineage (Yoruba, YRI) at 20,225 generations (587 ky);
  • the model also has migration among modern populations and archaic admixture into Eurasians and Papuans. We sample only YRI, so these reach our samples only through the small migration between YRI and the out-of-Africa lineage.

stdpopsim has no chimpanzee in a human model, so we add one: the chimpanzee lineage joins the human root at 225,000 generations (6.5 My), with Ne 20,000 for chimpanzees and 50,000 for the human-chimpanzee ancestor. These three numbers are our assumptions. Mutation rate 1.4e-8 per site and generation.

The population sizes change along every lineage (data/truth.json, entry epochs). For the populations Migrate will see:

Migrate populationEpochs, backward in time (generations: Ne)
1 Chimp0-225,000: 20,000; then the human-chimp ancestor: 50,000
2 Human0-2,218: 48,433; 2,218-20,225: 41,563; then the archaic-human ancestor: 32,671
3 Denisovan2,058-9,750: 5,083; 9,750-15,090: 100 (bottleneck); then the archaic ancestor: 13,249
4 Neanderthal2,612-3,375: 826; 3,375-15,090: 13,249

2. The data

scripts/simulate_hominins.py runs stdpopsim (msprime engine, JC69 mutations) for 100 independent loci of 5,000 sites with stdpopsim’s mean human recombination rate (1.25e-8 per site and generation). Two designs:

DesignSamples (sequences)FilesSegregating sites per locus
Altai pair2 chimpanzees (4), 5 YRI (10), Altai Denisovan (2), Altai Neanderthal (2)data/hominins{10,100}.txt, data/hominins.dates75
All archaicsas above, plus Denisova 25 (200 ky), a second Altai Neanderthal (110 ky), Chagyrskaya 8 (80 ky), Vindija 33.19 and Thorin (50 ky): 4 Denisovan and 10 Neanderthal sequencesdata/hominins_all{10,100}.txt, data/hominins_all.dates82

The 10 files hold the first 10 loci of the 100 files. The date files give the sampling age of every sequence in years. The all-archaics design also comes with five populations, the Neanderthals split into Altai (the two Altai genomes) and late Neanderthals (Chagyrskaya, Vindija, Thorin), as in the stdpopsim model: data/hominins_all5pop{10,100}.txt and data/hominins_all5pop.dates.

data/hominins1kb{10,100}.txt and data/hominins1kb_all{10,100}.txt are the first attempt with loci of 1,000 sites (15-17 segregating sites per locus, section 7).

data/truth.json holds the model values on Migrate’s scale (Theta = 4 Ne u, D = generations x u).

The 100-locus files of 5 kb (hominins100.txt, hominins_all100.txt, hominins_all5pop100.txt, and the control files control100.txt and control_all100.txt of section 8; 56 MB together) are not in the repository; run scripts/simulate_hominins.py and scripts/simulate_control.py to make them (fixed seeds, the same files with the same stdpopsim and msprime versions).

3. The Migrate model and the parmfile

Populations: 1 Chimp, 2 Human, 3 Denisovan, 4 Neanderthal. In Migrate’s split model the first population of each split continues the ancestral lineage, so backward in time Neanderthal lineages move into population 3 at D_3->4, the archaic lineages into population 2 at D_2->3, and the human lineages into population 1 at D_1->2. There is no migration:

custom-migration={*000 d*00 0d*0 00d*}
divergence-distrib=N
tipdate-file=YES:hominins.dates
generation-per-year=0.0344828
mutationrate-per-generation={1.4e-8}
bayes-priors= THETA * * LOGUNIFORMPRIOR: 0.00001 0.01 1.0
bayes-priors= SPLIT 1 2 GAMMAPRIOR: 0.0 0.003 0.01 2.0
bayes-priors= SPLIT 2 3 GAMMAPRIOR: 0.0 0.0005 0.002 2.0
bayes-priors= SPLIT 3 4 GAMMAPRIOR: 0.0 0.0005 0.002 2.0
bayes-priors= SPLIT * * GAMMAPRIOR: 0.0 0.001 0.01 2.0
bayes-priors= SPLITSTD * * EXPPRIOR: 0.0 0.00005 0.001
bayes-proposals= DIVERGENCE MULTIPLIER Sampler
long-sample=40000
joint-samples=10000
heating=YES:1:POWER:5
  • The sampling ages are converted to Migrate’s scale with the generation time (1/29 generations per year) and the mutation rate.
  • The Theta sizes span three orders of magnitude (the Denisovan bottleneck of Ne 100 to the human Ne near 50,000), so Theta gets a log-uniform prior.
  • Each split gets its own gamma prior with a mean near the order of magnitude we expect; a single prior for all three splits (as in the short runs of section 7) is either too wide for the archaic splits or too narrow for the chimpanzee split. The last SPLIT * * line covers any split not listed.
  • The multiplier proposal moves split times on a log scale, which suits split times that differ by a factor 15.

scripts/make_parmfiles.sh writes all parmfiles: loci{10,100} (Altai pair), all{10,100}, all5pop{10,100} (five populations, custom-migration={*0000 d*000 0d*00 00d*0 000d*}, with an extra prior for SPLIT 4 5), and the short-loci parmfiles short* (section 7).

What Migrate’s model cannot express: a Migrate population has one Theta for its whole history, including the ancestral stretch it continues after a split. Theta_1 has to stand for the chimpanzees and the human-chimp ancestor, Theta_3 for the Denisovans, their bottleneck and the archaic ancestor (section 1).

Run times on the cluster, one MPI process per locus plus the master: 26-36 minutes for 10 loci (11 processes) and 43-96 minutes for 100 loci (101 processes).

4. Results: the Altai pair

hominins100.txt, Joint medians and 95% intervals:

ParameterTrueJointAll
Theta_1 (Chimp)0.00112 (0.00280 for the ancestor)0.00117 [0.00102-0.00131]0.00130 [0.00116-0.00137]
Theta_2 (Human)0.00271 today, 0.00183 ancestral0.00307 [0.00283-0.00328]0.00288 [0.00268-0.00308]
Theta_3 (Denisovan)0.00028 / 0.0000056 / 0.000740.00016 [0.00011-0.00020]0.00033 [0.00022-0.00036]
Theta_4 (Neanderthal)0.000046 / 0.000740.00044 [0.00032-0.00058]0.00040 [0.00028-0.00057]
D_3->4 (Neanderthal-Denisovan)0.0002110.00027 [0.00025-0.00030]0.00018 [0.00015-0.00021]
D_2->3 (archaic-human)0.0002830.00030* [0.00027-0.00033]0.00037 [0.00036-0.00040]
D_1->2 (human-chimp)0.003150.00408 [0.00388-0.00425]0.00414 [0.00391-0.00428]

() Joint row: flagged as noisy by the bootstrap over each locus' genealogies (00-basics, section 8). The joint combination did not collapse: median reweighting ESS 70.

Population trees with the estimated split times

The figure (scripts/plot_tree.py) draws the tree at the Joint medians with their intervals and the true split times (open diamonds); the lower panel is the all-archaics run of section 6. At this scale most 50% intervals are narrower than the median dot, and the 95% intervals show only as short stubs: the estimates are precise, but the true values lie outside most of them.

  • The archaic-human split is recovered: its interval contains the truth.
  • The Neanderthal-Denisovan split is 28% too old; its interval just misses the truth.
  • The human-chimp split is 30% too old. This is the ancestral size: a human and a chimpanzee lineage coalesce on average at 225,000 + 2 x 50,000 = 325,000 generations, and a model whose population 1 has Theta_1 near 0.0012 (Ne about 22,000) after the split can match this only by moving the split back to about 0.0039. Migrate cannot give the ancestor its own size in this model (11a, section 8 does it with an unsampled ancestor).
  • The Theta values each stand for a mixture of epochs. Theta_4 (Ne about 7,900) lies between the Neanderthal sizes 826 and 13,249; Theta_3 (Ne about 2,900) lies between the Denisovan sizes, pulled down by the bottleneck.
  • All differs from Joint for the archaic splits; as in 11a, report the Joint rows.

With 10 loci (hominins10.txt) the joint combination collapsed (median reweighting ESS 45, every row starred): D_3->4 0.00017 [0.00006-0.00029] and D_2->3 0.00024 [0.00015-0.00035] contain the truth only because they are wide.

5. Converting to years

Years = D / u x 29, with u = 1.4e-8 (Joint medians of section 4):

SplitEstimateTruth
Neanderthal-Denisovan559 ky [518-621]438 ky
archaic-human621 ky [559-684]587 ky
human-chimp8.45 My [8.04-8.80]6.5 My (our assumption)

As in 11a, every number in years is only as good as the mutation rate and the generation time; with u = 1.25e-8 (another common value) every age would be 12% older.

6. More ancient genomes

Adding the other high-coverage archaic genomes (hominins_all*) should help: more lineages reach the archaic splits. It did not:

DesignLociMedian reweighting ESSD_3->4 (true 0.000211)D_2->3 (true 0.000283)D_1->2 (true 0.00315)
Altai pair10450.00017* [0.00006-0.00029]0.00024* [0.00015-0.00035]0.00416*
Altai pair100700.00027 [0.00025-0.00030]0.00030* [0.00027-0.00033]0.00408
All archaics10290.00034* [0.00024-0.00041]0.00038* [0.00028-0.00044]0.00356*
All archaics100180.00037* [0.00035-0.00039]0.00038* [0.00036-0.00040]0.00392*
Five populations10150.00031* [0.00025-0.00036]0.00035* [0.00030-0.00040]0.00338*
Five populations10060.00036* [0.00034-0.00039]0.00037* [0.00035-0.00040]0.00399*

(Five populations: also D_4->5, late Neanderthals joining Altai, true 0.0000473: 0.00006* [0.00003-0.00009] at 100 loci.)

Every all-archaics joint combination collapsed (median reweighting ESS below 50), and it got worse with more loci and with the fifth population. The estimates of both archaic splits are 30-75% too old with narrow intervals that miss the truth: confident and wrong. The two archaic splits also run into each other (0.00037 and 0.00038): the model nearly merges them.

A likely reason is the model mismatch of section 3, which grows with the added genomes. Every new archaic genome is sampled inside an epoch where the size changes: Denisova 25 (6,897 generations) lies in the Ne 5,083 epoch, just before (backward in time) the bottleneck of Ne 100; the second Altai Neanderthal is older than the merge of the two Neanderthal lineages (3,375 generations) and lies in the Ne 13,249 epoch; the late Neanderthals come from a lineage of Ne 13,249 while the Altai Neanderthal’s lineage has Ne 826. A single Theta per population cannot fit all of them, and with more loci the posterior sits ever more firmly on the wrong compromise. Splitting the Neanderthals into two populations (five-population design) follows the stdpopsim model more closely but adds a split with little information (D_4->5 is short) and a population (late Neanderthals) whose lineages rarely coalesce before they join the Altai lineage, so Theta_5 is weakly determined; the joint combination got worse, not better. Section 8 confirms that most of the bias comes from the mismatch.

Use a collapsed joint combination as a warning, not as a result: the outfile says so below the parameter table, and the All row is no rescue (00-basics, section 8).

7. Short loci

The first runs used loci of 1,000 sites (15-17 segregating sites per locus), a uniform Theta prior (0-0.01), one gamma prior for all splits (mean 0.001), the Metropolis-Hastings proposal for the split times and joint-samples=40000 (parmfiles short{10,100} and shortall{10,100}):

DesignLociMedian reweighting ESSD_3->4 (true 0.000211)D_2->3 (true 0.000283)D_1->2 (true 0.00315)
Altai pair10190.00024* [0.00012-0.00059]0.00033* [0.00021-0.00069]0.00313*
Altai pair10090.00028* [0.00023-0.00034]0.00032* [0.00027-0.00040]0.00336*
All archaics10110.00040* [0.00017-0.00058]0.00048* [0.00027-0.00077]0.00351*
All archaics10070.00034* [0.00031-0.00037]0.00040* [0.00035-0.00044]0.00377*

Every joint combination collapsed, also for the Altai pair at 100 loci. The two archaic splits are 5,135 generations apart; along one lineage of a 1,000-site locus that interval collects on average 0.07 mutations (0.36 with 5,000 sites), so each locus’ genealogies are compatible with a wide range of split times, and the genealogies one locus samples rarely fit the parameters the other 99 prefer. Longer loci give each locus a sharper genealogy: with 5,000 sites the Altai pair works at 100 loci (section 4). The 1 kb runs took 1.5-3.3 hours, longer than the 5 kb runs, probably because of the larger joint-samples.

8. A matched-model control

scripts/simulate_control.py simulates the same samples, sampling ages, split times and 5 kb loci under exactly the model Migrate fits: one constant Ne per population (Chimp 20,000, Human 40,000, Denisovan 10,000, Neanderthal 5,000), no migration and no recombination within a locus (data/control{10,100}.txt, data/control_all{10,100}.txt, data/truth_control.json; parmfiles control* and controlall*, same setup as section 3). If the archaic splits are recovered here but not in section 6, the bias there comes from the model mismatch, not from the joint combination.

Joint medians and 95% intervals (truth: D_3->4 0.000211, D_2->3 0.000283, D_1->2 0.00315; Theta 0.00112, 0.00224, 0.00056, 0.00028):

DesignLociMedian reweighting ESSD_3->4D_2->3D_1->2
Altai pair10200.00023* [0.00014-0.00037]0.00034* [0.00022-0.00040]0.00344* [0.00283-0.00369]
Altai pair100270.00021* [0.00018-0.00025]0.00029* [0.00026-0.00033]0.00314* [0.00301-0.00327]
All archaics10180.00026* [0.00019-0.00034]0.00034* [0.00022-0.00046]0.00344* [0.00298-0.00399]
All archaics100160.00023* [0.00021-0.00026]0.00034* [0.00031-0.00036]0.00304* [0.00290-0.00319]

The Theta values are recovered too (Altai pair, 100 loci: 0.00116, 0.00230, 0.00046, 0.00022; all archaics, 100 loci: 0.00100, 0.00229, 0.00052, 0.00028; every interval contains the truth).

  • With the matched model the Altai pair at 100 loci recovers all three splits almost exactly. The 28% too old Neanderthal-Denisovan split and the 30% too old human-chimp split of section 4 are gone, so both came from the model mismatch (the changing population sizes and, for the human-chimp split, the large ancestor).
  • With all archaics at 100 loci the Neanderthal-Denisovan split is recovered (0.00023 against 0.00037 in section 6), but the archaic-human split stays 20% too old with an interval that misses the truth (0.00034 against 0.00038 in section 6). Most of the section 6 bias is the model mismatch; the rest comes with the collapsed joint combination.
  • Every control run collapsed (median reweighting ESS 16-27), although the model is right, while the stdpopsim Altai pair at 100 loci did not (ESS 70) and gave biased splits. The reweighting ESS checks whether the stored genealogies of each locus suffice to combine the loci; it says nothing about whether the model fits. A collapsed joint row is unchecked, not necessarily wrong (the Altai-pair control is right), and a healthy one can still be biased by a model that does not fit the data.
  • The All rows are no better: All puts the Altai-pair control’s archaic splits at 0.00015 and 0.00036, both outside their truths.

Run time: 25-31 minutes per run (11 or 101 MPI processes on beerli_q).

The remaining 20% of the all-archaics control is not chance. Rerun with two other seeds, with three replicates per locus, with four times more stored genealogies (joint-samples=40000), with split priors centred near the truth or flat, and with Migrate 7, the joint archaic-human split stays at 0.00031-0.00035. It is already present per locus: the median of the 100 per-locus medians is 0.00036, and 87% of the per-locus 95% intervals contain the truth. Without sampling ages (the same control simulated with all samples at age 0) it shrinks to about 12% (0.00031-0.00032), so the dated samples account for part of it. The Neanderthal-Denisovan split, which has no split below it, is unbiased per locus in all of these runs.

9. Which archaic lineage continues?

The model of section 3 lets the Neanderthals split off the Denisovans: backward in time the Neanderthal lineages join population 3, and the archaic ancestor between the two archaic splits has the Denisovan Theta_3. The reverse is just as possible in Migrate’s model: the Denisovans split off the Neanderthals, which then split off the humans, and the archaic ancestor has the Neanderthal Theta_4:

custom-migration={*000 d*00 00*d 0d0*}
bayes-priors= SPLIT 1 2 GAMMAPRIOR: 0.0 0.003 0.01 2.0
bayes-priors= SPLIT 2 4 GAMMAPRIOR: 0.0 0.0005 0.002 2.0
bayes-priors= SPLIT 4 3 GAMMAPRIOR: 0.0 0.0005 0.002 2.0

(row 3, Denisovan, splits off column 4; row 4, Neanderthal, splits off column 2; the priors are those of section 3 under the new labels D_2->4 and D_4->3). The marginal likelihoods decide between the two directions. Use the row for independent parameters: the joint row comes from a collapsed joint combination here, and the outfile says so below the table.

All archaics, 100 loci, log marginal likelihoods (independent parameters):

DataDirectionBTISS
matched-model control (section 8; true direction: Neanderthals off Denisovans)Neanderthals off Denisovans-766,473.5-765,191.4
Denisovans off Neanderthals-766,492.5-765,213.1
stdpopsim (section 6)Neanderthals off Denisovans-783,264.5-782,183.7
Denisovans off Neanderthals-783,124.5-782,025.2
  • On the control the true direction wins by 19-22 log units. The joint row would have preferred the wrong one (by 18): another reason to ignore a collapsed joint row.
  • On the stdpopsim data the reverse direction wins by 140-160 log units.

Joint split times of the stdpopsim data (truth: Neanderthal-Denisovan 0.000211, archaic-human 0.000283):

DirectionNeanderthal-DenisovanArchaic-human
Neanderthals off Denisovans0.00037* [0.00035-0.00039]0.00038* [0.00036-0.00040]
Denisovans off Neanderthals0.00028* [0.00026-0.00031]0.00043* [0.00041-0.00047]

The preferred direction puts the Neanderthal-Denisovan split much closer to the truth and separates the two archaic splits again, but moves the archaic-human split further away. In the stdpopsim model the archaic ancestor has a size of its own; Migrate has to borrow it from one of the two daughters, and the Denisovan Theta_3 is tiny (0.00011, shaped by the bottleneck of section 1) while the Neanderthal Theta_4 is 0.00107. The direction that wins is the one whose borrowed size fits the ancestor better, not a statement about which archaic group is “older”. On the control, where the true model is in the set, the marginal likelihood finds it; on the real model neither direction is right, and the comparison picks the less wrong one.

Run time: 44-50 minutes per run (101 MPI processes on backfill2).

10. What next

  • An unsampled archaic ancestor (as in 11a, section 8) would give the archaic ancestor its own size instead of borrowing Theta_3, and a skyline (04-skyline) could give the Denisovan bottleneck its own segment.
  • Real data: the high-coverage archaic genomes are public; a cookbook with real BAM-derived loci would face the same questions plus sequencing error and ancient-DNA damage.

References

Jacobs GS et al. (2019) Multiple deeply divergent Denisovan ancestries in Papuans. Cell 177:1010-1021.

Adrion JR et al. (2020) A community-maintained standard library of population genetic models. eLife 9:e54967.

Available Materials