Peter Ralph
University of Oregon
Institute of Ecology and Evolution
Evolution 2021
slides: github:petrelharp/evolution_2021
In this talk:
Do your digital organisms:
If so, then coalescent simulation is the way to go!
sweep_model = msprime.SweepGenicSelection(
position=2.5e4, s=0.01,
start_frequency=0.5e-4, end_frequency=0.99, dt=1e-6)
sts = msprime.sim_ancestry(9,
model=[sweep_model, msprime.StandardCoalescent()],
population_size=1e4, recombination_rate=1e-8, sequence_length=5e4)
dem = msprime.Demography.from_species_tree(
"((A:900,B:900)ab:100,C:1000)abc;",
initial_size=1e3)
samples = {"A": 2, "B": 1, "C": 1}
ts = msprime.sim_ancestry(
8, demography=dem, sequence_length=5e4,
recombination_rate=1e-8
)
mts = msprime.sim_mutations(ts, rate=1e-7)
mts.draw_svg()
Getting started:
tskit: the tree sequence toolkit
msprime
: quadratic in \(N_e L\)
SLiM
: linear in \(N_e T\)
Big picture: how accurate do you think your demographic model reflects 2N generations ago, really?
takeaway: hundreds of thousands of megabases takes seconds
takeaway: hundreds of thousands of megabases takes seconds
takeaway: linear in population size
takeaway: seconds per thousand individuals per thousand generations
takeaway: similar, but slower by a factor of 3 for lots of positive mutations
takeaway: 3x slower than genomes! Scales with neighborhood size (\(\sigma^2\)).
SLiM: the mailing list
msprime/tskit: “discussions” on github
Get involved! Suggest features, write documentation, write code…