Drift Lab

A population genetics simulator you can check. Watch what happens to a genome when harmful mutations arrive faster than natural selection can remove them.

Natural selection cannot see a mutation whose effect is smaller than the noise of luck.  How small is too small depends on population size, and the boundary is sharp: about 1 in 2N​e. Mutations below it drift, and drift does not care which direction is better.  Drift Lab simulates a population and reports what that costs over thousands of generations.

Everything here is textbook population genetics — Wright–Fisher with selection, drift and mutation. Nothing is invented for the occasion.  The Verify tab grades the code against results Kimura, Watterson and Haldane worked out on paper, and the Code tab shows every line that runs.  Companion article: Genetic Entropy.

Change anything here, then press Run on the Results tab.  Every box has a ? beside it explaining in plain English what the setting is and why it matters.  No genetics background assumed.

Where to run it

What this is

A forward-time population genetics simulator that runs in the browser.  Two models.

Sites -- tracks the frequency of every functional site that is currently varying in the population.  Each site needs one particular letter out of four; mutation takes it away at rate mu and brings it back at mu/3.  Set the site count high, as a real genome has, and back mutation is negligible on any timescale you can watch -- that is the classical infinite-sites model.  Set it low and the same code reaches a real equilibrium in a few hundred thousand generations, which is how the "back mutation saves you" objection gets tested rather than argued about.

This kernel is deliberately the best possible case for natural selection: free recombination, so no mutation is ever dragged along by a bad neighbour; fitness exactly equal to the genome, with no luck involved; and a population that can never shrink.  Whatever degradation shows up here cannot be blamed on a stacked model.  It is the one with a WebGPU version, because it is the one that needs to run for a hundred thousand generations.

Genomes -- real individuals: two copies of a genome divided into linkage blocks across chromosomes, with crossovers at a genetic map length you set.  Adds environmental noise, so selection has to see through luck; finite fecundity; and a choice of selection schemes including truncation. Slower, and it cannot run as long, which is why it is the check rather than the workhorse.

Fitness and information are reported separately, and they can move in opposite directions.  That is not a quirk of the model, it is the empirical situation: losing a feature you do not currently need raises fitness, and surveys of laboratory evolution find loss of function to be the usual route to adaptation.  Information here is Hazen and Szostak's functional information in its simplest case -- a site needing one specific letter out of four carries 2 bits -- counted over sites still carrying the letter their job requires.

What it is not

It is not a model of any particular species, and it cannot tell you how much of the human genome is functional -- that is a live scientific dispute and it is the largest uncertainty in this whole subject.  What it can tell you is what follows given a functional fraction, which is why the deleterious mutation rate U is the first thing you set.

Shannon entropy of the DNA sequence is deliberately not used as an information measure.  Random noise has maximum Shannon entropy, so by that measure mutations create information.  Any argument built on it collapses on contact.

Sources for the default parameter values

  • Mutation rate: about 70 new mutations per person per generation (Kong et al. 2012; Jonsson et al. 2017).
  • Distribution of harm: gamma with shape near 0.2 (Eyre-Walker & Keightley 2007; Boyko et al. 2008; Kim et al. 2017).
  • Human effective population size: on the order of 10,000 (Eyre-Walker & Keightley 2007 and many others).
  • Fraction of the genome under constraint: 8-10% by comparative genomics (Rands et al. 2014; Christmas et al. 2023), higher on functional-genomics grounds.

Licence

Public domain.  Take it, break it, and check it.