initialize() {
defineConstant("COUNT",50);
initializeSex("A");
initializeMutationRate(1e-7);
initializeMutationType("m1", 0.5, "f", 0.0);
initializeMutationType("m2", 0.5, "f", 0.01);
initializeGenomicElementType("g1", m1, 1.0);
initializeGenomicElement(g1, 0, 99999);
initializeRecombinationRate(1e-7);
}
1 early() {
for (i in 0:(COUNT-1))
sim.addSubpop(i, 500);
subpops = sim.subpopulations;
for (i in 1:(COUNT-1)) subpops[i].setMigrationRates(i-1, 0.2);
}
1 late() {
target=sample(p1.genomes,50);
target.addNewDrawnMutation(m2,rdunif(1,0,sim.chromosome.lastPosition));
}
1:1000 late() {
for (i in 1:(COUNT)) {
sweep = sim.mutationsOfType(m2);
if (size(sweep) > 0) {
for (j in 1:(COUNT)) {
freq = sim.mutationFrequencies(get(paste0("p", j)), sweep);
catn(sim.cycle + ": " + freq + " p" + j);
}
}
}
}
1:1000 late() {
for (i in 1:(COUNT)) {
sweep = sim.mutationsOfType(m2);
if (size(sweep) > 0) {
for (j in 1:(COUNT)) {
freq = sim.mutationFrequencies(get(paste0("p", j)), sweep);
catn(sim.cycle + ": " + freq + " p" + j);
}
}
}
}
--
SLiM forward genetic simulation: http://messerlab.org/slim/
---
You received this message because you are subscribed to the Google Groups "slim-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/slim-discuss/b31b78c7-336b-4751-b6e2-40dc16ec62aen%40googlegroups.com.