The Probability Simulator
How likely is it to reach a particular sequence of L positions, each holding one of K building blocks? The answer depends entirely on the process you assume. Here are three, each with its own assumptions. A random-sequence probability is not the probability of evolution, and the gap between the models shows why.
These models ask how a new sequence is reached. Whether existing sequences decay as mutations pile up is a separate question: see Genetic entropy.
Dawkins' weasel. Richard Dawkins' illustration of cumulative selection (The Blind Watchmaker, 1986): a 28-character target, with every correct letter rewarded. Its target is fixed in advance, which is the main objection raised against it, and Dawkins himself called it misleading in that respect.
| Changes to a specific other block per position, ν = μ/(K−1) | 1 in 650 |
|---|---|
| Functional steps still needed | 28 |
| Positions per step, r | 1 |
| Chance an offspring takes the next step (first step) | 1.43% |
| Generations needed (fitness-level bound) | 92.4 |
The formula used
ν = μ / (K − 1)
sm = 1 − (1 − m·νr·(1 − μ)L−r)N
E[generations] ≤ Σm 1 / sm
- μ
- chance each position mutates in an offspring
- ν
- chance it becomes one particular other block
- r
- positions that must all be right before a step counts (now 1)
- m
- functional steps still incomplete
- N
- offspring per generation
- sm
- chance that at least one offspring completes a step without breaking anything
The fitness-level method (Wegener 2002) gives an upper bound when gains are preserved. Each generation the best offspring is kept; the target and the scoring are fixed in advance.
The search space
The same problem, three models
Same K, L, target and population, three sets of assumptions. Generations available: 10,000. The gap between the bars is the point: the probability of one random sequence is not the probability of evolution, and an idealised ratchet with a fixed target is not evolution either. Which model, if any, describes a real case is an empirical question.
Run Model 2 yourself
Each run uses the seed amber-1859, so the same settings and seed always give the same result. Change the seed to see the run-to-run variation the averages hide.
How this works, and what it leaves out
Method
- Problem. The target and the starting sequence are drawn from the seed, unless you type a target. Success means coming within d positions of the target. A "functional step" is a block of r consecutive positions that are all correct; fitness counts complete blocks.
- Model 1 is exact: P = 1 − (1 − p)N·G, computed in logarithms so that probabilities far below 10−300 stay correct. Its Monte Carlo draws whole random sequences and compares the distribution of wrong positions with the exact binomial distribution.
- Model 2 is a (1+λ) evolutionary algorithm with λ = N offspring when gains are preserved, and (1,λ) when they are not. Each position of an offspring mutates with probability μ to a uniformly chosen other block; ties are broken at random, so neutral drift is allowed. The closed form is the fitness-level upper bound (Wegener 2002).
- Model 3 is a haploid, asexual Wright–Fisher population tracked as genotype classes. Each generation N offspring are drawn in proportion to fitness (1 + s)steps + beneficial(1 − sd)harmful. Mutation then changes one target position in a fraction 1 − (1 − μ)L of individuals, and adds background mutations at rate U = μ × (rest of genome), split into beneficial, neutral and harmful. Binomial draws are exact for small expected counts and use a normal approximation for large ones. A run ends when most of the population carries a successful sequence.
- The closed form for Model 3 is the origin–fixation approximation (Gillespie 1984; Orr 2005), with Kimura's fixation probability and a sweep time of 2 ln N / s. Steps needing several coordinated changes use a branching-process tunnelling rate (after Iwasa et al. 2004; Weissman et al. 2009), added to the rate of fixing neutral intermediates one at a time.
- Checked against simulation. Each closed form was compared with the mean of 20–60 seeded Monte Carlo runs. Model 1 agreed to within sampling error. The Model 2 bound was within about 25% when every step counts (r = 1), but up to several hundred times too slow for r = 3, because it ignores neutral drift (hence "upper bound"). Model 3 was compared on time until half the population succeeds, against the formula minus half a sweep. Single steps agreed to within about 10%. Steps needing two or three changes came within a factor of about 1.4–1.8, with the simulation slower. With many overlapping steps the simulation was about twice as fast, because sweeps overlap (clonal interference).
- Checked against published work. With the parameters of Sanford et al. (2015) (10,000 diploid individuals, 10−8 per nucleotide, 10% benefit, 20-year generations), Model 3 gives 1.7 million years for one specific nucleotide; the paper reports 1.5 million (and 15.2 vs 15.9 million years at a 1% benefit). For strings of 2–8 nucleotides Model 3 gives 10–20 times longer than the paper's main table. The paper simulated a 10,000-fold raised mutation rate and scaled the result back linearly. Its own extrapolation to the true rate for a 5-nucleotide string (about 40 billion years) is close to Model 3's 28 billion.
- Reproducibility. The seed text is hashed (xmur3) into the state of an sfc32 generator, so a run is identical on every device. Everything runs in your browser.
Limitations
- A fixed target. Every model asks how long it takes to reach a sequence chosen in advance, which is how probability arguments are usually framed. Evolution has no target: many different sequences might serve, and which counts as "success" is decided by the environment, not in advance. The tolerance d is only a crude stand-in for that.
- An idealised landscape. Fitness here is additive across blocks. Real landscapes have strong interactions between mutations (epistasis), and most mutational paths can be closed off (Weinreich et al. 2006); some intermediate steps may be deleterious, or useful for a different function (Lenski et al. 2003).
- Left out: sex and recombination, diploidy and dominance, population structure, changing environments, insertions, deletions, gene duplication and horizontal gene transfer. Mutations are equally likely at every position and to every block.
- Browser limits. The Monte Carlo caps population size, offspring and generations (and says so when your settings exceed them). Real mutation rates are far too low for a browser to simulate, which is why the closed forms matter.
- Approximations in Models 2 and 3 can be off by a large factor outside their range of validity; the notes under each result say when that applies.
- What the models cannot answer: whether a particular biological structure actually had functional intermediates, which is an empirical question taken up in the case studies, or anything about the origin of life, since every model here starts with a replicating population.
Before you move on
Your notes stay in this browser. Nothing is sent anywhere unless you choose to include them in a link you share.
References
- Axe DD (2010). The limits of complex adaptation: an analysis based on a simple model of structured bacterial populations. BIO-Complexity 2010(4). doi:10.5048/bio-c.2010.4 BIO-Complexity was founded by intelligent-design researchers.
- Behe MJ, Snoke DW (2004). Simulating evolution by gene duplication of protein features that require multiple amino acid residues. Protein Science 13:2651–2664. doi:10.1110/ps.04802904
- Behe MJ (2009). Waiting longer for two mutations. Genetics 181:819–820 (letter; with the authors' reply). doi:10.1534/genetics.108.098905
- Charlesworth B, Morgan MT, Charlesworth D (1993). The effect of deleterious mutations on neutral molecular variation. Genetics 134:1289–1303. doi:10.1093/genetics/134.4.1289
- Crow JF (1997). The high spontaneous mutation rate: is it a health risk?. PNAS 94:8380–8386. doi:10.1073/pnas.94.16.8380
- Dawkins R (1986). The Blind Watchmaker. Longman (UK) / W. W. Norton (US); chapter 3. Book, not a peer-reviewed journal article.
- Durrett R, Schmidt D (2008). Waiting for two mutations: with applications to regulatory sequence evolution and the limits of Darwinian evolution. Genetics 180:1501–1509. doi:10.1534/genetics.107.082610
- Eyre-Walker A, Keightley PD (2007). The distribution of fitness effects of new mutations. Nature Reviews Genetics 8:610–618. doi:10.1038/nrg2146
- Gerrish PJ, Lenski RE (1998). The fate of competing beneficial mutations in an asexual population. Genetica 102–103:127–144. doi:10.1023/a:1017067816551
- Gillespie JH (1984). Molecular evolution over the mutational landscape. Evolution 38:1116–1129. doi:10.2307/2408444
- Haldane JBS (1937). The effect of variation on fitness. The American Naturalist 71:337–349. doi:10.1086/280722
- Iwasa Y, Michor F, Nowak MA (2004). Stochastic tunnels in evolutionary dynamics. Genetics 166:1571–1579. doi:10.1534/genetics.166.3.1571
- Jansen T, De Jong KA, Wegener I (2005). On the choice of the offspring population size in evolutionary algorithms. Evolutionary Computation 13:413–440. doi:10.1162/106365605774666921
- Johnson T, Barton NH (2002). The effect of deleterious alleles on adaptation in asexual populations. Genetics 162:395–411. doi:10.1093/genetics/162.1.395
- Keightley PD, Lynch M (2003). Toward a realistic model of mutations affecting fitness. Evolution 57:683. doi:10.1554/0014-3820(2003)057[0683:tarmom]2.0.co;2
- Kimura M (1962). On the probability of fixation of mutant genes in a population. Genetics 47:713–719. doi:10.1093/genetics/47.6.713
- Kondrashov AS (1995). Contamination of the genome by very slightly deleterious mutations: why have we not died 100 times over?. Journal of Theoretical Biology 175:583–594. doi:10.1006/jtbi.1995.0167
- Kong A, Frigge ML, Masson G, et al. (2012). Rate of de novo mutations and the importance of father's age to disease risk. Nature 488:471–475. doi:10.1038/nature11396
- Lee H, Popodi E, Tang H, Foster PL (2012). Rate and molecular spectrum of spontaneous mutations in the bacterium Escherichia coli as determined by whole-genome sequencing. PNAS 109:E2774–E2783. doi:10.1073/pnas.1210309109
- Lenski RE, Ofria C, Pennock RT, Adami C (2003). The evolutionary origin of complex features. Nature 423:139–144. doi:10.1038/nature01568
- Lesecque Y, Keightley PD, Eyre-Walker A (2012). A resolution of the mutation load paradox in humans. Genetics 191:1321–1330. doi:10.1534/genetics.112.140343
- Lynch M, Abegg A (2010). The rate of establishment of complex adaptations. Molecular Biology and Evolution 27:1404–1414. doi:10.1093/molbev/msq020
- Lynch M (2005). Simple evolutionary pathways to complex proteins. Protein Science 14:2217–2225. doi:10.1110/ps.041171805
- Lynch M (2010). Rate, molecular spectrum, and consequences of human mutation. PNAS 107:961–968. doi:10.1073/pnas.0912629107
- Muller HJ (1950). Our load of mutations. American Journal of Human Genetics 2:111–176 (PMID 14771033).
- Nachman MW, Crowell SL (2000). Estimate of the mutation rate per nucleotide in humans. Genetics 156:297–304. doi:10.1093/genetics/156.1.297
- Ohta T (1973). Slightly deleterious mutant substitutions in evolution. Nature 246:96–98. doi:10.1038/246096a0
- Orr HA (2005). The genetic theory of adaptation: a brief history. Nature Reviews Genetics 6:119–127. doi:10.1038/nrg1523
- Peck JR (1994). A ruby in the rubbish: beneficial mutations, deleterious mutations and the evolution of sex. Genetics 137:597–606. doi:10.1093/genetics/137.2.597
- Perfeito L, Fernandes L, Mota C, Gordo I (2007). Adaptive mutations in bacteria: high rate and small effects. Science 317:813–815. doi:10.1126/science.1142284
- Sanford J, Brewer W, Smith F, Baumgardner J (2015). The waiting time problem in a model hominin population. Theoretical Biology and Medical Modelling 12:18. doi:10.1186/s12976-015-0016-z
- Sanjuán R, Nebot MR, Chirico N, Mansky LM, Belshaw R (2010). Viral mutation rates. Journal of Virology 84:9733–9748. doi:10.1128/jvi.00694-10
- Wegener I (2002). Methods for the analysis of evolutionary algorithms on pseudo-Boolean functions. In Sarker R, Mohammadian M, Yao X (eds) Evolutionary Optimization, pp. 349–369, Springer. doi:10.1007/0-306-48041-7_14 Book chapter, not a peer-reviewed journal article.
- Weinreich DM, Delaney NF, DePristo MA, Hartl DL (2006). Darwinian evolution can follow only very few mutational paths to fitter proteins. Science 312:111–114. doi:10.1126/science.1123539
- Weissman DB, Desai MM, Fisher DS, Feldman MW (2009). The rate at which asexual populations cross fitness valleys. Theoretical Population Biology 75:286–300. doi:10.1016/j.tpb.2009.02.006
- Whitman WB, Coleman DC, Wiebe WJ (1998). Prokaryotes: the unseen majority. PNAS 95:6578–6583. doi:10.1073/pnas.95.12.6578
- Yockey HP (1977). A calculation of the probability of spontaneous biogenesis by information theory. Journal of Theoretical Biology 67:377–398. doi:10.1016/0022-5193(77)90044-3