Msprime is a Python package that simulates ancestral histories and DNA sequence data. Msprime uses backwards-in-time “coalescent” models which allows it to simulate data very efficiently; however, it is not as flexible as forwards-in-time simulators like SLiM or fwdpy11.
ts = msprime.sim_ancestry(
samples=10,
recombination_rate=1e-4,
sequence_length=1e6
)
ts = msprime.sim_mutations(ts, rate=1e-6)
Contributors
-
@jeromekelleher
-
@petrelharp
-
@benjeffery
-
@DomNelson
-
@hyanwong
-
@grahamgower
-
@ashander
-
@GertjanBisschop
-
@mmatschiner
-
@andrewkern
-
@fbaumdicker
-
@shajoezhu
-
@gtsambos
-
@apragsdale
-
@daniel-goldstein
-
@molpopgen
-
@castedo
-
@agladstein
-
@bguo068
-
@nikbaya
-
@cdquinto
-
@hugovk
-
@TPPSellinger
-
@awohns
-
@daikitag
-
@koelling
-
@jgallowa07