INTERACTIVE MODEL · VOLUME 1, ISSUE 1 · FALL 2024
The Drift Laboratory
Read the full article · Everything below runs in your browser, offline, with a seed you can set
The article measures one thing: how often a beneficial mutation survives. Below you can produce that measurement yourself. The first model runs whole populations and lets you watch the frequency of a new mutation wander up and down until it either takes over or disappears. The second accumulates those runs into an estimate and drops it onto the two classical prediction curves, so you can see how many trials it takes before the estimate means anything.
Both models use the same Wright-Fisher step as the study: multiply the frequency by 1 + s, renormalise, then draw the next generation's copy count from a binomial. The random number generator is seeded, so the same settings and the same seed give the same run every time.
Model 1: watch the populations
Each pale line is one population. The mutation starts at whatever copy number you choose and is followed until it hits zero (lost) or 2N (fixed). Lines that reach the top fixed; lines that reach the bottom were lost. The strip underneath tracks your running estimate of the fixation probability against the value Kimura's formula predicts for these settings.
Press Run. Nothing has been simulated yet.
Things worth trying
Set s to 0 and watch how rarely anything reaches the top. Then set N to 50 and s to 0.002, which gives 4Ns = 0.4, and notice that the picture barely changes: the advantage is too small for the population to notice. Now raise s to 0.1 at the same N and watch the lines that survive the first twenty generations climb almost without interruption.
The starting copy number is the other lever. A mutation that begins at five copies instead of one is roughly five times as likely to survive, because five independent lineages have to fail instead of one. That is the whole of the early-loss effect, and it is why the fixation probability is proportional to the starting frequency while that frequency is small.
Model 2: land your points on the curves
Here the model runs the same populations at eight selection coefficients at once and plots your
measured fixation probability at each one. The dashed line is Haldane's 2s. The solid curve
is Kimura's (1 − e−2s) / (1 − e−4Ns)
for the population size you picked. Your points start scattered and walk onto the curve as replicates accumulate.
Press Run. No replicates yet.
What to look for
At N = 50 the left-hand points sit far above the dashed 2s line, because in a population that small the outcome is drift rather than selection. At N = 5000 the two predictions lie almost on top of each other everywhere except at the far right, where the dashed line pulls away above both your points and Kimura's curve. That gap is the three percent effect the article chases down in §7, and with 20,000 replicates per point you can usually see it.
The relative standard error readout is the honest one. Watch how long it takes to get below ten percent at the smallest s, and compare that with how quickly the right-hand points settle. Rare events are expensive to measure, and that cost is the reason the study's neutral cell needed six million replicates.