Skip to content

Commit 4cd50fe

Browse files
author
Yoav Ram
committedAug 7, 2016
blog posts with mathjax support, better pagination
1 parent 615e884 commit 4cd50fe

File tree

23 files changed

+1422
-44
lines changed

23 files changed

+1422
-44
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
title: The convergence of mean fitness towards the mutation-selection balance
2+
---
3+
modified: 2013-12-17
4+
---
5+
date: 2012-11-19
6+
---
7+
author: Yoav Ram
8+
---
9+
category: evolution
10+
---
11+
body:
12+
13+
## Overview
14+
15+
In an [eariler post] I described how the mean fitness of a population at the *mutation-selection balance* can be analysed.
16+
I assumed that the population is **asexual**, that only **deleterious mutations** occur,
17+
that there is **no drift or recombination**, and that **selection is constant**.
18+
19+
In this post I would like to continue with these assumpions. I will show how to find a **simple formula for the mean fitness after an arbitrary number of generations**.
20+
The formulation and derivation will follow one of my favorite papers -
21+
["Nonequilibrium model for estimating parameters of deleterious mutations"][gordo2005] by @Gordo2005.
22+
23+
## Motivation
24+
25+
But first, why are we interested in the mean fitness of a population that is not at the mutation-selection balance?
26+
27+
The general answer is that most populations are probably **not** at the mutation-selection balance.
28+
The mutation-selection balance is a nice idea, but it serves as a reference, as a null hypothesis,
29+
not as a general rule. The assumption that selection is constant is not relevant to many populations - selection is probably fluctuating, both in amplitude and direction.
30+
This means that at least some of the natural populations we encounter in the wild are not evolving around a mutation-selection balance,
31+
but rather evolving towards a mutation-selection balance, never actually reaching one.
32+
33+
The more specific answer is that even in laboratory conditions which induce a constant selection regime
34+
it may take a long time for populations to reach the mutation-selection balance,
35+
and this time might be longer than what we intuitively expect (or desire).
36+
37+
This issue is presented by @Gordo2005. They wanted to use traditional models for calculating the mutation rate of bacterial populations in the lab. These models assume that the populations are at a mutation-selection balance, but Gordo and Dionisio showed that in the timeframe they planned for their study their populations will not reach an equilibrium, especially if selection is weak (see Figure 1 in [@Gordo2005]).
38+
39+
This is interesting, because we saw in the [eariler post] that the mean fitness
40+
at the mutation-selection balance is *e^-U^*, where *U* is the mutation rate and is independent of *s*, the selection coefficient.
41+
But Figure 1 in [@Gordo2005] shows that the mean fitness before the mutation-selection balance *is dependent* on *s*, and that *s* determines the rate of convergence towards the balance.
42+
43+
## Model
44+
45+
This follows the model from [@Gordo2005] but I elaborated and included all the rigouros steps.
46+
47+
### Definitions
48+
49+
Denote the pmf (probability mass function) of a Poisson distribution with parameter $\lambda$: $\varphi_{\lambda} (x)$
50+
Consider an asexual infinite population evolving in a constant environment.
51+
The number of new mutations per individual per generation is Poisson distributed with parameter *U*, the mutation rate.
52+
All mutations are deleterious with a multiplicative effect *s*, so
53+
that an individual with $i$ mutant allele has a fitness $\omega_{i}:=(1-s)^{i}$ with selection coefficient $0<s<1$.
54+
The frequency of individuals with *i* mutant at generation *g* is denoted $f_{i}(g)$ and $\sum_{i}{f_{i}(g)}=1$.
55+
From the former two statements it follows that the population mean fitness at generation *g* is
56+
$\bar{\omega }_{g}=\sum_{i}{f_{i}(g)\omega _{i}}$.
57+
Assume that the selection occurs before mutation.
58+
59+
### The distribution of mutant alleles
60+
61+
The change in the frequency of individuals with *i* mutant alleles from generation *g* to generation *g+1* is written as:
62+
63+
$$
64+
f_{i}(g+1)=\sum_{k=0}^{i}{\frac{ \omega _{k} }{ \bar{\omega}_{g} } f_{k}(g) \varphi_{U} (i-k) }
65+
$$
66+
67+
The model starts with a mutation-free population, so the initial condition is $f_{0}(0)=1, f_{i>0}(0)=0$.
68+
69+
Let's calculate
70+
the frequency of individuals with *i* mutant alleles after one generation:
71+
72+
$$
73+
f_{i}(1)=\sum_{k=0}^{i}{f_{k}(0)\frac{\omega _{k}}{\bar{\omega}_{1}}\cdot \frac{U^{i-k}}{(i-k)!}e^{-U}}
74+
$$
75+
and because
76+
$$
77+
f_{k}(0)=\bigg\{
78+
\begin{gathered}
79+
1, k=0 \\
80+
0, otherwise \\
81+
\end{gathered}
82+
$$
83+
we get
84+
$$
85+
f_{i}(1) = f_{0}(0)\frac{\omega _{0}}{\bar{\omega }_{1}} \cdot \frac{U^{i}}{i!}e^{-U} = \frac{U^{i}}{i!}e^{-U}
86+
$$
87+
so the frequency of individuals with *i* mutant alleles after one generation is Poisson distributed with parameter *U*.
88+
89+
To verify this - the expected number of mutations after one generation is
90+
$$
91+
\sum_{i\ge 0}{i\cdot f_{i}(1)} = \sum_{i\ge 1}{i\cdot \frac{U^{i}}{i!}e^{-U}} =\\
92+
e^{-U}U\sum_{i\ge 1}{\frac{U^{i-1}}{(i-1)!}} = \\
93+
e^{-U}U\sum_{i\ge 0}{\frac{U^{i}}{i!}} = \\
94+
Ue^{-U}e^{U} = U
95+
$$
96+
as expected.
97+
98+
To go on the next step, we will find the frequency of individuals with *i* mutant alleles at the second generation,
99+
after selection but *before* mutations - this is marked by $f_{i}^{s}(2)$:
100+
$$
101+
f_{i}^{s}(2) = \frac{\omega _{i}}{\bar{\omega}_{1}}f_{i}(1) = \\
102+
\frac{(1-s)^{i}}{\sum_{k=0}^{\infty }{f_{k}(1)\omega_{k}}}\frac{U^{i}}{i!}e^{-U} = \\
103+
\frac{(1-s)^{i}}{\sum_{k=0}^{\infty}{\frac{U^{k}}{k!}e^{-U}(1-s)^{k}}}\frac{U^{i}}{i!}e^{-U} = \\
104+
\frac{(U(1-s))^{i}}{i!\sum_{k=0}^{\infty}{\frac{(U(1-s))^{k}}{k!}}} = \\
105+
\frac{(U(1-s))^{i}}{i!}e^{-U(1-s)}
106+
$$
107+
108+
So, $f_{i}^{s}(2)$ is Poisson distributed with parameter $U(1-s)$, and the frequency *after* mutation will be:
109+
$$
110+
f_{i}(2) = \sum_{k=0}^{i}{f_{k}^{s}(2)\frac{U^{i-k}}{(i-k)!}e^{-U}} = \\
111+
\sum_{k=0}^{i}{\frac{(U(1-s))^{k}}{k!}e^{-U(1-s)}\frac{U^{i-k}}{(i-k)!}e^{-U}} = \\
112+
e^{-U(1-s)-U}\sum_{k=0}^{i}{\frac{U^{i-k}(U(1-s))^{k}}{k! \cdot (i-k)!}} = \\
113+
\frac{U^{i}}{e^{U(1-s) + U}} \sum_{k=0}^{i}{\frac{(U(1-s))^{k}}{U^{k} \cdot k! \cdot (i-k)!}} = \\
114+
\frac{U^{i}}{e^{U(1-s) + U}} \sum_{k=0}^{i}{\frac{(1-s)^{k}}{k! \cdot (i-k)!}}
115+
$$
116+
117+
Note that
118+
$\sum_{k=0}^{i}{\frac{q^{k}}{k!\cdot (i-k)! }} = \frac{(q+1)^{i}}{i!}$ And $\sum_{k=1}^{i}{\frac{q^{k}}{k!\cdot (i-k)! }}=\frac{(q+1)^{i}-1}{i!}$, and therefore:
119+
120+
$$
121+
f_{i}(2) = \frac{U^{i}}{e^{U(1-s)+U}}\cdot \frac{(2-s)^{i}}{i!} = \\
122+
\frac{(U(1-s)+U)^{i}}{i!}e^{-(U(1-s)+U)} = \\
123+
\phi(i | U(1-s)+U)
124+
$$
125+
126+
Similar to the former expansion and because the Poisson process is *memoryless*,
127+
the frequency of individuals with *i* mutant alleles after mutation at generation 2 will be Poisson distributed with parameter $U(1-s)+U$.
128+
129+
The same argument makes it clear that the distribution of mutant alleles
130+
at any generation *g* is Poisson distributed.
131+
132+
## The expected number of mutant alleles
133+
134+
After seeing how the distribution of mutant alleles changes at the first couple of generations,
135+
and verifying that this is a Poisson distribution,
136+
we can now formulate the recurrence relation for the expected number of
137+
mutant alleles - or the parameter of the Poisson distribution, $\lambda$:
138+
139+
$$
140+
\lambda (g+1) = \sum_{k=0}^{\infty }{k\cdot f_{k}(g+1)} = \\
141+
\sum_{k=0}^{\infty}{\sum_{i=0}^{k}{k\frac{(1-s)^{i}}{\bar{\omega}_{g}}f_{i}(g)\frac{U^{k-i}}{(k-i)!}e^{-U}}} = \\
142+
\sum_{i=0}^{\infty}{\sum_{k=i}^{\infty }{k\frac{(1-s)^{i}}{\bar{\omega}_{g}}f_{i}(g)\frac{U^{k-i}}{(k-i)!}e^{-U}}} = \\
143+
\sum_{i=0}^{\infty}{e^{-U}\frac{(1-s)^{i}}{\bar{\omega}_{g}}U^{-i}f_{i}(g)\sum_{k=i}^{\infty}{k\frac{U^{k}}{(k-i)!}}} = \\
144+
\sum_{i=0}^{\infty}{e^{-U}\frac{(1-s)^{i}}{\bar{\omega}_{g}}U^{-i}f_{i}(g)e^{U}U^{i}(i+U)} = \\
145+
\frac{1}{\bar{\omega}_{g}}\sum_{i=0}^{\infty }{f_{i}(g)(1-s)^{i}(i+U)} = \\
146+
\frac{U}{\bar{\omega}_{g}}\sum_{i=0}^{\infty }{f_{i}(g)(1-s)^{i}}+\frac{1}{\bar{\omega}_{g}}\sum_{i=1}^{\infty }{i\cdot f_{i}(g)(1-s)^{i}} = \\
147+
U + \frac{\sum_{i=1}^{\infty }{i\cdot f_{i}(g)(1-s)^{i}}}{\sum_{i=0}^{\infty}{f_{i}(g)(1-s)^{i}}} = \\
148+
U + \frac{\sum_{i=1}^{\infty }{i\cdot \frac{e^{\lambda (g)}(\lambda (g)(1-s))^{i}}{i!}}}{\sum_{i=0}^{\infty}{\frac{e^{\lambda(g)}(\lambda (g)(1-s))^{i}}{i!}}} = \\
149+
U + \frac{\lambda(g)(1-s)\cdot e^{\lambda (g)(1-s)}}{e^{\lambda(g)(1-s)}} = \\
150+
\lambda (g)(1-s) + U
151+
$$
152+
153+
So we got a nice recurrence formula - $\lambda (g+1)=\lambda (g)(1-s)+U$ with an initial condition $\lambda (1)=U$.
154+
The recurrence means that the expected number of mutatnt alleles per individual in the population
155+
is reduced every generation by selection by multiplying it by *(1-s)* and increased by mutation by adding *U*.
156+
157+
The solution to this recurrence relation is (why? this will require another post):
158+
$$
159+
\lambda(g)=\frac{U}{s}(1-(1-s)^{g})\xrightarrow{g\to \infty }\frac{U}{s}
160+
$$
161+
162+
For a sinlge-locus deterministic model, the expected frequency of the wild-type allele at the mutation-selection balance
163+
(assuming that $s>>U$) is $1 - \frac{U}{s}$, which agrees well with the frequency of mutation-free individuals we can now calculate:
164+
$\phi(0 | \frac{U}{s}) = \frac{\frac{U}{s}^0}{0!} e^{-\frac{U}{s}} = e^{-\frac{U}{s}} = 1-\frac{U}{s} + O(\frac{U}{s}^{2})$. The last approximation uses the Taylor expansion of the exponential function around 0.
165+
166+
## The population mean fitness
167+
168+
After *g* generations the population mean fitness is:
169+
170+
$$
171+
\bar{\omega}_{g} = \sum_{i=0}^{\infty }{\frac{\lambda(g)^{i}}{i!}e^{-\lambda(g)}(1-s)^{i}} = \\
172+
e^{-\lambda(g)}\sum_{i=0}^{\infty}{\frac{ (\lambda(g) (1-s))^{i}}{i!}} = \\
173+
e^{-\lambda(g)}e^{\lambda(g)(1-s)} \Rightarrow \\
174+
\bar{\omega}_{g} = e^{-\lambda(g) s}
175+
$$
176+
177+
Which gives us yet [another way][earlier post] to calculate the mean fitness at the mutation-selection balance:
178+
$$
179+
\bar{\omega }^* = lim_{g\to \infty} e^{-\lambda(g) s} = e^{-\frac{U}{s}s} = e^{-U}
180+
$$
181+
182+
The second moment of the population fitness is given by:
183+
184+
$$
185+
E[\omega_{g}^2] = \sum_{i=0}^{\infty }{\frac{\lambda(g)^{i}}{i!}e^{-\lambda(g)}(1-s)^{2i}} = \\
186+
e^{-\lambda(g)} \sum_{i=0}^{\infty }{\frac{ (\lambda(g)(1-s)^2)^{i} }{i!}} = \\
187+
e^{-\lambda(g)} e^{\lambda(g)(1-s)^2} = \\
188+
e^{\lambda(g)(1-2s+s^2)-\lambda(g)} = \\
189+
e^{\lambda(g)(s^2-2s)}
190+
$$
191+
192+
193+
## Estimation of mutation rates
194+
195+
In mutation-accumulation (MA) experiments, a population is undergoing a sequence of bottlenecks that cause the accumulation of deleterious mutations due to the random sampling effect of **genetic drift**. In these experiments the investigators usually measure the mean fitness of the experimental population thorugh time and use these measurements to estimate *s* and *U*.
196+
197+
Denote the expected mean fitness at bottleneck *B* by $\bar{\omega{B}}$.
198+
We start with a mutation-free population, and $\bar{\omega_{0}} = 1$.
199+
At the first bottleneck, the population is assumed to reach a mutation-selection balance,
200+
so the expected mean fitness is now $\bar{\omega_{1}} = e^{-U}$.
201+
At the next bottleneck, the expected mean fitness is reduced again by the same factor,
202+
so it is now $\bar{\omega_{1}} = e^{-U}e^{-U} = e^{-2U}$.
203+
After *B* bottlenecks, the mean fitness is $\bar{\omega_{B}} = e^{-UB}$.
204+
So one can take the log of the measured mean fitness after *B* bottlenecks, $-BU$, and use a linear regression model to estimate *U*. By using a similar linear regression on the ratio of the second moment of fitness and the square of the expected mean fitness, one can estimate *s* (see below).
205+
206+
**However, what happens if the population doesn't reach a mutation-selection balance?**
207+
In a population of bacteria, for example, the number of generations between bottlenecks may be insufficient for the population to reach a mutation-selection balance (see Figure 1 in [@Gordo2005]). In this case one must use a the non-equilibrium value of the mean fitness which was derived above - $\bar{\omega}_{g} = e^{-\frac{U}{s} (1-(1-s)^{g})}$. This concept is the subject of the paper by @Gordo2005, titled: **Nonequilibrium model for estimating parameters of deleterious mutations**. The paper explores a statistical model based on the above calculations. The statistical model is tested with simulations. In a later paper, [@Trindade2010], the statistical model was used on results of a mutation-accumulation experiment with *E. coli*.
208+
209+
In the above development, we saw that the expected mean fitness after *g* generations is $\bar{\omega}_{g} = e^{-\lambda(g) s}$.
210+
If the number of generations between bottlenecks is constant, say *g=24* (for a population in which a generation is estimated at 30 minutes, resulting in a bottleneck period of 12 hours), then we can denote $\lambda {:=} \lambda(g)$ and use $\bar{\omega_{B}} = e^{-\lambda s B}$.
211+
Then we can use a linear regression model to estimate $-\lambda s$.
212+
213+
But how do we proceed? The estimator we found using linear regression, $\lambda s= \lambda(g) s = U(1-(1-s)^{g})$, doesn't directly yield either *U* or *s*.
214+
Well, this is why we calculated the second moment. We will not use it directly, but instead define an F-statistic (not to be confused with the F-statistic used to describe heterozigosity or population structuring):
215+
$F_{B} = \frac{\bar{\omega^2}}{\bar{\omega}^2}$. This is a little confusing so I'll write it in a probablistic presentation:
216+
217+
$$
218+
F_{B} = \frac{E[\omega^2]}{E^2[\omega]}
219+
$$
220+
221+
This is the ratio of the second moment to the square of the first moment. What is this ratio? Let's have a look:
222+
223+
$$
224+
F_{B} = \frac{E[\omega^2]}{E^2[\omega]} = \\
225+
\frac{e^{\lambda (s^2-2s) B}}{e^{-2 \lambda s B}} =\\
226+
e^{( \lambda s^2-2\lambda s+2 \lambda s)B} = \\
227+
e^{( \lambda s^2)B}
228+
$$
229+
230+
So the log of the *F-statistic* is $\lambda s^2 B$, and linear regression can give us $\lambda s^2$.
231+
Now we can estimate both *s* and *U* using the estimation for $-\lambda s$, $\lambda s^2$, and the relation $\lambda = \frac{U}{s}(1-(1-s)^g)$.
232+
233+
## References
234+
235+
[gordo2005]: http://link.aps.org/doi/10.1103/PhysRevE.71.031907
236+
[eariler post]: /convergence-of-mean-fitness
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
title: Summary: "Evolution of mutation rates in bacteria" (Denamur and Matic 2006)
2+
---
3+
category: evolution
4+
---
5+
date: 2013-07-14
6+
---
7+
author: Yoav Ram
8+
---
9+
body:
10+
11+
This is an "executive summary" of [Denamur and Matic [-@Denamur2006]](http://onlinelibrary.wiley.com/doi/10.1111/j.1365-2958.2006.05150.x/abstract), which is a review of the literature on the evolution of the mutation rate in bactera.
12+
13+
1. Deleterious mutations are 100,000-fold more frequent than beneficial mutations in *E. coli*.
14+
2. Mutators have been found in various species of bacteria in frequencies of 0.1-60%: 1% strong mutators, 10-30% weak mutators [@Matic1997; @Baquero2004].
15+
1. These frequencies are higher than expected under a **mutation-selection balance** (MSB) - Boe *et al.* [-@Boe2000] estimated the mutator fraction at 0.00003.
16+
3. Mutator alleles are mainly mutants in the **mismatch repair (MMR) system** (*mutS*, *mutL*) - see the article for more information on the operation of these genes and the MMR system).
17+
4. Rate increases by these MMR mutants: **100-fold increase in transitions, 1,000-fold increase in frameshifts and 10-1,000-fold increase in chromosomal rearrangements**.
18+
5. MMR mutatns arise by different mutation types. The rate of non-mutator to mutator was estimated by Boe *et al.* [-@Boe2000] to be 0.000005 per generation.
19+
6. What can cause the frequency of MMR mutants to be higher than that expected under a MSB?
20+
- **Higher replication rates** due to the absence of the metabolic load imposed by DNA repair enzymes[^1]
21+
- **Higher adaptation rate** due to the faster generation of beneficial mutations[^2]
22+
7. **The first explanation was rejected**: Several studies found that **mutators are advanageous only when** the ratio of mutator to non-mutator is such that **beneficial mutations are more likely to be generated by mutators** than by non-mutators[^6].
23+
8. The second explanation is stonger in bacteria than in other species because **recombination** rates are low and therefore mutators are not separated from the beneficial mutations they generate.
24+
9. Although mutators can reach **high frequencies in adaptive evolution**, they accumulate deleterious mutations and **decline in frequency in a constant environment**.
25+
10. **Migration** to new environments can change a beneficial mutation to neutral or deleterious.
26+
11. Mutators are more vulnerable to **Muller's ratchet** due to faster accumulation of deleterious mutations [@Funchain2000].
27+
12. Beneficial mutations can move to non-mutator background by horizontal gene transfer or back/compensatory mutation at the mutator locus.
28+
13. **Local mutators** - DNA sequences that induce high mutation rates in their neighborhoods - were found in virulent loci.
29+
12. There are over 20 loci associated with mutator phenotypes, probably with different direct effects on mutation rate and fitness and with different **pleiotropic effects** - for example, *mutT* increases the mutation and adaptation rate but also increases transcriptional error rate [@Taddei1997a].
30+
13. MMR mutants are special because they also **increase recombination rates** which can help in adaptation [@Funchain2001]. High recombination rates can also help to restore non-mutator alleles after adaptation is complete[^3].
31+
14. Most mutators were found in **pathogenic bacteria**.
32+
15. Some mutators were correlated in natural populations with **antibiotic resistance**, however not strong mutators: the latter are probably counter-selected after adaptation and are therefore not found in natural population [@Taddei1997].
33+
34+
35+
36+
37+
# References
38+
39+
[^1]: Cost of DNA replication fidelity [@Dawson1998]
40+
[^2]: Second-order selection (for example, [@Leigh1973])
41+
[^3]: Rise and fall of the mutator allele [@Taddei1997]
42+
[^6]: But see [@Torres-Barcelo2013] which showed that *P. aeruginosa* mutators are oxidative-stress resistant
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
title: The distribution of deleterious mutations at the mutation-selection balance
2+
---
3+
modified: 2013-12-26
4+
---
5+
date: 2013-12-17
6+
---
7+
author: Yoav Ram
8+
---
9+
category: evolution
10+
---
11+
body:
12+
13+
If we sample a random individual from an asexual population that had allot of time to adapt to its environment, how many deleterious mutations can we expect it to have? This distribution of deleterious mutations is the starting point of many population genetics models. In an [eariler post] we've calculated this distribution - not only at the mutation-selection balance, but also on the way towards the balance from a mutation-free population.
14+
15+
Here, we calculate the distribution of deleterious mutation at the mutation-selection balance by following the derivation of John Haigh in his ultra-classic paper **"The Accumulation of Deleterious Genes in a Population - Muller's Ratchet"** [@Haigh1978].
16+
17+
We focus on a finite asexual population undergoing selection and mutation. All mutations are deleterious with an independent (multiplicative) identical effect on fitness. The number of mutations per individual per generation is Poisson distributed[^poisson]. and The master equation is:
18+
19+
$$
20+
p_{k}(t) = \sum_{j=0}^{k} (X_{k-j}(t)(1-s)^{k-j} e^{-\lambda} \frac{\lambda^j}{j!})/T_{1}(t)
21+
$$
22+
23+
$X_i(t)$ is a multinomial random variable representing the **number of individuals with *i* deleterious mutations at time *t***, $p_k(t)$ is the multinomial probability for $X_k(t+1)$ (or the expected value of $X_k(t+1)/\sum_{j\ge 0}{X_j(t+1)}$), *s* is the **selection coefficient**[^s], $\lambda$ is the **mutation rate** (usually denoted on this blog by $\mu$ or *U*) in mutations per individual per generation, and $T_{r}(t)$ is the sum of *r*-th power of the population fitness at time *t*:
24+
25+
$$
26+
T_{r}(t) = \sum_{i\ge 0} X_{i}(t) (1-s)^{ir}
27+
$$
28+
29+
So $\bar{\omega} = T_{1}(t) / \sum_{j\ge 0}{X_j(t)}$ is the population mean fitness.
30+
31+
Now we are looking for the **stable distribution** of mutations in the population $n=(n_0, n_1, ...)$ for which $E[X(t+1) | X(t) = n] = n$.
32+
This is:
33+
34+
$$
35+
n_k = N \sum_{j=0}^{k} n_{k-j}(1-s)^{k-j} \frac{\lambda^j e^{-\lambda}}{j!}/T
36+
$$
37+
38+
where $N=\sum_{i \ge 0} n_i$ is the **stable population size** and $T/N = \sum_{i \ge 0} \frac{n_i}{N} (1-s)^i$ is the **stable population mean fitness**, (usually denoted by $\bar{\omega}$).
39+
40+
Looking at $n_0$ and **assuming it is positive** (because this the the stable number of individuals without deleterious mutations), the sum has only one term:
41+
42+
$$
43+
n_0 = N n_{0}(1-s)^{0} \frac{\lambda^0 e^{-\lambda}}{0!}/T \Rightarrow \\
44+
T = N e^{-\lambda}
45+
$$
46+
47+
which is another $\bar{\omega} = e^{-U}$ result, as we have [seen before](/mean-fitness-at-the-mutation-selection-balance/).
48+
49+
Using this identify, we get
50+
51+
$$
52+
n_k = N \sum_{j=0}^{k} n_{k-j}(1-s)^{k-j} \frac{\lambda^j e^{-\lambda}}{j!}/N e^{-\lambda} \Rightarrow \\
53+
n_k = \sum_{j=0}^{k} n_{k-j}(1-s)^{k-j} \frac{\lambda^j }{j!}
54+
$$
55+
56+
We find the solution using induction, assume that $n_m = n_0 \frac{\lambda^m}{s^m m!}$ for all $m<k$ and check for $k$ (the induction base is trivial, $n_0=n_0$):
57+
$$
58+
n_k = \sum_{j=0}^{k} n_{k-j}(1-s)^{k-j} \frac{\lambda^j }{j!} = \\
59+
\sum_{j=0}^{k} n_{0} \frac{\lambda^{k-j}}{s^{k-j} (k-j)!} (1-s)^{k-j} \frac{\lambda^j }{j!} \Rightarrow \\
60+
n_{0} \lambda^{k} \sum_{j=0}^{k} \frac{(1-s)^{k-j} }{s^{k-j} (k-j)!j!} = \\
61+
n_{0} \frac{\lambda^{k}}{s^k k!} \sum_{j=0}^{k} \frac{k!}{(k-j)!j!} s^{j} (1-s)^{k-j} = \\
62+
n_{0} \frac{\lambda^{k}}{s^k k!} \sum_{j=0}^{k} {k \choose j} s^{j} (1-s)^{k-j} = \\
63+
n_{0} \frac{\lambda^{k}}{s^k k!} \sum_{j=0}^{k} P(Bin(k,s)=j) \Rightarrow \\
64+
n_k = n_{0} \frac{\lambda^{k}}{s^k k!}
65+
$$
66+
Where $P(Bin(k,s)=j)$ is the probability that a Binomial random variable with *k* trials and success probability *s* succeeds *j* times and fails *k-j* times.
67+
68+
Haigh wrote this as:
69+
$$
70+
n_k = n_{0}\frac{\theta^k}{k!}, \; \theta=\lambda/s
71+
$$
72+
From this we can find the **frequency of the fittest class of individuals**, $f_0 = n_0/N$, because we know that the population size is $\sum_{k \ge 0} n_k = N$:
73+
74+
$$
75+
N = \sum_{k \ge 0} n_k =
76+
\sum_{k \ge 0} n_{0}\frac{\theta^k}{k!} = \\
77+
n_{0} \sum_{k \ge 0} \frac{\theta^k}{k!} = \\
78+
n_{0} e^\theta \Rightarrow \\
79+
n_{0} = N e^{-\theta} \Rightarrow \\
80+
f_{0} = e^{-\theta}
81+
$$
82+
83+
For example, Trindade et al. [-@Trindade2010] studied a mutator strain of *E. coli* and found that is has a mutation rate of $\lambda=0.005$ and selection coefficient $s=0.03$. For these values, the frequency of the fittest individuals is roughly 85%.
84+
85+
The main assumption made here is $n_0 > 0$ (emphasized above). Of course, in an *infinite* population this is always true, but in real populations, the frequency of unloaded individuals $f_0$ can be smaller smaller that $1/N$ and then we can expect $n_0=0$, and the population will have a different distribution. According to Gessler [-@Gessler1995] the number of deleterious mutations per individual will assume a shifted negative binomial distribution.
86+
87+
## References
88+
89+
[^s]: The effect of deleterious mutations on fitness
90+
91+
[^poisson]: This is reasonable because the mutation rate per locus is very low, but there are many loci
92+
93+
[eariler post]: /mean-fitness-at-the-mutation-selection-balance/

‎content/blog/first-post/contents.lr

-9
This file was deleted.
+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
title: Growth models
2+
---
3+
category: growth
4+
---
5+
date: 2015-12-13
6+
---
7+
author: Yoav Ram
8+
---
9+
body:
10+
11+
## Logistic model
12+
13+
### A resource consumption view
14+
15+
Consider a **resource consumption** model that follows the density of a single microbial species through time $N(t)$ and the density of that species' limiting resource $R(t)$:
16+
17+
$$
18+
\frac{dR}{dt} = -a R N \\
19+
\frac{dN}{dt} = \epsilon a R N
20+
$$
21+
22+
where $a$ is the uptake rate of the microbes in question, in units of $(\rho T)^{-1}$ (where $\rho$ is density and $T$ is time), and $\epsilon$ is the dimensionless conversion rate of resource to biomass.
23+
24+
The following treatment follows [@Arditi2015]. By definition:
25+
26+
$$
27+
\frac{d(\epsilon R + N)}{dt} = \\
28+
\epsilon \frac{dR}{dt} + \frac{dN}{dt} = \\
29+
-\epsilon a R N + \epsilon a R N \equiv 0
30+
$$
31+
32+
Therefore, $\epsilon R + N$ is constant:
33+
34+
$$
35+
M \equiv \epsilon R(t) + N(t) = \\
36+
\epsilon R(0) + N(0) \Rightarrow \\
37+
M - N = \epsilon R \Rightarrow \\
38+
\frac{dN}{dt} = a N (M-N) = aM N (1 - \frac{N}{M})
39+
$$
40+
41+
By substituting $K=M$ and $r=aK$ we get the logistic model:
42+
43+
$$
44+
\frac{dN}{dt} = r N \Big(1 - \frac{N}{K}\Big)
45+
$$
46+
47+
This derivation gives an interesting **interpretation of the model parameters**: We usually refer to $K$ as the _carrying capacity_, _maximum population size_, _yield_ or _density_. Under this interpretation, $K=M=N(0) + \epsilon R(0)$ is the initial population density plus whatever population density there is to make from converting **all** the resource.
48+
This is in line with the standard interpretation.
49+
50+
We usually refer to $r$ as the _proportional increase of the population density_ in one unit of time. Under this interpretation, $r=aK=a \epsilon R + a N$ is in $T^{-1}$; since $a$ is the rate of resource uptake per resource density per population density per time unit, if $N \approx 0$ then $r \approx a \epsilon R$ is the rate at which each population density unit uptakes and converts the resources at hand ($R$), which is in line with the standard interpretation.
51+
52+
Another derivation in [@Arditi2015] assumes that the resource is biotic (prey) that has a logistic growth of its own; McArthur showed that the predator growth is logistic if the conversion rate is slow enough to allow separation of time scales.
53+
54+
### Intraspecific interference
55+
56+
Yet another derivations in [@Arditi2015] assumes direct intraspecific interference.
57+
Assume the population grows exponentialy:
58+
59+
$$
60+
\frac{dN}{dt} = r N
61+
$$
62+
63+
but that encounters between individuals can lead to mortality. Assuming perfect mixing, the number of individulas dying due to interferece is $\lambda N^2$ and we get:
64+
65+
$$
66+
\frac{dN}{dt} = r N - \lambda N^2 = r N \Big(1 - \frac{N}{K}\Big)
67+
$$
68+
69+
where $K=r/\lambda$.
70+
71+
## Generalized logistic model
72+
73+
The generalized logistic model is an extension of the logistic model, introducting the parameter $\nu$:
74+
75+
$$
76+
\frac{dN}{dt} = r N \Big(1 - \Big( \frac{N}{K})^{\nu} \Big)
77+
$$
78+
79+
This model is also called the Richards model [@Richards1959] or, in its discrete time version, the $\theta$-logistic model [@Gilpin1973].
80+
81+
When $\nu=1$, this is the logistic model; when $\nu=0$ this is the **Gompertz model**.
82+
83+
According to [@Richards1959], one interpretation of $\nu$ is that $(1+\nu)^{-1/\nu}$ *states explicitly the proportion of the final size ($K$) at which the growth rate $\Big(\frac{dN}{dt}\Big)$ is maximal*; *i.e.*, this is the value of $N/K$ at which the inflexion point of the growth curve $\Big( \frac{d^2N}{dt^2}=0\Big)$ occurs (note that Richards uses the symbol $m=\nu+1$ and therefore the inflexion point occurs as $N/K=m^{1/(1-m)}$). When $\nu=0$, this occurs at $N/K=e^{-1}$; when $\nu=1$, this occurs at 1/2.
84+
85+
### Solution
86+
87+
To solve this model [@Skiadas2010], we define $y=N/K$ and $z=y^{-\nu}$ to get:
88+
89+
$$
90+
\frac{dz}{dt} = -r \nu (z - 1) \\
91+
z(0) = \Big( \frac{N_0}{K} \Big)^{-\nu}
92+
$$
93+
94+
which is solved to
95+
$$
96+
z(t) = 1 + e^{-r \nu t} \cdot C \\
97+
z(0) = 1 + C \Rightarrow \\
98+
C = \Big(\frac{N_0}{K}\Big)^{-\nu} - 1 \Rightarrow \\
99+
z(t) = 1 + e^{-r \nu t} \Big(\frac{N_0}{K}\Big)^{-\nu} \Rightarrow \\
100+
N(t) = \frac{K}{\Big[1 - \Big( 1- \Big( \frac{K}{N_0}\Big)^{\nu}\Big) e^{-r \nu t} \Big]^{1/\nu}}
101+
$$
102+
103+
### Derivation
104+
105+
Following [@Schnute1981], we define the population size $N$ and the per capita growth rate $Z$:
106+
107+
$$
108+
\frac{dN}{dt} = N Z \Rightarrow Z = \frac{1}{N} \frac{dN}{dt} \\
109+
\frac{dZ}{dt} = \nu Z ( Z-r) = \nu Z^2 -\nu r Z
110+
$$
111+
112+
Integrating this system with the initial conditions $N(0)=N_0, \lim_{t \to \infty}{N(t)} = K$ gives the same solution as above.
113+
114+
According to [@Schnute1981], this differential equation system can also be written as a second-order differential equation:
115+
116+
$$
117+
\frac{d^2N}{dt^2} = \\
118+
\frac{dN}{dt} \Big( \frac{1 + \nu}{N} \cdot \frac{dN}{dt} -r\nu \Big)
119+
$$
120+
121+
This derivation allows a **new interpretation of the model parameters**:
122+
123+
- $r$ is the maxmimum per capita growth rate, and
124+
- $\nu$ is the per capita decelaration rate of the per capita growth rate.
125+
126+
## References
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
title: Summary: "Balancing robustness and evolvability" (Lenski et al. 2006)
2+
---
3+
category: evolution
4+
---
5+
date: 2013-06-16
6+
---
7+
author: Yoav Ram
8+
---
9+
body:
10+
11+
This is a summary of [Lenski, Barrick and Ofria [-@Lenski2006] ](http://www.plosbiology.org/article/info:doi/10.1371/journal.pbio.0040428). The following are direct quotes of the original article. My comments are given as footnotes, highlighting and italics.
12+
13+
- Organisms must have a **balance between robustness and evolvability**, that is, between resisting and allowing change in their own internal states.
14+
- A genome may be robust because it encodes *proofreading and repair systems*[^1] that reduce replication errors or because it is organized such that many *mutations have little effect*[^2] on its phenotype.
15+
- We will focus on genomic robustness to mutations.
16+
- Two mechanisms that could make a genome more robust are *genetic redundancy*, so that many otherwise deleterious mutations are masked, and *proofreading during replication*, so that fewer mutations occur.
17+
- Evolution at **low mutation rates** favors populations that achieve high fitness peaks, even if they are surrounded by steep cliffs, because mutations that push progeny off those cliffs are rare.
18+
- At **high mutation rates**, most offspring carry mutations, and selection favors populations that find lower fitness peaks surrounded by less precipitous mutational chasms.
19+
- Environmental change is a pervasive feature of nature, and those physiological mechanisms that
20+
allow organisms to **adjust to changing environments**, such as by regulating gene expression, will also compensate for the effects of many mutations.
21+
- **Proofreading and repair must inhibit evolvability** because they reduce the production of new beneficial mutations.
22+
- Are robustness and evolvability inversely correlated more generally? Robustness and evolvability might again be positively, rather than negatively, correlated.
23+
- Redundancy can also promote adaptation by **allowing duplicated genes to evolve distinct functions**[^3]
24+
- Evolving populations can also become robust by finding regions of genotypic space that are flat because they contain a high proportion of neutral mutations.
25+
- Deleterious mutations may lead to genetic neighborhoods that are more promising.
26+
- One could ask how robustness and evolvability change depending on whether evolution occurs in **constant or variable environments** [@Meyers2005].
27+
28+
# License
29+
30+
The original paper was published in [PLoS Biology](http://www.plosbiology.org/) under a CC-BY license.
31+
32+
# References
33+
34+
[^1]: Low mutation rate (*U*)
35+
[^2]: Small mutation effect (*s*)
36+
[^3]: The amplification model
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
title: Mean fitness at the mutation-selection balance
2+
---
3+
modified: 2014-04-03
4+
---
5+
date: 2012-10-14
6+
---
7+
author: Yoav Ram
8+
---
9+
category: evolution
10+
---
11+
body:
12+
13+
## Overview
14+
15+
The first post on the [Mutation-Selection Blog](http://blog.yoavram.com) must be about the *mutation-selection balance*, right?
16+
17+
So what is the mutation-selection balance?
18+
19+
In evolutionary biology, selection acts to remove deleterious mutations from the population, while mutation generates new deleterious mutations.
20+
When they cancel each other out, the population is at the **mutation-selection balance**.
21+
22+
We'll start by defining **fitness**.
23+
In the following treatment, the fitness of an individual is his reproductive success compared to the reproductive sucess of the
24+
most succesful individual in the population.
25+
26+
More formally, denote the fitness of individual *i* at generation *n* by $\omega_{i,n}$,
27+
and define the (population) mean fitness at generation *n* by $\bar{\omega}_n = E_i[\omega_{i,n}]$.
28+
29+
At the mutation-selection balance the mean fitness is at an equilibrium, that is, it doesn't change from one generation to the next:
30+
$$
31+
\bar{\omega}_{n+1} = \bar{\omega}_n
32+
$$
33+
The value of this equilibrium is denoted by $\bar{\omega}^\star$.
34+
35+
A classical result by [@Kimura1966] involves a system in which an infinite population is evolving under *selection* and *mutation*.
36+
Mutation is unidirectional and deleterious and occurs with a rate *U*, selection is constant and uniform, the enivronment is constant, and there is no drift, sex, recombination or migration.
37+
This is a simplistic model but one that is able to capture the dynamics of some complex systems.
38+
The elegant result is that the mean fitness of a population is not dependent on selection strength and is
39+
an exponentialy decreasing function of the mutation rate *U*:
40+
$$
41+
\bar{\omega}^\star = e^{-U}
42+
$$
43+
44+
## Single locus
45+
46+
In this section I roughly follow the route of [@Gillespie2004].
47+
To reach this formula in a simple way (all you need is some straightforward *Calculus* and a little bit of *Genetics*),
48+
we start by looking at a single locus[^locus] with
49+
two alleles[^allele], denoted by *A* and *a*, which have fitness of *1* and *1-s*, respectively,
50+
with *s* playing the part of the *selection coefficient* which defines the deleterious multiplicative effect a deleterious mutation has on the
51+
fitness of an individual.
52+
53+
Define *p* and *q* to be the frequencies of *A* and *a* so that *p+q=1*.
54+
Denote the probability that the wild-type allele *A* mutates to allele *a* by $\mu$
55+
(without back-mutations, that is, *a* doesn't mutate back to *A*),
56+
and denote the frequency of *A* after one generation by *p'*[^pprime]:
57+
$$
58+
p' = \frac{p(1-\mu)}{\bar{\omega}}
59+
$$
60+
with the population mean fitness $\bar{\omega} = p + q(1-s)$.
61+
62+
To find the equilibirum value of *p*, one must subtitute $p'=p$ and $q=1-p$:
63+
$$
64+
p = \frac{p(1-\mu)}{p + (1-p)(1-s)} \Rightarrow \\
65+
p(p+(1-p)(1-s)) = p(1-\mu) \Rightarrow
66+
$$
67+
we assume $p\ne 0$ because we are not interested in a population of mutants:
68+
$$
69+
p+(1-p)(1-s) = 1-\mu \Rightarrow \\
70+
p+1-s-p+ps = 1-\mu \Rightarrow \\
71+
-s+ps = -\mu \Rightarrow \\
72+
ps = s-\mu \Rightarrow \\
73+
p = 1-\frac{\mu}{s}
74+
$$
75+
So $p^\star = 1-\frac{\mu}{s}$, that is $q^\star = \frac{\mu}{s}$, which makes sense -
76+
the mutant allele is produced by a rate $\mu$ and eliminated at a rate $s$.
77+
78+
The mean fitness is therefore:
79+
$$
80+
\bar{\omega}^\star = p^\star + (1-p^\star)(1-s) = 1-\frac{\mu}{s} + \frac{\mu}{s} (1-s) =
81+
1-\frac{\mu}{s} + \frac{\mu}{s} - s \frac{\mu}{s} \Rightarrow \\
82+
\bar{\omega}^\star = 1 - \mu
83+
$$
84+
This, however, is the mean fitness due to a single locus, not the entire genome.
85+
86+
## Multiple locus
87+
88+
### Extension of single locus model
89+
90+
Moving on to a multiple locus model with an arbitrary number of loci[^loci], we define the mutation rate at locus *j* as $\mu_j$,
91+
so the mean fitness at the mutation-selection balance in locus *j* is $\bar{\omega}^\star_j = 1 - \mu_j$,
92+
and because fitness is multiplicative:
93+
$$
94+
\bar{\omega}^\star = \prod_{j}{\bar{\omega}_j^\star} = \prod_{j}{1-\mu_j} \Rightarrow \\
95+
ln{(\bar{\omega}^\star)} = \sum_{j}{1-\mu_j}
96+
$$
97+
This can be approximated, because when $x$ is small $ln{(1-x)}\approx -x$,
98+
and $\mu$ is probably at most $\approx 10^{-2}$ or even lower:
99+
$$
100+
ln{(\bar{\omega}^\star)} \approx \sum_{j}{-\mu_j} = -U
101+
$$
102+
as *U* is the mutation rate per genome per generation.
103+
104+
So This is how we can derive an approximation of the mean fitness at the mutation-selection balance:
105+
$$
106+
\bar{\omega}^\star = e^{-U}
107+
$$
108+
109+
You can find this derivation at the begining of a [presentation](http://dx.doi.org/10.6084/m9.figshare.95940)
110+
I gave at the [BioMath Student Journal Club at Tel-Aviv University](http://biomathsjctau.wordpress.com).
111+
112+
### A separate multiple locus model
113+
114+
We can produce the same result without approximations using a different approach.
115+
116+
This time we start with the multiple locus model right away.
117+
Instead of following allele frequencies, though, we follow the frequency of individuals with *i* mutant alleles, or *i* deleterious mutations, which we denote by $p_{i}$.
118+
119+
We assume that the number of mutations per generation is *Poisson* distributed with the mutation rate as the parameter of the distribution,
120+
so that the probability that *k* mutations will occur in an individual with a mutaiton rate of *U* is
121+
$$
122+
\varphi_{U}(k) = \frac{U^k e^U}{k!}
123+
$$
124+
The equation system describing the change in the freuqnecy of individuals with *i* mutant alleles is:
125+
$$
126+
p'_{i} = \sum_{ k=0 }^{i}{ p_{k} \frac{ \omega_{k} } {\bar{\omega}} \varphi_{U} (i-k)}, \; \; \forall i \ge 0
127+
$$
128+
where $\omega_i$ is the fitness of individuals with *i* mutant alleles.
129+
130+
The above equation system can be written in matrix form:
131+
$$
132+
\bar{\omega}p' = Mp
133+
$$
134+
where $p=(p_0,p_1,p_2,...)$ and $M$ is:
135+
$$
136+
M = \left(\begin{array}{cccc}
137+
\omega_0 \varphi_U(0) & 0 & 0 & ...\\
138+
\omega_0 \varphi_U(1) & \omega_1 \varphi_U(0) & 0 & ...\\
139+
\omega_0 \varphi_U(2) & \omega_1 \varphi_U(1) & \omega_2 \varphi_U(0) & ...\\
140+
... & ... & ... & ...
141+
\end{array}\right)
142+
$$
143+
This matrix is called a [transition matrix](http://en.wikipedia.org/wiki/Stochastic_matrix)
144+
because its entries $M_{i,j}$ are the transition probabilities from state *j* to state *i* - the state is the number of mutant alleles.
145+
146+
Now if we set $p^\star=p'=p$ we get $\bar{\omega}^\star p^\star = Mp^\star$, so that $\bar{\omega}$ is an eigenvalue of $M$.
147+
Because $M$ is a triangular matrix, the eigenvalues are simply the elements on the main diagonal[^diagonal].
148+
We can use the first equation to find the value of $\bar{\omega}$, assuming $p^{\star}_0 > 0$:
149+
$$
150+
\bar{\omega}^\star p^{\star}_0 = \omega_0 \varphi_{U}(0) p^{\star}_0 \Rightarrow \\\\
151+
\bar{\omega}^\star = \omega_0 \varphi_{U}(0) = e^{-U}
152+
$$
153+
154+
Note that if beneficial mutations or back-mutations were allowed in this model,
155+
we would not be able to find the population mean fitness so easily, because the matrix would not be triangular.
156+
However, in that case we could use the _Perron-Frobenius theorem_ to find that $\bar{\omega}^\star$ is the leading eigenvalue
157+
of the $M$. I've used this approach in our article *The Evolution of Stress-Induced Hypermutation in Asexual Populations* [@Ram2012].
158+
159+
## Summary
160+
161+
We've seen how to find the population mean fitness at the mutation-selection balance $\bar{\omega} = e^{-U}$.
162+
163+
The advantage in the multiple locus model method is that we get some intuition on *why* the population mean fitness is equal to e^-U^.
164+
We found that the population mean fitness at the mutation-selection balance equals
165+
the probability that the fittest individuals survive to the next generation without mutating.
166+
By definition the fitness of the fittest individuals is 1, and we assumed the number of new mutations is *Poisson* distributed,
167+
and therefore we got e^-U^, but if we change these assumptions the general result will still hold:
168+
169+
> The mean fitness of an asexual population at the mutation-selection balance,
170+
> in the absence of beneficial mutations,
171+
> is the product of the fitness of the fittest individuals and the probability that no mutations occur.
172+
173+
What's left?
174+
175+
The next step - in the next post - will be to derive a formula for the mean fitness at each generation.
176+
This is important because we need to understand how *rapidly* the mean fitness converges towards the equilibrium value.
177+
Can we really assume that the evolutionary process has reached the mutation-selection balance in calculations we perform?
178+
179+
One article that presents an analysis on this subject is [@Gordo2005], which shows how to derive the mean fitness of a population at genearation *n*.
180+
This is still a simple asexual population with directional selection and unidirectional deleterious mutations,
181+
but it is still very interesting, and I'll try to post a comprehensive explanation on how it can be done.
182+
183+
## References
184+
185+
[^locus]: A site on the genome which may be occupied by different alleles. The function of a locus can be diverse - genes, transcription control sequences, etc.
186+
[^allele]: A specific sequence occupying a locus, with a specific function. One locus can potentially contain different alleles, each with a slightly different sequence and potentially drasticly different effects on function.
187+
[^pprime]: A note on notation - *p'* here is *not* the derivative of *p* but rather the value of *p* at the next generation. The notation is sometimes confusing but is customary in *population genetics*. All equations presented here are *difference equations*, not *differential equations*.
188+
[^loci]: The plural of *locus*.
189+
[^diagonal]: To prove this, one must notice that the determinant of a triangular matrix is the trace of the matrix, and therefore the characteristic polynomial is the trace of the matrix $I\lambda - M$, and the eigenvalues are the solutions of this polynomial - see [Paul's online math notes](http://tutorial.math.lamar.edu/Classes/LinAlg/EVals_Evects.aspx#EV_EvalEvec_Thm1).
+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
title: Muller's ratchet
2+
---
3+
category: evolution
4+
---
5+
date: 2013-12-22
6+
---
7+
author: Yoav Ram
8+
---
9+
body:
10+
11+
Following Gordo & Charlesworth [-@Gordo2000].
12+
13+
This Wright-Fisher model starts with a haploid asexual population at a mutation-selection balance. The population size is $N$, the mutation rate is $u$ and the selection coefficient is $s$.
14+
15+
Denote the frequency of the best class by $x$ and its initial value $x_0 = e^{-u/s}$. The variance of $x$ due to binomial sampling of $N$ individuals from the previous generations is
16+
$$
17+
b(x) = \frac{x(1-x)}{N} \approx \frac{x}{N},
18+
$$
19+
20+
assuming $x \ll 1$. This follows from the variance of a binomial distribution: $Var(Bin(n,p)) = np(1-p)$.
21+
22+
The expected change in $x$ due to mutation and selection is, assuming $\bar{\omega}$ is the current population mean fitness and $\Delta \bar{\omega}$ is the difference between the mutation selection balance (MSB) and the current population mean fitness:
23+
$$
24+
a(x) = \frac{x(e^{-u} - \bar{\omega})}{\bar{\omega}} = x \frac{\Delta \bar{\omega}}{\bar{\omega}},
25+
$$
26+
where the [MSB mean fitness is $e^{-u}$](/mean-fitness-at-the-mutation-selection-balance/).
27+
28+
This follows from the standard difference equation of the frequency of type $z$ after one generation:
29+
$$
30+
f'(z) = f(z) Pr(no \; mutation) \frac{\omega(z)}{\bar{\omega}}
31+
$$
32+
33+
assuming the number of mutations is Poisson distributed with mean $u$ and that the best class has fitness 1.
34+
35+
Next, assume that throughout the process the mean fitness is close enough to the MSB value so that $\Delta \bar{\omega}$ can be modeled as a perturbation. Furthermore, the perturbations are assumed to be a result of fluctuations in the frequency of the best class, $x$.
36+
37+
The mean fitness close to the MSB as a function of $x/x_0$ is expressed as a Taylor expansion around 1:
38+
$$
39+
\bar{\omega} (\frac{x}{x_0}) \approx \bar{\omega}_{eq} + [\frac{\partial \bar{\omega}}{\partial \frac{x}{x_0}}]_{eq} (\frac{x}{x_0}-1) + O((\frac{x}{x_0}-1)^2).
40+
$$
41+
42+
This gives a linear approximation for $\Delta \bar{\omega}$ when it is small, that is, when $x\approx x_0$:
43+
$$
44+
\Delta \bar{\omega} \approx K (1-\frac{x}{x_0}), \; K = x_0 [\frac{\partial \bar{\omega}}{\partial x}]_{eq}.
45+
$$
46+
47+
Set $K=0.6 s e^{-u}$ and use this for $a(x)$:
48+
$$
49+
a(x) \approx 0.6 s (1-\frac{x}{x_0}) x.
50+
$$
51+
52+
Using $a(x)$ and $b(x)$ as the drift and diffusion coefficients in a diffusion equation, the time spent in the frequency interval $[0,x_0]$ is:
53+
$$
54+
T_{0,x_0} = \int_0^{x_0}{\frac{2N}{x G(x)} {\int_0^x{G(x')d x'}} dx},
55+
$$
56+
57+
and the time spent in the interval $[x_0,1]$ is:
58+
$$
59+
T_{x_0,1} = \int_{x_0}^1{\frac{2N}{x G(x)} \int_0^{x_0}{G(x') dx'} dx },
60+
$$
61+
where
62+
$$
63+
G(\xi) = exp[-2 \int_0^{\xi} {\frac{a(z)}{b(z)}dz}] = \\\\
64+
exp[\frac{2N 0.6s}{x_0} \xi (\frac{\xi}{2}-x_0)].
65+
$$
66+
67+
The time to the loss of the best class is then
68+
$$
69+
T(N,u,s) = T_{0,x_0} + T_{x_0,1}.
70+
$$
71+
72+
## References
73+
+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
title: Summary: "Fitness-dependent mutation rates in finite populations" (Shaw and Baer 2011)
2+
---
3+
category: evolution
4+
---
5+
date: 2013-2-19
6+
---
7+
status: draft
8+
---
9+
author: Yoav Ram
10+
---
11+
body:
12+
13+
## Overview
14+
15+
### Presentation of Agrawal's results
16+
17+
They start with a summary of the results of @Agrawal2002, who did an infinite population deterministic model:
18+
19+
* In **asexuals**, the mean fitness of SIM at the mutation-selection balance is euqal to $e^{-U}$, just like non-mutators.
20+
* In **sexuals**, the mean fitness of SIM depends on the curveture of the fitness to mutation rate functions - a curveture of $k>1$ will result in a lower equilibrium mean fitness than a curveture of $k<1$.
21+
* The equilibrium genetic load with SIM of asexuals is therefore lower than that of sexuals, increasing the **two-fold cost of sex**.
22+
23+
### Difference from Agrawal's work
24+
25+
* Finite population size - drift, mutational supply?
26+
* non (log)additive fintess - dominance and epistasis
27+
28+
## Model
29+
30+
They used **individual-based simulations** with *birth*, *selection*, *mating* and *death*. The population size is *finite* and *constant*, generations are *non-overlapping generations* and there are *2,000 loci*. The population is mutation-free at the beginning.
31+
32+
### Fitness
33+
34+
Fitness is *Fisherian*, that is
35+
$$
36+
\omega(i) = (1-s)^i
37+
$$
38+
where *i* is the number of mutations and *s* is the selection coefficient.
39+
40+
With sex, the fitness is $\omega(i) = \prod_{j=1}^{i}{1-h_j s)}$ where *j* is the deleterious locus and $h_j=1$ and $h_j=h$ in homozygous and heterozygous loci and *h* is the dominance coefficient. When $h=0.5$ there is no dominance.
41+
42+
There is a technical detail that for **asexuals *s=0.02*** and for **sexuals *s=0.04*** because of these fitness definitions.
43+
44+
A population mean fitness of 0.05 classifies as an **extinction event**.
45+
46+
**Epistasis** was modeled by setting the fitness to be $\omega(i) = e^{-is+\alpha i^2}$.
47+
48+
### Mutation rate
49+
50+
The mutation rate was determined by Agrawal's [-@Agrawal2002] formula:
51+
52+
$$
53+
U_{i} = U_{max}-(U_{max}-U_{min})\omega(i)^k
54+
$$
55+
56+
with $U_{min}=0.1$ and $U_{max}=4$. The number of mutations per reproduction is Poisson distributed.
57+
58+
### Model flow
59+
60+
- Asexuals:
61+
- Reproduction: an individual is chosen according to its relative fitness.
62+
- Mutation: the offspring mutates according to its parent mutation rate.
63+
- Sexuals:
64+
- Reproduction: two individuals are chosen according to their relative fitness, each produces a gamete by chossing one of the alleles at each locus with 5 random crossovers. Two gametes combine to create a new individual.
65+
- Mutation: the offspring mutates according to its parent mutation rate.
66+
67+
## Results
68+
69+
In this paper Shaw & Baer [-@Shaw2011] present several lines of results but I will only write about the results which are most interesting to me, for comparison to my work.
70+
71+
### Muller's ratchet
72+
73+
As I discussed in a [previous post](/mean-fitness-at-the-mutation-selection-balance/), in an infinitly large asexual population the mean fitness as the equilibirum, called the *mutation-selection balance*, is equal to $\bar{\omega} = \omega_0 e^(-U)$, where $\omega_0$ is the fitness of the fittest individual and $U$ is the genomic mutation rate per genome per generation.
74+
75+
This does not neccesarily hold for finite populations in which *genetic drift* can have an effect on the dynamics. Genetic drift can cause the fixation of deleterious mutation by *random sampling*, and in time the mean fitness of the population can decrease to levels that are so low that the population, in effect, is extinct. This process has been called **[Muller]'s [ratchet]** [@Muller1964, @Felsenstein1974] - at every 'click' of the 'ratchet' a deleterious mutation is fixed in the population, and assuming no recombination and no back-mutations (or very slow rates of these processes), this fixation is irreversible. The rate at which this ratchet clicks is increasing with the mutation rate and decreasing with selection, recombination and populaiton size.
76+
77+
### Analytical treatment
78+
79+
Haigh [-@Haigh1978] derived the stable distribution of deleterious mutations in an asexual population without beneficial mutations. He started from this equation:
80+
$$
81+
n_ik = \frac{N}{T} \sum_{j=o}^{i} n_{i-j} (1-s)^{i-j} \frac{U^j e^{-U}}{j!}
82+
$$
83+
where $n_i$ is the number of individuals with *i* deleterious mutations, $N=\sum_{i \ge 0} n_i$ is the total population size, *s* is the selection coefficient, *U* is the mutaion rate, and $T = \sum_{i \ge 0} n_i (1-s)^i$. He solved for $n_i$ to get this identity:
84+
$$
85+
n_0 = Ne^{-\lambda/s} \\
86+
n_i = n_o \frac{\lambda^i}{s^i i!}, \; \forall i>1
87+
$$
88+
To find the distribution for SIM, Shaw and Baer modified the mutation rates in Haigh's basic equation:
89+
$$
90+
n_i = \frac{N}{T} \sum_{j=o}^{i} n_{i-j} (1-s)^{i-j} \frac{U_{i-j}^j e^{-U_{i-j}}}{j!}
91+
$$
92+
where $U_{i} = U_{max} - (U_{max} - U_{min})(1-s)^{ik}$ is the mutation rate of an individual with $i$ deleterious mutations.
93+
Without beneficial mutations, the population mean fitness is $e^{-U_0}$ and is also equal to $\frac{T}{N}$, where $U_0 = U_{min}$. Therefore,
94+
$$
95+
n_k = e^{U_0} \sum_{j=o}^{i} n_{i-j} (1-s)^{i-j} \frac{U_{i-j}^j e^{-U_{i-j}}}{j!} =
96+
\sum_{j=o}^{i} n_{i-j} (1-s)^{i-j} \frac{U_{i-j}^j e^{U_0 - U_{i-j}}}{j!}
97+
$$
98+
which is Eq. (3) in [@Shaw2011].
99+
100+
### Numerical treatment
101+
102+
Since there are no further equations in the paper, I understand that the rest of the treatment of the mutation distribution is numerical. [Figure 1] shows the distribution of mutations in a stable population for different values of *k*, where *k=0* is a constant mutation rate, *k=1* denotes a linear ratio between mutation rate increase and fitness decrease, and very large *k* is almost a step function. The figure shows that the higher *k* is, the more the distribution is biased towards the left, that is, the less loaded classes. As *k=0* gives a Poisson distribution with $U_0/s$ as the parameter (and the mean, and the variance - nothing like a Poisson distribution!), *k>0* gives a different kind of distribution.
103+
104+
### Asexual populations
105+
106+
107+
108+
109+
## References
110+
111+
[Muller]: http://en.wikipedia.org/wiki/Hermann_Joseph_Muller
112+
[ratchet]: http://en.wikipedia.org/wiki/Ratchet_(device)
113+
[Figure 1]: http://onlinelibrary.wiley.com/store/10.1111/j.1420-9101.2011.02320.x/asset/image_n/JEB_2320_f2.gif?v=1&t=hdgbdo6r&s=e408de2de296548126498e914767d39207b9317a
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
title: Summary: "Mutation rates: How low can you go?" (Sniegowski and Raynes 2013)
2+
---
3+
category: evolution
4+
---
5+
date: 2013-06-16
6+
---
7+
author: Yoav Ram
8+
---
9+
body:
10+
11+
This is a short summary of [Sniegowski and Raynes [-@Sniegowski2013]](http://www.sciencedirect.com/science/article/pii/S0960982213000213), a review about the evolution of the mutation rate, with an emphasis on the **Drift Barrier Hypothesis** (DBH). The summary is written in my own words, with a few footnotes and highlighting that express my thoughts.
12+
13+
1. Because most mutations are deleterious, **selection favors decreased mutation rates**[^1]
14+
2. Then what keeps the mutation rate from dropping to *zero*?
15+
1. One force *could* be **adaptive evolution** which creates selection for the generation of beneficial mutations [^2]. This selection, however, is limited [@Sniegowski2000].
16+
1. Another force can be the fitness cost of increasing genomic replication fidelity[^4]. This doesn't seem to solve the problem, mainly because although the cost of fidelity in prokaryotes should be higher than in eukaryotes, the genomic mutation rate is lower[^5].
17+
1. There is also a physio-chemical constraint on the fidelity of replication and repair mechanisms[^3]. But this constraint should be similar to all species so it cannot explain the diversity.
18+
1. **DBH** [@Sung2012]: Reduction of the mutation rate has a diminishing effect on fitness[^8] and therefore at some point selection towards low mutation rates is weaker than drift. This effect is highly dependent on the **population size**.
19+
3. **"Drake's Rule"**: genomic mutation rates of DNA microbes[^6] are very similar (0.003 mutations per genome per generation) - the per base-pair mutation rate decreases with the genome size [@Drake1991]. This suggest a universal selective force which acts to adjust the mutation rate of microbes. This rule was recently tested and confirmed in *C. reinhardtii* and *M. florum* [@Sung2012a], and it fits with the DBH, as microbes usually have very large populations.
20+
4. In contrast, in **eukaryotes**, however, the per base-pair and genomic **mutation rate increases with genome size**. This fits with the DBH, because eukaryotes presumebly have small effective population sizes.
21+
5. However, it is noted that both mutation rates and effective population sizes are very hard to measure and estimate.
22+
23+
# References
24+
25+
[^1]: The reduction principle [@Liberman1986a]
26+
[^2]: Second-order selection [@Taddei1997; @Sniegowski1997a]
27+
[^3]: However, anti-mutators do exist [@Loh2010], so it seems that the mutation rate is not at its lower physio-chemical level
28+
[^4]: The cost of fidelity argument [@Dawson1998]
29+
[^5]: AFAIK, this cost was mainly shown in viruses so far [@Furio2005], but a recent study did show some direct advantage of mutators which do not depend on replication fidelity *per se* [@Torres-Barcelo2013]
30+
[^6]: That is, not including RNA viruses
31+
[^8]: Why? Because, as we have seen in [previous posts](/mean-fitness-at-the-mutation-selection-balance/), the population mean fitness decays exponentialy as the genomic per generation mutation rate increases: $\bar{\omega} = e^{-U}$.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
title: Summary: "Mutators and sex in bacteria: Conflict between adaptive strategies" (Tenaillon et al. 2000)
2+
---
3+
category: evolution
4+
---
5+
date: 2013-1-14
6+
---
7+
author: Yoav Ram
8+
---
9+
body:
10+
11+
## Overview
12+
13+
This post is mostly a technical summary of the paper by **[Tenaillon, Le Nagard, Godelle and Taddei [-@Tenaillon2000]][Tenaillon]**.
14+
I wrote the summary because I use it as a baseline for my own research,
15+
which involves the evolution of stress-induced mutators [@Ram2012].
16+
17+
The hypothesis the paper deals with is:
18+
19+
> *The existence of genetic exchanges could modify the dynamics of adaptation and limits the success of mutator alleles[^mutators]*.
20+
21+
It is stated that previous models [@Leigh1973; @Johnson1999a] have considered mutators in a sexual population,
22+
but didn't consider the case of adaptation with **multiple beneficial mutations** -
23+
which can involve different _Hill-Robertosn effects_ [@Hill1966].
24+
25+
This hypothesis was tested using simulations.
26+
The main conclusion, in comparison to a previous work in which the authors studies the evolution of mutators [@Tenaillon1999]:
27+
28+
> *Rare genetic exchanges have a dramatic (i.e. negative) effect on the fixation of mutators.*
29+
30+
In addition, the paper presents some evidence on *why* genetic exchanges (recombination) have such an effect of the evolution of mutators.
31+
32+
## Model
33+
34+
The model is an extension of the density-based model[^density-based] used in [@Tenaillon1999].
35+
The extension is the addition of genetic exchanges ("bacterial recombination").
36+
Both **conjugation** and **transformation** were used, but only the results of transformation are shown.
37+
38+
The model is built using:
39+
40+
- Finite populations - genetic drift, clonal interference
41+
- Directional selection - no epistasis, no changing environments
42+
- Several mutations with various fitness effects
43+
- Colonization of a new environment by a single cell - adaptive evolution scenario
44+
45+
### Genome
46+
47+
The basic model of the genome
48+
(in parentheses are the values used in my own work for comparison):
49+
50+
- 1 mutator locus (1)
51+
- 6 loci for beneficial mutations (4+)
52+
- with additive effect on fitness: 0.06, 0.04, 0.04, 0.03, 0.03, 0.03 - mean 0.03833 (0.1)
53+
- all loci treated independently, only one locus will be involved in the process at one time (?)
54+
- 1,000 loci for deleterious mutations (+-1,000)
55+
- with additive effect on fitness: 0.05 (0.1)
56+
57+
### Recombination
58+
59+
- Drawing the number of recieved genes from a *Poisson* distribution
60+
- Randomly choose the sites, according to the number of sites drawn
61+
- Choosing a random allele for each site based on the allele frequency in the population
62+
- Constant gene transfer rate
63+
64+
### Parameters
65+
66+
Rates are modified from the original to units of *events per genome per generation*.
67+
(in parentheses are the rates used in my own work for comparison):
68+
69+
- Mutators increase rates: 100-fold (2-10)
70+
- Beneficial mutations: 6x10<sup>-8</sup> based on 10<sup>-8</sup> per mutation (1.2x10<sup>-5</sup> - 3x10<sup>-5</sup> - x200)
71+
- Deleterious mutations: 10<sup>-4</sup> [@Kibota1996] (3x10<sup>-3</sup> - 2.97x10<sup>-3</sup> [@Drake1991]- x30)
72+
- Lethal mutations: 10<sup>-5</sup> (0)
73+
- Non-mutator to mutator: 5x10<sup>-6</sup> (0)
74+
- Mutator to non-mutator: 100x5x10<sup>-10</sup> = 5x10<sup>-8</sup> (0)
75+
- Genetic exchanges: 0, 0.00001, 0.0001, 0.001, 0.01 and 0.1 (0, 0.015 or 0.75)
76+
- For comparison, *E. coli* do ~5x10<sup>-5</sup> and *H. pylori* ~3x10<sup>-3</sup> [@Milkman1990; @Falush2001].
77+
- Population size: mostly 10<sup>9</sup>, also checked 10<sup>5</sup>-10<sup>10</sup> (10<sup>5</sup>).
78+
79+
## Stats
80+
81+
- Time of adaptation: no. generations for 95% of population to carry all beneficial mutations
82+
- Mutator frequency: mean frequency at end of adaptation process over 1,000 replicates
83+
- Mutator contribution: when mutator frequency < 50% but at least one mutation that appeared in a mutator is present in >50% of population
84+
- Mutator fixation: frequency >50%
85+
86+
## Results
87+
88+
### Recombination reduces mutator fixation
89+
90+
When the rate of genetic exchanges increases, the fixation probability of mutators
91+
decreases. *Figure 1A* shows this very clearly for a 100-fold mutator:
92+
93+
[![Figure 1]](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC27047/figure/F1/)
94+
95+
> Figure 1 from [@Tenaillon2000].
96+
>
97+
> A) Fixation probability of a 100-fold fold mutator, population size 10<sup>9</sup>.
98+
>
99+
> B) Adaptation times of populations with: circle - low mutation rate, square - high mutation rate, triangle - mixed populations.
100+
101+
However, the *B panel* shows that the adaptation time of a mutator population
102+
is still shorter than that of a non-mutator population, even when mutators are loosing.
103+
This is due to the contribution of mutators to adaptation -
104+
in a recombining population mutators are **"altruistic"** alleles because they
105+
give away the beneficial mutations they generate. This causes them to lose their
106+
adaptive advantage and therefore their fixation probability drops,
107+
but it still increases the ability of the whole population to adapt.
108+
109+
Note that the rates of recombination in the figure are *per gene*.
110+
Converted to *per genome* they would be:
111+
0, 10<sup>-5</sup>, 10<sup>-4</sup>, 10<sup>-3</sup>, 10<sup>-2</sup>, 10<sup>-1</sup>,
112+
or in decimal representation:
113+
0, 0.00001, 0.0001, 0.001, 0.01, 0.1.
114+
Another useful presentation is the *ratio of recombination to mutation*,
115+
using the highest genomic mutation rate (10<sup>-4</sup>):
116+
0, 0.1, 1, 10, 100, 1000, or compared to the 100-fold mutator:
117+
0, 0.001, 0.01, 0.1, 1, 10.
118+
119+
So we see that as soon as the *recombination to mutation ratio* is 0.1 or lower
120+
(4^th^ column from the left in *Fig. 1A*, if we consider the 100-fold increae),
121+
the fixation probability of mutators is ~50% or more.
122+
The conclusion here could be that mutators can evolve in a recombining population as long as recombination in not more than 10-fold stronger than mutation
123+
124+
Of course this *10-fold* estimate is highly dependent on the other paramters: the population size, the selection coefficients,
125+
the beneficial mutation rate, not to mention parameters that are not dealt with here such as epistasis.
126+
127+
### Recombination barriers
128+
129+
A recombination barrier, in the context of these simulations,
130+
prevents recombination between mutator and non-mutator individuals,
131+
limiting recombination events to within the sub-populations.
132+
133+
This is useful here because it allows to test if the source of the effect of recombination
134+
on the fixation of mutators is: **1) breaking the linkage** of the mutator with the beneficial mutations it generates,
135+
or **2) competing adaptive strategy**.
136+
137+
The 1^st^ effect is usually called the **hitch-hiking effect**, or **selective sweeps** [@Charlesworth2007]:
138+
mutators can "hitch-hike" with the beneficial mutations they generate to high frequencies as long as the
139+
LD (linkage disequilibrium) between them is intact.
140+
recombination tends to break this LD, robbing the mutators from their precious beneficial mutations.
141+
Even worse, recombination doesn't only take away the beneifical mutations,
142+
it even gives them to the mutators' "rivals" - the competing non-mutator alleles.
143+
144+
The 2^nd^ effect is general - *competing adadptive strategy*. How is recombination an *adaptive strategy*?
145+
146+
Asexual populations are limited by **clonal interference** [@Gerrish1998; @Martens2011].
147+
The following figure illustrates the idea:
148+
149+
[![Clonal Interference](http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Evolsex-dia2a.svg/500px-Evolsex-dia2a.svg.png )](http://en.wikipedia.org/wiki/Clonal_interference)
150+
151+
> Clonal interference diagram from [Wikipedia](http://en.wikipedia.org/wiki/File:Evolsex-dia2a.svg).
152+
> This diagram illustrates how sex might create novel genotypes more rapidly.
153+
> Two beneficial mutations A and B occur at random. The two mutations are recombined rapidly in a sexual population (top),
154+
> but in an asexual population (bottom) the two mutations must independently arise because of clonal interference.
155+
> The effect of recombination and sex on the adaptation rate via the reduction of *clonal interference* is also called the *Fisher-Muller effect*.
156+
157+
If the reduction in fixation probability is due to the 1<sup>st</sup> effect -
158+
separation of the mutators from the beneficial mutations they generate -
159+
then *recombination barriers* are expected to revert the outcome, at least partially, to that of asexual populations.
160+
161+
However, the results showed that *recombination barriers*
162+
didn't recover the fixation probability of mutators to their levels without recombination.
163+
No figure presents the data, but the text provides some information:
164+
7% fixation instead of 60% with beneficial mutation rate 10<sup>-8</sup>
165+
and 0.3% instead of 16% with a rate of 10<sup>-9</sup>.
166+
The conclusion is therefore that the 1<sup>st</sup> effect is not enough to explain
167+
the reduction in the mutators adaptive advantage in the presence of recombination.
168+
169+
### Invasion to a moderate mutator background
170+
171+
To check that the 2<sup>nd</sup> effect is the determining effect,
172+
a 100-fold mutator invaded another mutator (instead of a non-mutator).
173+
The results are in [Figure 2] - in general the fixation probability
174+
of a 100-fold mutator drops rapidly when competing with a 10-fold mutator
175+
and even a 5-fold mutator.
176+
177+
This illustrates that competing adaptive strategies can reduce the fixation of mutators,
178+
and therefore that is is plausible that this is why recombination reduces the fixation of mutators.
179+
180+
### Recombination accelarates adaptation
181+
182+
Setting the recombination rate at 10^-4^ gene conversions per individual per generations,
183+
the effect of other parameters was investigated:
184+
185+
#### Population size
186+
187+
In asexuals, increasing the population size increases the fixation rate of mutators [@Tenaillon1999].
188+
189+
In recombining populations, this is not the case. [Figure 3A][Figure 3] shows that for a population size <10<sup>6</sup>,
190+
recombination has a very small effect on the fixation of a 100-fold mutator. However,
191+
the trends of the fixation probability are completely different for population size >10<sup>6</sup>.
192+
In asexual populations it increases (rapidly after 10^7^), but in recombining populations it decreases and then increases
193+
a bit again at 10^9^, but not much, never surprassing 0.2.
194+
195+
#### Beneficial mutation rate
196+
197+
The lower the beneficial mutation rate, the lower the fixation probability of mutators.
198+
[Figure 4] shows that the fixation probability of mutators starts to increase at a beneficial mutation rate of 10<sup>-9</sup> for asexual populations,
199+
but only at 10<sup>-8</sup> for sexual populations.
200+
201+
#### Selection coefficient of beneficial mutations
202+
203+
[Figure 5] shows that the negative effect of recombination of the fixation of mutators decreases when the selection coefficient of beneficial mutations increases.
204+
205+
For a selection coefficient of 0.01 [@Kibota1996] recombination reduced the fixation probability of mutators 17-fold.
206+
207+
A selection coefficient of 0.1, used in my own work [@Ram2012], falls between the
208+
two right most points of [Figure 5] - 2.5 and 3 - and the fixation probability of a
209+
100-fold mutator allele drops ~10-fold due to recombination at a rate of 10^-4^ per gene per generation
210+
in a population with size 10^9^.
211+
212+
## Discussion
213+
214+
This paper is *packed* with interesting results.
215+
The effect of recombination on mutator evolution has not recieved alot of treatment using simulation
216+
(but see @Levin2009 and @Sloan2010 on which I hope to write some other time).
217+
So this is really interesting to someone interesed in the evolution of the mutation rate, even 12 years later.
218+
219+
This work shows that indeed recombination has an effect on mutator evolution, and that this effect is highly sensitive - it is
220+
(I'm concentrating on when the effect is weak because that's when mutators are still going to evolve):
221+
222+
- Weak in small populations (<10<sup>7</sup>-10<sup>8</sup>)
223+
- Weak for high beneficial mutation rates (>10<sup>-8</sup>-10<sup>-7</sup>)
224+
- Weaker for strong/intermediate selection
225+
226+
It seems that in general the effect of recombination on mutator evolution (that is, on the evolution of high mutation rates)
227+
is weak when the adaptation rate of the population is low.
228+
In turn, the adaptation rate is a function of the **supply of beneficial mutations** which is a function of population size and beneficial mutation rate,
229+
and of **fixation time of beneficial mutations** which is a function of population size and selection strength.
230+
231+
Selection of mutators is **second-order selection**, in the sense that it indirectly affecting mutators.
232+
Because their results imply that second-order selection of mutators is very sensitive to the system parameters,
233+
*Tenaillon et al.* propose that it may be unable to optimize the rates of mutation -
234+
in the sense that mutators will not be selected even when increasing the mutation rate will be beneficial to the population,
235+
in terms of fitness and adaptation rate.
236+
This can be resolved by **transient hypermutation**:
237+
238+
> Sex would therefore help bacteria approach an optimized mutation rate strategy composed of
239+
> shifts towards high mutation rates in phases of adaptation under strong selective pressure
240+
> and rapid recovery of low mutation rate once adaptation is achieved.
241+
242+
This view was also proposed by Ninio [-@Ninio1991] and expanded in a review from the same lab
243+
with the attractive title *The Rise and Fall of Mutator Bacteria* [@Giraud2001a].
244+
245+
I'm not sure if and how these results would change if a weaker mutator (10-fold mutation rate increase?) was used instead of the strong mutator (100-fold).
246+
For example, a paper from the same lab [@Taddei1997]
247+
showed that a 10-fold mutator is more successful in invading finite populations (see [Figure 3A](http://www.nature.com/nature/journal/v387/n6634/fig_tab/387700a0_F3.html)).
248+
249+
I learned alot from this paper (and it predecessors [@Taddei1997; @Tenaillon1999]) about how to think of evolutionary simulations.
250+
And of course the science itself -
251+
the diverse network of interactions and effects between selection, drift, mutation and recombination.
252+
253+
## References
254+
255+
[^density-based]: A density-based model is one where the *number* of individuals in each class is monitored and modified from one generation to the next.
256+
This is in contrast to frequency-dependent models in which the frequency of individuals in each class is monitored.
257+
[^mutators]: Alleles that increase the global mutation rate. For example,
258+
a mutant allele of the *mutS* gene can reduce the efficiency of DNA repair,
259+
allowing more mutations to slip though the repair mechanisms.
260+
261+
[Tenaillon]: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC27047/
262+
263+
[Figure 1]: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC27047/bin/pq1800633001.jpg
264+
[Clonal Interference]: http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Evolsex-dia2a.svg/500px-Evolsex-dia2a.svg.png
265+
266+
[Figure 2]: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC27047/figure/F2/
267+
[Figure 3]: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC27047/figure/F3/
268+
[Figure 4]: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC27047/figure/F4/
269+
[Figure 5]: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC27047/figure/F5/

‎models/blog-post.ini

+2-8
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,11 @@ label = Author
1313
type = string
1414
width = 1/2
1515

16-
[fields.twitter_handle]
17-
label = Twitter Handle
18-
type = string
19-
width = 1/4
20-
addon_label = @
21-
22-
[fields.pub_date]
16+
[fields.date]
2317
label = Publication date
2418
type = date
2519
width = 1/4
2620

2721
[fields.body]
2822
label = Body
29-
type = markdown
23+
type = mathmarkdown

‎models/blog.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ hidden = yes
55

66
[children]
77
model = blog-post
8-
order_by = -pub_date, title
8+
order_by = -date, title
99

1010
[pagination]
1111
enabled = yes
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
build
3+
*.pyc
4+
*.pyo
5+
*.egg-info
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# -*- coding: utf-8 -*-
2+
import re
3+
4+
import mistune
5+
from lektor.pluginsystem import Plugin
6+
from lektor.types import Type
7+
8+
# http://depado.markdownblog.com/2015-09-29-mistune-parser-syntax-highlighter-mathjax-support-and-centered-images
9+
class MathBlockGrammar(mistune.BlockGrammar):
10+
block_math = re.compile(r"^\$\$(.*?)\$\$", re.DOTALL)
11+
latex_environment = re.compile(r"^\\begin\{([a-z]*\*?)\}(.*?)\\end\{\1\}", re.DOTALL)
12+
13+
14+
class MathBlockLexer(mistune.BlockLexer):
15+
default_rules = ['block_math', 'latex_environment'] + mistune.BlockLexer.default_rules
16+
17+
def __init__(self, rules=None, **kwargs):
18+
if rules is None:
19+
rules = MathBlockGrammar()
20+
super(MathBlockLexer, self).__init__(rules, **kwargs)
21+
22+
def parse_block_math(self, m):
23+
"""Parse a $$math$$ block"""
24+
self.tokens.append({
25+
'type': 'block_math',
26+
'text': m.group(1)
27+
})
28+
29+
def parse_latex_environment(self, m):
30+
self.tokens.append({
31+
'type': 'latex_environment',
32+
'name': m.group(1),
33+
'text': m.group(2)
34+
})
35+
36+
37+
class MathInlineGrammar(mistune.InlineGrammar):
38+
math = re.compile(r"^\$(.+?)\$", re.DOTALL)
39+
block_math = re.compile(r"^\$\$(.+?)\$\$", re.DOTALL)
40+
text = re.compile(r'^[\s\S]+?(?=[\\<!\[_*`~$]|https?://| {2,}\n|$)')
41+
42+
43+
class MathInlineLexer(mistune.InlineLexer):
44+
default_rules = ['block_math', 'math'] + mistune.InlineLexer.default_rules
45+
46+
def __init__(self, renderer, rules=None, **kwargs):
47+
if rules is None:
48+
rules = MathInlineGrammar()
49+
super(MathInlineLexer, self).__init__(renderer, rules, **kwargs)
50+
51+
def output_math(self, m):
52+
return self.renderer.inline_math(m.group(1))
53+
54+
def output_block_math(self, m):
55+
return self.renderer.block_math(m.group(1))
56+
57+
58+
class MarkdownWithMath(mistune.Markdown):
59+
def __init__(self, renderer, **kwargs):
60+
if 'inline' not in kwargs:
61+
kwargs['inline'] = MathInlineLexer
62+
if 'block' not in kwargs:
63+
kwargs['block'] = MathBlockLexer
64+
super(MarkdownWithMath, self).__init__(renderer, **kwargs)
65+
66+
def output_block_math(self):
67+
return self.renderer.block_math(self.token['text'])
68+
69+
def output_latex_environment(self):
70+
return self.renderer.latex_environment(self.token['name'], self.token['text'])
71+
72+
73+
class MathRenderer(mistune.Renderer):
74+
75+
# Pass math through unaltered - mathjax does the rendering in the browser
76+
def block_math(self, text):
77+
return '$$%s$$' % text
78+
79+
def latex_environment(self, name, text):
80+
return r'\begin{%s}%s\end{%s}' % (name, text, name)
81+
82+
def inline_math(self, text):
83+
return '$%s$' % text
84+
85+
# https://www.getlektor.com/docs/plugins/howto/#adding-new-field-types
86+
def markdown_to_html(text):
87+
markdown_renderer = MarkdownWithMath(renderer=MathRenderer())
88+
return markdown_renderer.render(text)
89+
90+
91+
# Wrapper with an __html__ method prevents
92+
# Lektor from escaping HTML tags.
93+
class HTML(object):
94+
def __init__(self, html):
95+
self.html = html
96+
97+
def __html__(self):
98+
return self.html
99+
100+
101+
class MathMarkdownType(Type):
102+
widget = 'multiline-text'
103+
104+
def value_from_raw(self, raw):
105+
return HTML(markdown_to_html(raw.value or ''))
106+
107+
108+
class MathMarkdownPlugin(Plugin):
109+
name = u'lektor-math-markdown'
110+
description = u'Add your description here.'
111+
112+
def on_setup_env(self, **extra):
113+
# Derives type name "mathmarkdown" from class name.
114+
self.env.add_type(MathMarkdownType)
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from setuptools import setup
2+
3+
setup(
4+
name='lektor-math-markdown',
5+
version='0.1',
6+
author=u'Yoav Ram',
7+
author_email='yoavram+github@gmail.com',
8+
license='MIT',
9+
py_modules=['lektor_math_markdown'],
10+
install_requires=[
11+
'mistune_contrib'
12+
],
13+
entry_points={
14+
'lektor.plugins': [
15+
'math-markdown = lektor_math_markdown:MathMarkdownPlugin',
16+
]
17+
}
18+
)

‎templates/blog-post.html

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{% extends "layout.html" %}
22
{% from "macros/blog.html" import render_blog_post %}
3+
{% from "macros/mathjax.html" import mathjax %}
34
{% block title %}{{ this.title }}{% endblock %}
45
{% block body %}
56
{{ render_blog_post(this) }}
7+
{{ mathjax() }}
68
{% endblock %}

‎templates/blog.html

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
{% from "macros/pagination.html" import render_pagination %}
44
{% block title %}{{ this.title }}{% endblock %}
55
{% block body %}
6-
{% for child in this.pagination.items %}
7-
{{ render_blog_post(child, from_index=true) }}
8-
{% endfor %}
6+
<h2>Blog</h2>
7+
<ul>
8+
{% for post in this.pagination.items %}
9+
<li><strong><a href="{{ post|url }}">{{ post.title }}</a></strong>
10+
<span class="date">{{ post.date }}</span></li>
11+
{% endfor %}
12+
</ul>
913

1014
{{ render_pagination(this.pagination) }}
1115
{% endblock %}

‎templates/layout.html

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!doctype html>
2+
<head>
23
<meta charset="utf-8">
34
<meta http-equiv="X-UA-Compatible" content="IE=edge">
45
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -11,16 +12,20 @@
1112
<link rel="stylesheet" href="{{ '/static/css/font-awesome-extension.min.css'|url }}">
1213
<!-- Academicons http://jpswalsh.github.io/academicons/ -->
1314
<link rel="stylesheet" href="{{ '/static/css/academicons.min.css'|url }}"/>
14-
15+
<!-- Site Stylesheet -->
1516
<link rel="stylesheet" href="{{ '/static/css/style.css'|url }}">
16-
17+
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
18+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
19+
1720
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
1821
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
1922
<!--[if lt IE 9]>
2023
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
2124
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
22-
<![endif]-->
25+
<![endif]-->
2326
<title>Yoav Ram</title>
27+
{% block head %}{% endblock %}
28+
</head>
2429
<body>
2530
<!-- Navigation -->
2631
<nav class="navbar navbar-default navbar-fixed-top topnav navbar-inverse" role="navigation">
@@ -130,8 +135,6 @@ <h1>Yoav Ram</h1>
130135
</div>
131136
</div>
132137

133-
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
134-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
135138
<!-- Bootstrap JavaScript -->
136139
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
137140
</body>

‎templates/macros/blog.html

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{% macro render_blog_post(post, from_index=false) %}
22
<div class="blog-post">
33
{% if from_index %}
4-
<h2><a href="{{ post|url }}">{{ post.title }}</a></h2>
4+
<h1><a href="{{ post|url }}">{{ post.title }}</a></h1>
55
{% else %}
6-
<h2>{{ post.title }}</h2>
6+
<h1>{{ post.title }}</h1>
77
{% endif %}
88
<p class="meta">
9-
written by
10-
{% if post.twitter_handle %}
11-
<a href="https://twitter.com/{{ post.twitter_handle
12-
}}">{{ post.author or post.twitter_handle }}</a>
13-
{% else %}
14-
{{ post.author }}
15-
{% endif %}
16-
on {{ post.pub_date }}
9+
<i class='fa fa-calendar fa-fw'></i> <span id="date"></span>
1710
</p>
1811
{{ post.body }}
1912
</div>
13+
<!-- moment.js -->
14+
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.14.1/moment.min.js">
15+
</script>
16+
<script type="text/javascript">
17+
$(document).ready(function() {
18+
$('#date').html(moment('{{ post.date }}').format('MMM Do YYYY'));
19+
});
20+
</script>
2021
{% endmacro %}

‎templates/macros/mathjax.html

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{% macro mathjax() %}
2+
<!-- MathJax -->
3+
<script type="text/x-mathjax-config">
4+
<!-- Doc: http://docs.mathjax.org/en/latest/output.html -->`
5+
MathJax.Hub.Config({
6+
tex2jax: {
7+
// Markdown source can use double-backslash math
8+
// delimiters but PageDown converts \\ -> \ so
9+
// MathJax sees single-backslash delimiters.
10+
inlineMath: [["$","$"], ["\\(","\\)"]],
11+
displayMath: [["$$","$$"], ["\\[","\\]"]]
12+
},
13+
"HTML-CSS": {
14+
availableFonts: ["STIX", "TeX"],
15+
linebreaks: { automatic: true },
16+
imageFont: null
17+
}
18+
});
19+
</script>
20+
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
21+
</script>
22+
{% endmacro %}

‎templates/macros/pagination.html

+24-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
{% macro render_pagination(pagination) %}
2-
<div class="pagination">
2+
<nav aria-label="Page navigation">
3+
<ul class="pagination">
34
{% if pagination.has_prev %}
4-
<a href="{{ pagination.prev|url }}">&laquo; Previous</a>
5+
<li>
6+
<a href="{{ pagination.prev|url }}" aria-label="Previous">
57
{% else %}
6-
<span class="disabled">&laquo; Previous</span>
8+
<li class="disabled">
9+
<a href="#" aria-label="Previous">
710
{% endif %}
8-
| {{ pagination.page }} |
11+
<span aria-hidden="true"><i class="fa fa-arrow-left fa-fw"></i></span>
12+
</a>
13+
</li>
14+
<li>
15+
<a href="#">
16+
{{ pagination.page }}
17+
<span class="sr-only">(current)</span>
18+
</a>
19+
</li>
920
{% if pagination.has_next %}
10-
<a href="{{ pagination.next|url }}">Next &raquo;</a>
21+
<li>
22+
<a href="{{ pagination.next|url }}" aria-label="Next">
1123
{% else %}
12-
<span class="disabled">Next &raquo;</span>
24+
<li class="disabled">
25+
<a href="#" aria-label="Next">
1326
{% endif %}
14-
</div>
27+
<span aria-hidden="true"><i class="fa fa-arrow-right fa-fw"></i></span>
28+
</a>
29+
</li>
30+
</ul>
31+
</nav>
1532
{% endmacro %}

‎www.yoavram.com.lektorproject

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[project]
22
name = www.yoavram.com
33
url = www.yoavram.com
4-

0 commit comments

Comments
 (0)
Please sign in to comment.