# Class diary

What we covered in each class, with links to the corresponding sections of the notes.

**Tue 22/9** — Logistics and exam, then the shape of the whole course: [what we will write, and what it leaves out](l0.html#what-we-will-write-and-what-it-leaves-out). We built exponential growth from [the simplest scenario, birth and death](l1.html#the-simplest-scenario-birth-and-death), saw the same thing in [discrete generations](l1.html#discrete-generations), and put numbers on it — [orders of magnitude](l1.html#orders-of-magnitude) and [what fraction of all humans ever born is alive today](l1.html#what-fraction-of-all-humans-ever-born-is-alive-today). The rest of the class was about why identical cultures do not grow identically: [the observation](l2.html#the-observation), [what a rate is](l2.html#what-a-rate-is), and the fact that [the mean obeys the deterministic equation](l2.html#the-mean-obeys-the-deterministic-equation). We wrote the [master equation](l2.html#master-equation), and of the [probability generating function](l2.html#probability-generating-function) only the idea, not the derivation.

**Thu 24/9** — We went back to [the observation](l2.html#the-observation) of stochasticity in trajectories and asked what the mean misses: [the second moment and the variance](l2.html#the-second-moment-and-the-variance), the [expected number of deaths](l2.html#expected-number-of-deaths) and the [extinction probability](l2.html#extinction-probability). We derived them from the birth–death process and compared them with experiments. We closed with how to simulate the process exactly, [the Gillespie algorithm](l2.html#simulating-exactly-with-gillespie). [What survivors look like](l2.html#what-survivors-look-like) is left to the notes.

**Tue 29/9** — Mutations. From the [biology](l3.html#biology-intro) (bacteria crossing bands of antibiotic, and the two hypotheses: resistance acquired on contact, or already there by chance) to the [setup](l3.html#setup) of Luria and Delbrück's experiment. Under [acquired resistance](l3.html#hypothesis-a.-acquired-resistance-lamarckian) the counts are Poisson. Under [spontaneous mutation](l3.html#hypothesis-b.-spontaneous-mutation) we computed the mean, wrote [the exact recursion](l3.html#the-exact-recursion), and approximated the distribution by following the first mutant: [heuristics and approximation of the tail](l3.html#heuristics-and-approximation-of-the-tail) and its [moments](l3.html#moments). Same mean, very different fluctuations. The end was rushed and it will be recapped next class.

**Mon 5/10** — First a slower recap of Luria and Delbrück: from the [first mutant](l3.html#heuristics-and-approximation-of-the-tail) to the $1/M^2$ tail and its [moments](l3.html#moments), checked against simulations, the 1943 data and a modern version of the experiment with DNA barcodes. Then we started [L4, limits to growth](l4.html): the exponential curves of L1 eventually flatten, [Malthus](l4.html#malthus)' argument, and Verhulst's [logistic growth](l4.html#logistic-growth-as-an-effective-model), solved exactly and made dimensionless. We stopped before the [graphical method](l4.html#graphical-method-for-long-term-behavior), where the next class starts.

**Wed 7/10** — Long-term behaviour without solving the equation: the [graphical method](l4.html#graphical-method-for-long-term-behavior) and [fixed points and their stability](l4.html#fixed-points-and-their-stability), by linearization. Then we made the limit to growth explicit: [growth on limited resources](l4.html#growth-on-limited-resources), introducing yield and a growth rate that depends on the resource concentration. We derived it from the kinetics of transporters and enzymes ([why growth saturates](l4.html#why-growth-saturates)) and compared with Monod's data. We wrote the equations of a population consuming its resource. The analysis is for the next class.

**Fri 9/10** — After a recap of [why growth saturates](l4.html#why-growth-saturates), we included the resource explicitly in the population dynamics. With a fixed stock of resource, the population grows until the resource is used up. We compared this with the *E. coli* curves. With a constant supply of resource the population settles where the supply feeds the losses. In both cases [the carrying capacity](l4.html#what-a-carrying-capacity-is) is set by the environment, not by the species alone. We closed with [extinction](l4.html#extinction) under increasing mortality, and introduced the transcritical bifurcation.

**Mon 12/10** — Some populations grow *faster* as they become more abundant: [positive density dependence](l5.html#positive-density-dependence), or the Allee effect, with examples from mating to enzymes shared between cells. We wrote [the simplest model](l5.html#the-simplest-model), a per-capita growth rate shaped as a parabola, and read its long-term behaviour with the [graphical method](l5.html#graphical-solution): a weak Allee effect only slows early growth, while a strong one creates a threshold below which the population goes extinct. Then [the experiment](l5.html#the-experiment-yeast-on-sucrose): yeast growing on sucrose, transferred every day into fresh medium, where diluting the culture acts as a mortality. We wrote the model with mortality; its analysis, starting from [changing mortality](l5.html#changing-mortality-in-allee-effect), is for the next class.

**Fri 16/10** — After a recap of the yeast experiment and of the model with mortality, we analysed [what happens when we change mortality](l5.html#changing-mortality-in-allee-effect). We found the [fixed points](l5.html#fixed-points), checked [when they exist and when they are positive](l5.html#feasibility-when-do-the-fixed-points-exist), and computed their [stability](l5.html#stability). Then we redid everything with the graphical method and drew the fixed points as a function of $m$to study the  [two bifurcations](l5.html#two-bifurcations) ([catastrophe and hysteresis](l5.html#catastrophe-and-hysteresis)). We went back to [the yeast data](l5.html#the-experiment-yeast-on-sucrose). After the break we added [immigration](l5.html#immigration-two-folds-and-a-cusp). We started calculating [the fold lines](l5.html#the-bifurcation-points-fold-lines) in the $(m,\lambda)$ plane. Drawing them is for the next class.

**Mon 19/10** — We finished the Allee model with immigration. We calculated [the fold lines](l5.html#the-bifurcation-points-fold-lines) in the $(m,\lambda)$ plane. Shifting the variable to the cusp gives [the normal form of the cusp](l5.html#normal-form-of-the-cusp-and-the-potential) showing that it is the same picture as the mean-field Ising model. Then we started [competition](l6.html) with [Gause's experiments](l6.html#two-species-in-a-tube): two species that grow well alone do not coexist when put together. We wrote the [Lotka–Volterra model](l6.html#lotkavolterra-competition) of competition, found its four [fixed points](l6.html#fixed-points), and started to study their stability with the [nullclines](l6.html#nullclines). We will finish the analysis for all the parameters scenario next time.

**Wed 21/10** — Guest Lecture by [Onofrio Mazzarisi](https://onofriomazzarisi.github.io/): *Quantitative principles of microbial growth and biodiversity*. The [slides](extra-mat.html#guest-lecture-by-onofrio-mazzarisi) are in the additional material.

**Fri 23/10** — Why we shifted to the cusp: near a bifurcation only the lowest terms of the expansion matter, and they set its [normal form](l5.html#normal-form) (fold, transcritical, pitchfork). Back to competition, we used the [nullclines](l6.html#nullclines) for all the parameters and found [the four outcomes](l6.html#the-four-outcomes): coexistence, exclusion of one or the other species, and bistability, where a separatrix divides the two basins. To do the same without drawing, we linearized around a fixed point in more dimensions ([why linear systems](s1.html#why-linear-systems)) and solved the linear system for a [symmetric matrix](s1.html#symmetric-matrix), projecting on its eigenvectors. At [long times](s1.html#long-times) the largest eigenvalue decides stability.

**Wed 28/10** — More linear algebra. A linear system has [a potential](s1.html#a-potential) only if its matrix is symmetric. A [non-symmetric matrix](s1.html#non-symmetric-matrix) needs [left and right eigenvectors](s1.html#left-and-right-eigenvectors), and [complex eigenvalues give oscillations](s1.html#complex-eigenvalues-give-oscillations): spirals and centers, as in [the harmonic oscillator](s1.html#the-harmonic-oscillator). In [two dimensions](s1.html#two-dimensions) the trace and the determinant are enough. Back to Lotka–Volterra: the Jacobian at the fixed points ([extinction](l6.html#extinction), [one species alone](l6.html#one-species-alone), [coexistence](l6.html#coexistence)) gives the same four outcomes, and so does invasion analysis: can a rare species grow when the other is at its carrying capacity? We closed with pairs of soil bacteria under serial dilution, where the winner changes with the dilution, and started [adding mortality](l6.html#adding-mortality) to the model.

**Fri 30/10** — With [mortality](l6.html#adding-mortality) the effective interactions change but their product does not. Increasing mortality favours the fast grower, passing through coexistence or through bistability, as in the bacterial data. With [many species](l6.html#many-species-with-symmetric-interactions) there are up to $2^S$ fixed points. If the interactions are symmetric, there is a Lyapunov function. After the break we started [selection](l7.html), with [resistant and susceptible bacteria in the same tube](l7.html#resistant-and-susceptible-in-the-same-tube). For [two types growing exponentially](l7.html#two-types-growing-exponentially) the frequency follows a logistic, with the selection coefficient as rate, and a [limit to growth](l7.html#limits-to-growth) common to all types does not change it. With many types this is [the replicator equation](l7.html#many-types-the-replicator-equation). In the data, resistance has a cost without antibiotic and is selected far below the concentration that stops the susceptible cells: fitness depends on the environment. The analysis of the replicator equation is for the next class.

**Wed 4/11** — We analysed [the replicator equation](l7.html#many-types-the-replicator-equation). Its [fixed points](l7.html#fixed-points) are the $S$ states with one type alone, and only the fittest is [stable](l7.html#stability). [Fisher's fundamental theorem](l7.html#fishers-fundamental-theorem): the mean fitness grows at a rate equal to the variance of fitness. The [Price equation](l7.html#price-equation) does the same for a trait, whose mean changes as its covariance with fitness. After the break we started [what evolution is](l8.html): [two quotes](l8.html#two-quotes), why [species are not fundamental](l8.html#species-are-not-fundamental) (clusters of traits, interbreeding, ring species), and [evolution as change in heritable characteristics](l8.html#evolution-is-change-in-heritable-characteristics), with the sources of heritable variation. We closed with the map of lactose intolerance: the question is what changes the frequency of a trait.

**Fri 6/11** — The [mechanisms](l8.html#mechanisms) that change the frequency of heritable traits: natural selection, which acts on existing variation, migration, genetic drift (the bottleneck of the northern elephant seal) and sexual selection. [Evolution is not](l8.html#what-evolution-is-not) a path towards more complexity: some parasites descend from much more complex ancestors, and complexity has a cost. The [outcomes](l8.html#outcomes) are extinction, adaptation and speciation, and the time scale separates micro- and macroevolution. Lactase persistence as an example of microevolution: independent mutations in different populations, which spread where drinking milk became essential. We started the [evidence for macroevolution](l8.html#evidence-for-macroevolution): comparing bones and genes gives a hierarchy of similarities, explained by common ancestors. We will continue from there.

**Mon 9/11** — Microevolution we can watch, macroevolution we have to infer. Comparing bones and genes gives a tree, but why should the tree be a history? We went through the [evidence for macroevolution](l8.html#evidence-for-macroevolution). Exhaptation, Convergence, Poor design, Atavisms. s We closed this part with the tree of life built from ribosomal proteins. After the break we outlined the next lectures (population genetics, then predation and coevolution) and started population genetics with [heterozygosity](l9.html#heterozygosity), the probability that two individuals are of different types. The neutral diversity of many species, plotted against their [population size](l9.html#diversity-against-population-size), is about $10^{-2}$ per site or less: is this a lot or a little? To answer, we wrote the simplest model of [genetic drift](l9.html#genetic-drift), the [Moran model](l9.html#moran-model), and found that the mean number of each type does not change. 

**Wed 11/11** — In the [Moran model](l9.html#moran-model) the mean does not change, but the heterozygosity decays exponentially, at a rate $2/N$ per generation. [Drift](l9.html#genetic-drift) destroys variation, slowly: in the end every population has a single type, because a type that is lost cannot come back. The result does not depend on the number of types. Then we added [mutations](l9.html#mutation-and-drift), each creating a new type, and wrote the equation for the probability that two individuals are of the same type. Mutation and drift balance at $H^*=\theta/(1+\theta)$, with $\theta=N\mu$. Compared with the data, the prediction is off by orders of magnitude:  [Lewontin's paradox](l9.html#lewontins-paradox). We saw two of the explanations of [why diversity is so low](l9.html#why-is-diversity-so-low): the [effective population size](l9.html#effective-population-size), the harmonic mean of the population size over time, dominated by bottlenecks, and the [time](l9.html#time) it takes to reach the balance. The third explanation, with an experiment where everything is known, is for Friday.

**Fri 13/11** — Back to [why diversity is so low](l9.html#why-is-diversity-so-low). The [effective population size](l9.html#effective-population-size) is lowered by bottlenecks, but also by space and by a large variance in the number of offspring, and it cannot be measured independently. The balance takes about $N$ generations to reach ([time](l9.html#time)). And neutral sites are not independent of the rest of the genome: they hitchhike with selected mutations ([selection at linked sites](l9.html#selection-at-linked-sites)). We also discussed why a model with [infinitely many alleles](l9.html#mutation-and-drift) describes a site, where there are only two. In the [long-term evolution experiment](l9.html#long-term-evolution-experiment) we know the population size and the history. Along a single line of descent, synonymous mutations accumulate linearly, at the mutation rate. But the [diversity in the LTEE](l9.html#diversity-in-the-ltee) is far below the neutral prediction, as if the population were a thousand times smaller: Lewontin's paradox, where the explanation is selection. Nonsynonymous mutations accumulate faster than synonymous ones, and the frequencies of the mutations show sweeps ([mutations in the LTEE](l10.html#mutations-in-the-ltee)). How likely is a sweep? We started from the [fixation of a neutral mutation](l10.html#fixation-of-a-neutral-mutation): probability $n/N$, and $1/N$ for a new mutation.

**Mon 16/11** — Selection in a finite population. In the [Moran model with selection](l10.html#moran-model-with-selection) the mean frequency follows the replicator equation only when the fluctuations are negligible. The [fixation probability](l10.html#fixation-probability) of a new mutant depends on $Ns$. [the fate of a new mutation is decided while it is rare](l10.html#the-fate-of-a-new-mutation-is-decided-while-it-is-rare), by the birth–death process. If $|Ns|\ll1$ it fixes with probability $1/N$, as if it were neutral. A deleterious mutation can fix too. In the LTEE, however, the probability that a mutation fixes, given its frequency, looks neutral. Sweeps there do not come [one at a time](l10.html#one-sweep-at-a-time): a new successful mutation appears before the previous one has fixed, and whether a mutation fixes depends on the genome where the next one lands. This is [clonal interference](l10.html#clonal-interference), and fixation becomes [quasi-neutral](l10.html#quasi-neutral-fixation).
