SLiM is a forwards-time population genetics simulator capable of simulating arbitrarily complex evolutionary scenarios. The underlying individual-based simulation engine is highly optimized to enable modeling of entire chromosomes in large populations. There is also a graphical user interface for easy simulation set-up, interactive runtime control, and dynamical visualization of simulation output.
initialize() {
initializeTreeSeq();
initializeMutationRate(1e-8);
initializeMutationType(
"m1", 0.5, "e", 0.001
);
initializeRecombinationRate(1e-8);
}
1 early() { sim.addSubpop("p1", 500); }
2000 late() {
sim.treeSeqOutput("out.trees");
}