Available Recipes

01 Migration: migration models

Tested

This recipe uses one simulated data set from three island populations and analyses it with different migration models: every rate free, some rates zero, symmetric rates, and the n-island model. It shows how to write the migration matrix, how to compare the models, and how to choose between M and the number of immigrants 4Nm. Read 00-basics first.

Open recipe: 01 Migration: migration models

02 Divergence: population splits

Tested

This recipe estimates when populations split. It uses two simulated data sets: two populations that split once, and three populations that split one after the other. It shows how to write a split in the migration matrix, with and without gene flow after the split, how to read the divergence parameters, how their priors matter, and how to compare population trees. Read 00-basics and 01-migration first.

Open recipe: 02 Divergence: population splits

03 Growth: populations that grow or shrink

Tested

This recipe estimates exponential growth. It uses simulated data sets: one population that grows, one at constant size, one that shrinks, and two populations of which one grows. It shows how to switch growth on, how to read the growth rate, why its estimate is biased upward and how more loci fix that, how to test whether a population grows at all, and applies this to a real mitochondrial data set of a frog. Read 00-basics and 01-migration first.

Open recipe: 03 Growth: populations that grow or shrink

04 Skyline: population sizes and migration rates through time

Tested

This recipe estimates how Theta and M change through time. Migrate has two skylines: an empirical one, read from the sampled genealogies of an ordinary run, and a parametric one (skyline=PARAM), in which Theta or M get a multiplier per time segment that is estimated with the other parameters. The data are simulated: a constant population, one that expanded, one that declined, the expansion with ancient samples (tip dates), and two populations whose migration rate changed. Read 00-basics, 01-migration and 03-growth first; section 6 uses the tip dates of 02-divergence.

Open recipe: 04 Skyline: population sizes and migration rates through time

05 Model selection: marginal likelihoods and heating

Tested

Which migration model fits the data better: one with migration in both directions, one with equal rates, or one with migration in one direction only? Migrate answers this with the marginal likelihood of each model and Bayes factors. This recipe shows where the marginal likelihoods are in the outfile, checks the four estimators against an exact value, and then asks how often they pick the true model in simulated data, and how many heated chains that needs. Read 00-basics and 01-migration first.

Open recipe: 05 Model selection: marginal likelihoods and heating

06 Assignment: individuals of unknown origin

Tested

Some individuals in a data set may have no known population: a bird caught between forests, a sample with a lost label, a possible migrant. Migrate can estimate where such individuals come from while it estimates the population sizes and migration rates. This recipe shows how to mark them, how to read the assignment table, how well assignment works in simulated data, and applies it to the Taita thrush, a bird living in three forest fragments in Kenya. Read 00-basics and 01-migration first.

Open recipe: 06 Assignment: individuals of unknown origin

07 Haplotyping: unphased diploid sequences

Tested

Sequencing a diploid individual gives its genotype: at every heterozygous site two bases, but not which bases sit together on one chromosome. Migrate needs haplotypes. This recipe simulates data with known haplotypes, turns them into what a sequencing experiment delivers, and compares three ways to analyse them: the true haplotypes, an arbitrary phase taken as known, and migrate’s haplotyping, which samples the phase together with the genealogy. Read 00-basics and 01-migration first.

Open recipe: 07 Haplotyping: unphased diploid sequences

08 Mittag-Leffler: the fractional coalescent

Tested

The Kingman coalescent assumes exponential waiting times between events. The Mittag-Leffler (fractional) coalescent replaces them with heavy-tailed waiting times governed by a parameter alpha (alpha = 1 is Kingman). This recipe simulates data under the fractional coalescent, estimates alpha in one and two populations, shows when alpha can and cannot be estimated, and compares the fractional and the Kingman model with marginal likelihoods. Read 00-basics, 01-migration and 05-model-selection first.

Open recipe: 08 Mittag-Leffler: the fractional coalescent

09 Mutation models and data types

Tested

Migrate needs a model for how the markers mutate. This recipe simulates data under a realistic DNA model (unequal base frequencies, transitions more frequent than transversions, rate variation among sites), adds sequencing errors, keeps only the variable sites (SNPs), and simulates microsatellites, and analyses each with the right and with simpler models. Read 00-basics and 05-model-selection first.

Open recipe: 09 Mutation models and data types

10 Loci and units: inheritance, mutation rates, and parameters in biological units

Tested

Real data sets combine loci that differ: nuclear, X-linked and mitochondrial loci have different effective population sizes, and loci mutate at different rates. This recipe shows how to tell Migrate about both, what goes wrong when one ignores them, and how to turn Migrate’s mutation-scaled parameters into population sizes, migration rates, numbers of migrants and years. Read 00-basics and 01-migration first.

Open recipe: 10 Loci and units: inheritance, mutation rates, and parameters in biological units

11a A published model as data: stdpopsim orangutans

Tested

stdpopsim is a catalogue of published demographic models with their mutation rates and generation times. A data set simulated from one of them is a realistic test: the true values are given in generations, years and numbers of individuals, and the model is not one that Migrate was written for. This recipe takes the two-species orangutan model of Locke et al. (2011), simulates DNA loci with stdpopsim, analyses them with the closest Migrate model (a split with migration and growth), converts the estimates to population sizes, migration rates and years, and compares them with the published values. Read 02-divergence, 03-growth and 10-loci-and-units first.

Open recipe: 11a A published model as data: stdpopsim orangutans

11b Ancient genomes and a population tree: stdpopsim hominins

Tested

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.

Open recipe: 11b Ancient genomes and a population tree: stdpopsim hominins

12 SNPs: linked and unlinked SNPs compared with full sequences

Tested

Many data sets today are SNPs: RADseq, SNP chips, or the variable sites picked out of genome data. This recipe shows how to write SNP data for Migrate, which datatype and options to use, and how close SNP estimates come to estimates from the full sequences of the same loci. Read 00-basics and 01-migration first; 09-mutation-models section 5 has a first SNP example.

Open recipe: 12 SNPs: linked and unlinked SNPs compared with full sequences