Hello everyone,
I'm currently using SLiM 5 to simulate population divergence under various migration rates. For each parameter set, I ran 100 replicate simulations and calculated the average FST values using calcFST(). When I'm comparing the resulting FST values to the theoretical expectations based on Wright’s island model. However, I’ve consistently found that the FST values produced by SLiM are approximately one-fourth of the expected values.
For example, with two populations of 10,000 diploid individuals and a symmetric migration rate of 0.001, the expected FST (using the formula FST = 1 / (4Nm + 1)) is ~0.024; however, SLiM consistently reports a value of around 0.006.
I would like to know if this is expected behavior in SLiM, or if I’m missing something important in the manual?
Bless,
Ariel
--
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 visit https://groups.google.com/d/msgid/slim-discuss/8a4bda88-3394-4631-a9b9-ac00a7447436n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/slim-discuss/6605c805-6e1a-4f63-a9a2-32e49e29d53cn%40googlegroups.com.
initialize() {
initializeMutationRate(1e-7);
initializeMutationType("m1", 0.5, "f", 0.0);
initializeGenomicElementType("g1", m1, 1.0);
initializeGenomicElement(g1, 0, 999999);
initializeRecombinationRate(1e-8);
}
1 early() {
sim.addSubpop("p1", 1000);
sim.addSubpop("p2", 1000);
p1.setMigrationRates(p2, 0.001);
p2.setMigrationRates(p1, 0.001);
log = community.createLogFile("sim_log.txt", logInterval=10);
log.addCycle();
log.addCustomColumn("FST", "calcFST(p1.haplosomes, p2.haplosomes);");
}
20000 late() { }
With N = 1000 and m = 0.001, the expected Fst = 1/(1 + 4Nm) = 0.2, but the value recorded in the log-file fluctuates around a value of approximately 0.5. It would be nice to have an explanation for this discrepancy. Is my interpretation of parameters wrong?
Best wishes,
Michael.
--
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 visit https://groups.google.com/d/msgid/slim-discuss/f71ecbb8-c3de-48a4-915e-e2b58a3e6231n%40googlegroups.com.
initialize()
{
initializeMutationRate(1e-7);
initializeMutationType("m1", 0.5, "f", 0.0);
initializeGenomicElementType("g1", m1, 1.0);
initializeGenomicElement(g1, 0, 999999);
initializeRecombinationRate(1e-8);
}
1 late()
{
sim.addSubpop("p1", 1000);
sim.addSubpop("p2", 1000);
p1.setMigrationRates(p2, 0.001);
p2.setMigrationRates(p1, 0.001);
defineConstant("LOG", community.createLogFile("sim_log.txt"));
LOG.addCycle();
LOG.addCustomColumn("FST", "calcFST(p1.haplosomes, p2.haplosomes);");
}
late()
{
if (sim.cycle % 10 == 0)
{
LOG.logRow();
cycles = slimgui.logFileData(LOG, "cycle");
fst = slimgui.logFileData(LOG, "FST");
plot = slimgui.createPlot("FST",
xrange=c(1, community.estimatedLastTick()), yrange=c(0, 1),
xlab="cycle", ylab="FST", width=1000, height=300);
plot.lines(cycles, fst);
if (sim.cycle > 10000)
{
equilibrated_cycles = (cycles >= 10000);
mean_fst = mean(fst[equilibrated_cycles]);
plot.abline(h=mean_fst, color="black");
plot.text(50000, mean_fst + 0.03, labels=format("%.4f", mean_fst));
}
}
}
50000 late()
{
initialize() {
defineConstant("d", 3); // number of demes
defineConstant("N", 1000); // local population size
defineConstant("m", 0.001); // migration rate
defineConstant("TMAX", 20000); // number of generations
initializeMutationRate(1e-7);
initializeMutationType("m1", 0.5, "f", 0.0);
initializeGenomicElementType("g1", m1, 1.0);
initializeGenomicElement(g1, 0, 99999);
initializeRecombinationRate(1e-8);
}
1 early() {
for(i in 1:d){
sim.addSubpop(paste0("p" + i), N);
}
for(pi in sim.subpopulations)
for(pj in sim.subpopulations) {
if (pi != pj) pi.setMigrationRates(pj, m/(d-1));
}
log = community.createLogFile("fst_log.txt", logInterval=10);
log.addCycle();
log.addCustomColumn("FST", "calcFST(p1.haplosomes, p2.haplosomes);");
catn("expected Fst = " + 1/(1 + 4 * N * m * (d/(d-1))^2));
}
TMAX late() {
fst = readCSV("fst_log.txt", colTypes = "ff");
fst = fst.asMatrix();
plot = slimgui.createPlot("Fst between demes 1 and 2",
xrange=c(0,TMAX),
xlab="Generation", ylab="Fst");
plot.lines(fst[,0], fst[,1], "black"); // fst over time
x = length(fst[,1]);
catn("Mean Fst = " + mean(fst[asInteger(x/2):(x-1),1])); // second half of simulation
}
Best wishes,
Michael.
To unsubscribe from this group and stop receiving emails from it, send an email to slim-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/slim-discuss/01ded0d1-343c-44c2-b0c5-712daab256f3n%40googlegroups.com.