3.1 A Basic SLiM Simulation
Our first simulation will be a lightly modified version of the script that comes up when we first open the SLiM graphical user interface (GUI). It is a simple simulation tracking one population, with no selection:
// set up a simple neutral simulation
initialize() {
initializeMutationRate(1e-7);
// m1 mutation type: neutral
initializeMutationType("m1", 0.5, "f", 0.0);
// g1 genomic element type: uses m1 for all mutations
initializeGenomicElementType("g1", m1, 1.0);
// uniform chromosome of length 100 kb with uniform recombination
initializeGenomicElement(g1, 0, 99999);
initializeRecombinationRate(1e-8);
}
// create a population of 500 individuals
1 early() {
sim.addSubpop("p1", 500);
}
2000 late() {
sim.outputFixedMutations();
}