}

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)