Eco-evolutionary dynamics of adapting pathogens and host immunity
eLife Assessment
This important study provides a new perspective on how human immunity shapes the antigenic evolution of pathogens. By combining theory and simulation the authors make a compelling case for the importance of eco-evolutionary interactions in population-level virus-host dynamics, which arise due to coupling between the dynamics of immune memories and viral variants. Although the work does not propose improved data-driven viral forecasting methods, it makes a conceptual contribution that advances the field's understanding of this problem's intrinsic difficulty.
https://doi.org/10.7554/eLife.97350.3.sa0Important: Findings that have theoretical or practical implications beyond a single subfield
- Landmark
- Fundamental
- Important
- Valuable
- Useful
Compelling: Evidence that features methods, data and analyses more rigorous than the current state-of-the-art
- Exceptional
- Compelling
- Convincing
- Solid
- Incomplete
- Inadequate
During the peer-review process the editor and reviewers write an eLife Assessment that summarises the significance of the findings reported in the article (on a scale ranging from landmark to useful) and the strength of the evidence (on a scale ranging from exceptional to inadequate). Learn more about eLife Assessments
Abstract
As pathogens spread in a population of hosts, immunity is built up, and the pool of susceptible individuals are depleted. This generates selective pressure, to which many human RNA viruses, such as influenza virus or SARS-CoV-2, respond with rapid antigenic evolution and frequent emergence of immune evasive variants. However, the host’s immune systems adapt, and older immune responses wane, such that escape variants only enjoy a growth advantage for a limited time. If variant growth dynamics and reshaping of host-immunity operate on comparable time scales, viral adaptation is determined by eco-evolutionary interactions that are not captured by models of rapid evolution in a fixed environment. Here, we use a Susceptible/Infected model to describe the interaction between an evolving viral population in a dynamic but immunologically diverse host population. We show that depending on strain cross-immunity, heterogeneity of the host population, and durability of immune responses, escape variants initially grow exponentially, but lose their growth advantage before reaching high frequencies. Their subsequent dynamics follows an anomalous random walk determined by future escape variants and results in variant trajectories that are unpredictable. This model can explain the apparent contradiction between the clearly adaptive nature of antigenic evolution and the quasi-neutral dynamics of high-frequency variants observed for influenza viruses.
Introduction
Many human RNA viruses adapt rapidly to evade pre-existing immunity and re-infect humans multiple times over their lifetime. The most prominent examples of this evolution are influenza virus and SARS-CoV-2 (Roemer et al., 2023; Petrova and Russell, 2018), for which the changing virus population is surveilled in great detail and vaccines are updated regularly. To improve the match between the virus population and the vaccine, several groups are working on predictive models to anticipate the variants that dominate future viral populations (Morris et al., 2018; Meijers et al., 2023).
A common framework to model the rapid evolutionary dynamics of RNA viruses is to consider a population located away from the fitness optimum and with many accessible beneficial mutations (Tsimring et al., 1996). In this setting, clones compete to accumulate beneficial mutations as quickly as possible. In a process called selective sweep, successful variants expand and tend to be the ancestors of the future population while less successful mutants eventually disappear. The resulting fitness distribution is a wave traveling along the fitness axis, the so-called traveling fitness waves Rouzine et al., 2003; Desai and Fisher, 2007; Neher, 2013. As the pathogen circulates, hosts develop immunity which leads to a ‘deterioration of the environment’ for the pathogen which approximately balances the increase in average fitness due to adaptation.
The traveling wave framework has been extensively used in this context as it allows for a straightforward ways to approach the prediction problem: each variant is assumed to have a fixed fitness relative to other variants, and inferring the fitness of all competing variants should allow prediction of the future composition of the population. Indeed, current methods typically infer the instantaneous growth advantage of a strain based on past and present circulation and then project this growth advantage forward in time Luksza and Lässig, 2014; Neher et al., 2014; Huddleston et al., 2020. While future mutations can reshuffle the relative fitness of lineages and thereby limit predictability, in these models a lineage that is most fit at any given time is most likely to dominate in the long run.
One short-coming of the traveling wave approach is the lack of explicit representation of the epidemiological dynamics and of the host’s immunity. Indeed, fitness is only an effective parameters that summarize the complex interplay between viral antigenic properties and the hosts’ immune systems. As such, it cannot explicitly describe important phenomena such as the build-up of host immunity to new variants, variant-specific immunity, or the interaction between strains through antigenic cross-reactivity. Taking the hosts’ immunity and viral cross-immunity into account has the potential to strongly improve predictions Meijers et al., 2023 or explain why prediction is difficult (Barrat-Charlaix et al., 2021).
The interaction between epidemiological dynamics and hosts’ immunity are often modeled using generalizations of the Susceptible-Infected-Recovered model (SIR) to include multiple viral strains Gupta et al., 1998; Gog and Grenfell, 2002. In this setting, the natural question is that of the ultimate fate of the pathogen: will it go extinct, diversify to the point of speciation, or reach the so-called Red Queen State where new strains continuously replace old ones Yan et al., 2019; Marchi et al., 2021; Chardès et al., 2023; Rouzine and Rozhnova, 2018. To remain tractable, these studies typically approximate population immunity as a low-dimensional landscape in which the viral population evolves and ignores the complex heterogeneity in the immunity of different individuals. Furthermore, immunity is often assumed to be long-lived, and evolution of the pathogen in a stable low dimensional landscape gives rise to traveling waves.
Here, we study how novel variants of a virus shape the host population’s immunity, which in turn changes their own growth dynamics. To do so, we use a multi-strain SIR model combining immune waning and heterogeneous immunity of the hosts. Such heterogeneity has been demonstrated for influenza virus in individuals of different ages Lee et al., 2019; Welsh et al., 2023. We show that this model generically leads to a situation where novel immune evasive variants emerge. In a homogeneous population of hosts, this leads to a succession of selective sweeps where novel variants compete against each other and replace previously circulating variants. However, in a heterogeneous population with a more rapid waning of immunity, initially growing variants lose their selective advantage before reaching fixation due to immunological adjustment of the host population. The phenomenology of our epidemiological model is reminiscent of ecological systems such as consumer-resource models, where adaptation by one species shifts the global equilibrium and distribution of other species but does not necessarily result in a selective sweep Good et al., 2018. In these systems, adaptation can usually not be modeled by a fixed fitness parameter for each strain but rather depends on the composition of the population Tikhonov and Monasson, 2018.
Strain dynamics in our model differ qualitatively from what is expected in the traveling wave scenario. While adaptive mutations are highly overrepresented in genetic diversity, they cease having a growth advantage when reaching intermediate frequencies, a process we call ‘expiring fitness.’ Once the fitness effect of a mutation has expired, its frequency randomly changes up or down as subsequent adaptive mutations occur on the same or on different genomic backgrounds.
This resemblance to neutral evolution could have important consequences for predictability of viral evolution. It is interesting to relate this to the recent observations that the evolution of influenza is not as predictable as one would expect from typical models Huddleston et al., 2020; Barrat-Charlaix et al., 2021. In particular, we observed in Barrat-Charlaix et al., 2021 that the frequency trajectories of mutants of A/H3N2 influenza show features that are expected in neutral evolution but hard to explain in a traveling wave framework.
Results
Multi-strain SIR model
We describe the interaction of several viral strains and host immunity using a Susceptible/Infected compartmental model, similar to those used in Gog and Grenfell, 2002; Yan et al., 2019. In the most general form, the model describes variants of the virus labeled circulating among groups of hosts with distinct exposure histories labeled (immune groups). These groups could be different age cohorts or could be geographically separated. For each group , we define compartments and as, respectively, the number of individuals of this group infected or susceptible to strain . We assume that the total population of hosts is 1 so that we always have , and values of and can be interpreted as fractions of the host population.
As with usual compartmental models, we assume that the dynamics are driven by the interaction of susceptible and infected hosts, leading to infections and gains of immunity. The rate at which hosts of group susceptible to variant are infected by is . Here, is an overall infection rate while represents the probability of an encounter between individuals of groups and . Thus, the above rate takes into account infections with strains caused by hosts of all groups. Considering that infected hosts recover at rate , we can thus write the dynamics for :
When a host of group is infected by strain , it gains immunity against the infecting strain , but also to other strains with probability . Thus, decreases at a rate proportional to and to the number of hosts infected by for every strain . Since susceptibles to are depleted by infections from other strains, the dynamics of all strains are coupled. This coupling is determined by the matrices of dimension , which in general differ between groups with different prior exposure history. Additionally, the waning of immunity at a rate causes immune hosts to re-enter the susceptible compartment. We can now write the dynamics of as
where the first term accounts for immunity gains (or loss of susceptibility) due to infections or cross-immunity while the second represents immune waning. This model introduced by Gog and Grenfell, 2002 assumes that immunity builds up through exposure and not only through infection. This explains that the change in is simply proportional to , regardless of the susceptibility of hosts to strain . Alternative models that require infection for acquisition of immunity have qualitatively similar dynamics, but are mathematically more complex (Appendix 1.5). We also represented loss of susceptibility to due to exposure to using a trivial cross-immunity term .
An important property of our model is that the probability of generating cross-immunity can differ between groups. The motivation is that strains and may be perceived as antigenically different by some immune systems, leading to a low , but as highly similar by others, leading to . Such a heterogeneous response by different immune systems has been observed experimentally in the case of influenza: in Lee et al., 2019; Welsh et al., 2023 for instance, it was found that a given mutation in an influenza strain may allow escape from the antibodies of some individuals, i.e., low , while it had little effect on the serum of other individuals, i.e., high . Heterogeneous immune response could be caused by varying histories of strain exposure for different individuals, for instance, due to differences in age or geographical region. If immune groups correspond to age cohorts, mixing between groups is rapid, and we can simplify the connectivity between groups to . If immune groups are shaped by geographic differences in exposure, the connectivity would be close to 1 on the diagonal () while off-diagonal terms would be small ( for ).
Invasion of an adaptive variant
Hosts’ immune heterogeneity and strain cross-immunity play two different roles in the model. The latter allows the model to reach a non-trivial equilibrium where multiple strains co-exist, while the former affects the convergence to the equilibrium.
To illustrate this, we design a simple scenario with only two strains: a wild-type and a variant. Accordingly, indices describing strains will take values . We consider that the two strains share the same infectivity rate , which amounts to say that they would have the same reproductive rate in a fully naive population. The case where the two strains differ in intrinsic fitness is explored in detail in Appendix 1.7. In brief, as long as the difference in intrinsic fitness is not too large compared to cross-immunity effects, the qualitative results given below hold, while larger intrinsic fitness differences lead to more classical dynamics like selective sweeps.
In the first version of this scenario, we will only consider one immune group, that is . We can thus skip the indices , and we only have one cross-immunity matrix that we parametrize as
with . quantifies the amount of ‘backward’-immunity to the wild-type caused by the variant: a large means that it is likely that an infection by the variant causes immunity to the wild-type. Conversely, quantifies the ‘forward’-immunity: infections by the wild-type causing immunity to the variant. If , the two strains are antigenically indistinguishable, and thus essentially identical for the model. Conversely, if , the two strains are completely distinct and do not interact through cross-immunity.
The dynamical equations now take a simplified form:
We can immediately derive the equilibrium state for this simplified case. We first define the reproductive number of strain as . grows when and declines when . The equilibrium susceptibility is, therefore, , such that . On the other hand, the equilibrium prevalence is determined by the inverse of the cross-immunity matrix :
with being the vector . The order of magnitude of the prevalence is given by the ratio of the rate of waning and the recovery rate . In the following, we frequently use values and in units of inverse generations , i.e., we set . At equilibrium, this corresponds to a fraction of of the host population being infected at any time. If generation time is a week, which is roughly the case for respiratory viruses such as influenza virus or SARS-CoV-2, the fraction of hosts infected in any year is , which is of similar magnitude as empirical estimates for influenza (Kucharski et al., 2018).
It is also straightforward to compute the fraction of infections caused by the variant at equilibrium, thereafter referred to as the frequency of the variant. We find that this frequency is
In the case where , the variant will ultimately settle at frequency 1/2. This includes the case where , where the two strains are completely independent and do not interact. On the contrary if , the final frequency of the variant can in principle be anywhere between 0 and 1. For example if , the variant is more likely to cause immunity to the wild-type than the wild-type is to cause immunity to the variant. In this case, and the variant will be the dominant variant.
We are primarily interested in an ‘invasion’ scenario where only the wild-type is initially present in the population, that is at . Cross-immunity with the resident strain reduces the fraction of hosts susceptible to the variant below one even though it has not circulated yet. But the number of susceptible hosts is always larger than the equilibrium value unless , As a result, the growth rate of the variant is initially positive and given by
The variant thus increases initially exponentially until it has become sufficiently frequent that it starts having a substantial effect on the immunity landscape, before eventually settling into an equilibrium with the wild-type. The details of the equilibrium reached by the system in the absence of additional mutant variants is given in Appendix 1.1. Figure 1 explores different scenarios numerically.
The top row of Figure 1 shows the dynamics of the model after the introduction of the variant in a homogeneous population (). As expected, the number of infections by the variant initially rises while the number of susceptibles decreases. However, as goes below the critical value , starts to decline and then oscillates around the equilibrium value before finally converging to it. The mathematical properties of these oscillations are discussed in Appendix 1.8.
However, these strong and slowly damped oscillations are not what is observed in circulating viruses. For instance, in the first oscillation in the specific example of Figure 1, the prevalence of the wild-type goes down to microscopic levels and the frequency of the variant approaches one, see Figure 1. During stochastic circulation in a finite population of hosts the wild-type would likely be lost. The theoretical equilibrium that is reached at long times is thus not very relevant, and what would be actually observed in reality is a selective sweep by the variant.
Oscillations are the consequence of the rapid rise of the variant followed by an overshoot. This effect is mitigated by immunological heterogeneity, as shown in the following example with groups. For group , the cross-immunity matrix takes the same form as in the previous scenario, given by Equation 3. However, for other groups, we assume that the two strains are virtually identical, with the cross-immunity having the form
where . Our reasoning is that we expect an adaptive variant to escape the existing immunity for part of the host population, here immune group 1, while having little effect on the rest of the hosts.
One consequence of many groups that are indifferent to the variant is that globally the excess susceptibility to the variant is lower. If mixing is rapid, the initial growth rate of the variant is smaller by a factor of compared to the one-group case. If mixing is slow, the initial growth of the variant is as rapid as in the one-group case, but then spreads only slowly across groups. Globally, the frequency of the variant thus never reaches values close to one and population-wide oscillations are reduced.
The central and bottom rows of Figure 1 show the result of the invasion for groups, respectively, for the rapid and slow mixing cases. In both scenarios, the initial number of hosts susceptible to the variant are now closer to . When mixing is fast, the frequency of the variant initially resembles a standard selective sweep (dashed line in Figure 1) before saturating, while dynamics are more complicated for the slow mixing case. Either way, the main effect of the immune groups is that the overshoot past the equilibrium is much smaller and the dampening of the oscillations stronger. As a result, the frequency of the variant approaches its equilibrium value without effectively sweeping to fixation before.
Notably, the equilibrium frequency in the above examples does not depend on and Equation 6 remains valid for . This invariance is a consequence of the fact that for , the variant and wild-type strains are completely equivalent in immune groups and equilibrium is only determined by cross-immunity in group (Appendix 1.4). For small the equilibrium shifts slightly, but Equation 6 remains a good approximation.
While this simple two-strain model predicts that the two strains come to an equilibrium at frequency , their frequency will of course continue to change due to the emergence of additional strains, which we will discuss below.
Even though the variant has a clear growth rate advantage when it appears, this does not result in it replacing the wild-type. This contrasts with the typical ‘selective sweep’ that occurs when the growth rate advantage stays constant, which is illustrated as a dashed line in the figure. We refer to frequency trajectories of a variant that at first rise exponentially before settling at an intermediate frequency as partial sweeps. As we will discuss below, such partial sweeps can lead to qualitatively different evolutionary dynamics and its predictability.
If the initial growth is due to higher susceptibility, it is misleading to think of it as an intrinsic fitness advantage of the variant. Instead, the initial growth is the result of an imbalance in the immune state of the host population, which gradually disappears as the variant becomes more frequent, as shown in the central panels of Figure 1. In this sense, our model is comparable to ecological systems where interaction between organisms cannot be fully explained using a fixed scalar fitness for each strain but rather depends on the composition of the viral and host population. In particular, the stalling of frequency increase gives rise to the partial sweep is reminiscent of consumer resource models Tikhonov and Monasson, 2018; Good et al., 2018, highlighting the link between ecological and epidemiological models. An important consequence of these dynamics is that predicting the equilibrium frequency reached by the variant and its ultimate fate is hard from the observation of a partial frequency trajectory.
Ultimate fate of the invading variant
In the invasion scenario discussed above, dynamics stop after the initial variant has reached an equilibrium frequency. However, as the viral population evolves, new adaptive mutants can appear. In the framework of the SIR model, a new strain translates into extending the cross-immunity matrix by one row and one column. Each new variant will perform its own partial sweep, and saturate at frequencies sampled from some distribution . This process is shown in panel A of Figure 2, using the SIR model to simulate up to variants. For the sake of illustration, it shows a simple scenario where the initial variant appears at time 0 in a homogeneous wild-type population, and subsequent mutants appear at regular time intervals. Simulations are performed using immune groups, resulting in a slight overshoot of the equilibrium frequency for each trajectory.
Here, we focus on the mutation or set of mutations that defines the initial variant. The initial growth rate advantage given by eventually disappears, meaning that after some times we can consider it as neutral. As subsequent mutants appear, they either do so on the background of the wild-type, in which case they do not carry , or on the background of the initial variant in which case they do carry . If we suppose that recombination is negligible, the frequency of increases or decreases as each new variant undergoes its own partial sweep. This process is shown in panel B of Figure 2, with shades of red (resp. blue) indicating a variant carrying (resp. not carrying ). The thick line in between the red and blue surfaces indicate the frequency at which mutation is found, and in practice moves up and down randomly.
The scenario illustrated in Figure 2 suggests that many aspects of the variant dynamics can be approximated by a simple abstraction: if is the frequency of a mutation , a new variant has a probability to appear on the background of and thus carry , and a probability to not carry . If new mutants emerge well separated in time with rate , meaning that they reach equilibrium before the next variant emerges, and if new variants have a similar cross-immunity with all existing variants (see Appendix 1.6), the dynamics of are described by a particular random walk: in each time interval , a partial sweep of amplitude occurs with probability , changing in the following way:
For example, if a new mutant appearing in the background of does a partial sweep of amplitude , the frequency of among the fraction of strains not concerned by the sweep will still be , and its frequency among the fraction of strains concerned by the sweep will be 1. Overall, this gives a frequency change of . A similar reasoning gives us the frequency change when the new mutant appears on the wild-type background. Finally, if no sweep occurs in the time interval , that is with probability , remains unchanged. The resulting frequency dynamics of mutations have many similarities to the effect of ‘genetic draft’, that is the frequency dynamics of neutral mutations due to linked selective sweeps (Gillespie, 2000).
Examples of trajectories from the random walk are shown on panel C of Figure 2, all initially starting around . Two trajectories converge monotonically to 0 and 1. This is a consequence of one interesting property of Equation 9: the probability for to be positive increases with , but the magnitude of the upward steps decreases as , and symmetrically with downward steps. This leads to trajectories leading almost exponentially to 0 and 1: it can in fact be shown that trajectories that always go downwards or upwards represent a finite and relatively large fraction of all possible trajectories (see Appendix 2.4). On the other hand, steps away from the closest boundary are unlikely but much larger, resulting in ‘jack-pot’ events (Hallatschek, 2018). This can be seen in the blue trajectory in Figure 2, which oscillates for a longer time.
It is also interesting to look at the moments of the step size . The first two are easily computed, and we find
The first moment being 0 means that for the random walk, increasingly probable but small steps towards the closest boundary (0 or 1) are exactly compensated by rarer but larger steps away from the boundary. Importantly, this means that on average, the trajectory of mutation is not biased toward either fixation or loss, regardless of the frequency that the initial partial sweep brought it to. For instance, a mutation seen at frequency should on average stay at this frequency, which means in practice that in a finite population, it has a chance to reach 1 and fix, and a chance to reach 0 and vanish.
On the other hand, the second moment resembles neutral drift Kimura, 1964: in neutral evolution, allele frequency also undergoes a zero-average random walk with the second moment having the form with being the population size. Therefore, this model would predict an ‘effective population size’ as completely independent of the size of the viral population. However, there are important differences to neutral drift: in neutral evolution, higher moments of order decay as and are thus negligible in large populations, whereas here they are independent of and scale as . Depending on higher moments of , allele dynamics will deviate qualitatively from neutral behavior.
Abstraction as ‘expiring’ fitness advantage
In general, the dynamics of the SIR model proposed in Equations 1&2 depend on the interactions between strains through an cross-immunity matrix. While this model is useful to give a mechanistic explanation of partial sweeps, it is in general impractical to analyze and numerically simulate for many variants. The random walk model introduced above is simple to analyze and simulate, but assumes that variants rise to their equilibrium frequency instantaneously.
To explore the consequences of partial sweeps over broader parameter ranges, we propose an empirical model that has the same qualitative properties as the over-damped SIR, namely a growth rate that decreases as a strain becomes more frequent and partial sweep trajectories, but is simpler to analyze and simulate on a large scale. In this effective model, the growth rate of the variant is not explicitly set by the susceptibility dynamics in the host population, but instead decays at a rate proportional to the frequency of the variant:
The dynamic of in the first equation is simply given by the usual logistic growth with fitness . To mimic increasing immunity against the invading variant, the growth advantage decreases proportionally to the abundance of the variant (second part of Equation 11). The initial value of is connected to the invasion rate of the SIR models given in Equation 38.
The dynamics of this new model are represented in panel D of Figure 2, with an initial frequency and an initial growth rate . The initial growth of is identical to a classical selective sweep of fitness (represented as a dashed line). However, its fitness advantage gradually ‘expires,’ as shown by the red line in the figure. As the variant progressively ‘runs out of steam,’ its frequency finally saturates at a value given by (Appendix 2.2)
This final value depends only on the ratio between the initial fitness advantage and the rate of fitness decay . For a large enough , can be arbitrarily close to 1, meaning that this model still accommodates for full selective sweeps as a special case. In the general case, reaches its final value and remains there forever unless other variants appear.
It is important to state that the main aim of this effective model is to qualitatively reproduce the phenomenology of the SIR, and in particular the partial sweeps, while being is easier to simulate. It recapitulates the salient feature of invading immune evasive variants: (i) initial exponential growth, and (ii) eventual saturation at an intermediate frequency. We can thus use it to analyze the long-term consequences of the random walk dynamics of Figure 2. However, we do not expect the frequency of the variant to have quantitatively equivalent dynamics in the two models. In particular, due to its simplicity, this model does not show the complex oscillatory behavior of the SIR model. Appendix 1.9 discusses in more detail the links between the parameters of the two models and the fundamental differences. While we can express the rate at which the growth rate declines in terms of the parameters of the simplest SIR models, for models with many groups or with oscillatory dynamics, the decay rate of the growth advantage should be interpreted as an effective parameter that captures a generic effect of reduced growth with increasing circulation.
Consequences for predictability and population dynamics
Accurate prediction of dominant viral variants of the future could improve the choice of antigens in vaccines against rapidly evolving viruses. Specifically, if a potentially adaptive mutation is observed in a viral population, one would want to know if the corresponding variants will grow in frequency, and if yes to what point? The typical traveling wave framework would predict that fast-growing variants should keep on growing until an even fitter one appears. This way of thinking about the prediction problem has shown mixed results. In the case of A/H3N2 influenza, for instance, we showed that there are few signatures that suggest fit variants grow in frequency consistently (Barrat-Charlaix et al., 2021).
In Figure 3, we reproduce some of our results of Barrat-Charlaix et al., 2021 and extend them to SARS-CoV-2. To quantify predictability, we ask the following question: given the state of a viral population at times , what can we say about variant frequencies at times ? We performed a retrospective analysis of viral evolution and identified all amino-acid mutations that were observed to grow from frequency 0 to an arbitrary threshold . Adaptive beneficial mutations should in principle be overrepresented in this group and if they provide a persistent fitness advantage, we would expect them on average to keep on growing beyond . Figure 3 shows these trajectories for the amino acid substitutions in the HA protein of A/H3N2 influenza, using data from 2000–2023,, and the SARS-CoV-2 genome using data from 2020–2023. Panels on the left show all trajectories that reached , with their average displayed in black. The panels on the right show the average trajectory for different threshold values between 0.1 and 0.8.
While the dynamics of the variants of the two viruses can not be compared directly due to vastly different sampling intensities and different rates of adaptation, the qualitative patterns differ strikingly. In the case of influenza, trajectories of seemingly adaptive mutations show little inertia and on average hover around instead of growing. This surprising result is in line with the study in Barrat-Charlaix et al., 2021 which used data from the period 2000–2018. On the other hand, trajectories of SARS-CoV-2 mutations show a much smoother behavior with steady growth beyond . On longer timescales, however, we observe a systematic decrease in frequency: this is explained by the particular initial dynamics of SARS-CoV-2, where new variants arose at a rapid pace and replaced old ones. This process is often called clonal interference and reduces long-term predictability.
In our setting of eco-evolutionary adaptation, the random walk model predicts that the probability of fixation of an immune evasive variant is given by the final frequency of its initial partial sweep. Subsequent allele dynamics and diversity are governed by an anomalous coalescent process driven by the random walk defined in Equation 9, leading to little predictability of evolution. This abstraction should hold when partial sweeps are instant and do not overlap, meaning that the rate at which new variants emerge is small compared to their initial growth rate .
To explore the behavior of our partial sweep model in a more general setting, we simulate the evolutionary dynamics of a population under a Wright-Fisher model with expiring fitness dynamics. Simulations involve a population of viruses with a genotype where each position can be in one of two possible states . Fitness effects are associated with mutations at each position, and the total fitness of a virus is given by . At each generation, viruses with a fitness expand by a factor , and the next generation is constructed by sampling individuals from the previous one. Following Equation 11, mutational effects decrease by an amount , where is the frequency at which mutation is found in the population.
We simulate the emergence of adaptive variants in the following way. At a constant rate , we pick one sequence position that has no polymorphism and set the fitness effect of the corresponding mutation to an initial value , with an amplitude drawn from probability distribution and the sign chosen such that the mutation is adaptive. In practice, we use an exponential distribution , meaning that the typical magnitude of initial fitness effects are described by only one parameter . The corresponding distribution of partial sweep size is described Appendix 2.3. At the same time, we introduce the corresponding mutant in the population at a low frequency, picking its background genotype from a random existing strain. The behavior of the model is determined by (i) the distribution of partial sweeps size depending on , and (ii) the ratio of the variant emergence rate and their growth rate , which determines how often sweeps overlap and interact. The probability of two sweeps overlapping is defined in Appendix 2, Equation 42.
We use this simulation to address the question of predictability: given the state of the population at generations , can we predict its state at future times ? Specifically, we ask whether we can predict the frequency of a variant , given it is at frequency at time , as we did previously for the influenza virus Barrat-Charlaix et al., 2021, see Figure 3. The dynamics of isolated selective sweeps (, ) should be perfectly predictable: after an initial stochastic phase when the variant is very rare, its frequency grows monotonically to fixation. This predictability decreases with increasing due to clonal interference (Schiffels et al., 2011; Strelkowa and Lässig, 2012), for example when an adaptive variant is outcompeted by an even more adaptive one. We also expects predictability to decrease with increasing since sweeps are then partial and their ultimate fixation is determined by subsequent variants with dynamics that resemble a random walk.
To quantify these effects, we select from a long simulation all rising frequency trajectories of adaptive mutations that cross an arbitrary threshold . The results are shown in panel A of Figure 4, where we show the average of rising frequency trajectories after crossing the threshold . We use three rates of fitness decay: and low clonal interference . The case corresponds to a classical traveling wave scenario with constant fitness effects, and, as expected, is the most predictable: the average trajectory rises well above 0.5. For larger values of , corresponding to a quicker decay of fitness, predictability gradually declines and becomes negligible for . Note that this matches quite well with the predictions from the random walk model where the average change in frequency is null.
To explore parameter space more systematically, we quantify predictability as the probability of fixation of rising variants that cross threshold . In a perfectly predictable scenario with well-separated selective sweeps, should be close to 1 regardless of , while it should be equal to in an unpredictable setting such as neutral evolution.
In panels B, C, and D of Figure 4, the probability of fixations are shown for three values of and four values of . Clonal interference increases when going from left to right among these panels (increasing ), while the intensity of fitness decay increases when going from blue to red curves (increasing ). Increasing either or reduces towards the dashed diagonal corresponding to . However, as observed previously (Barrat-Charlaix et al., 2021), in the classic scenario with stable fitness effects considerable predictability remains even in cases of strong interference (blue curve in panel D and Figure 4—figure supplement 1). The strong interference setting is explored in more detail in Appendix 2.1 up to values , using similar simulations but without expiring fitness . Figure 4—figure supplement 1 shows that even in these cases of strong interference, remains significantly above the diagonal.
Finally, we use our simulation to investigate typical levels of diversity in the population and the time to the most recent common ancestor. One quantity that can easily be estimated from the random walk model is the average pairwise coalescence time , that is the typical times separating two random strains from their most recent common ancestor (MRCA). In Appendix 2.5, we show that under the random walk approximation , which in neutral models of evolution would correspond to the effective population size . A more detailed analysis of the coalescent process reveals that the random walk approximation corresponds to the so-called -coalescent Schweinsberg, 2000; Berestycki, 2009.
In panel E of Figure 4, the average time to the common ancestor of pairs of strains in the population is plotted as a function of predicted by the random walk model. Each point in the figure corresponds to one simulation of long duration with a given distribution of partial sweep size and a given setting , with darker color indicating a higher probability of overlap as computed in Appendix 2.2. We find a good agreement between the empirical time to MRCA and the estimation from the random walk, at least as long as the probability of overlap between successive partial sweeps is small (indicated by shading). With increasing overlaps, coalescence slows down, and diversity increases: points in darker shades of red tend to have a larger time to MRCA than what is expected from the distribution of . This is expected intuitively: if another adaptive variant emerges before the previous one has reached its final frequency, it has a lower probability of landing on the same background and thus tends to be in competition with the first variant. This leads to a smaller effective which slows the dynamics.
Discussion
Evolutionary adaptation is often pictured as an optimization problem in a static environment. In many cases, however, this environment is changed by the presence of the evolving species, for example, because a host population develops immunity or a dynamic ecology. Here, we have explored the consequences of such eco-evolutionary dynamics in a case of host-pathogen co-evolution where different variants of a pathogen shape each other’s environment through generation of cross-immunity.
Influenza virus evolution has been the subject of intense research with efforts to predict the composition of future viral populations (Bush et al., 1999; Luksza and Lässig, 2014; Neher et al., 2014; Huddleston et al., 2020). The A/H3N2 subtype in particular undergoes rapid antigenic change through frequent substitutions in prominent epitopes on its surface proteins (Smith et al., 2004; Bhatt et al., 2011; Neher et al., 2016; Kistler and Bedford, 2023). Given the clear signal of adaptive evolution, one might expect A/H3N2 to be predictable in the sense that variants that grow keep growing. Yet, it has been difficult to find convincing signals of fit, antigenically novel, variants that consistently grow and replace their competitors (Barrat-Charlaix et al., 2021; Huddleston et al., 2020). In contrast, SARS-CoV-2 evolution has been consistently predictable in the sense that dynamics are well modeled by exponentially growing variants that compete for a common pool of susceptible hosts. However, even in this case, taking into account the immune adaptation of hosts leads to a better description of variant dynamics Meijers et al., 2023.
We have shown that depending on (i) the heterogeneity of immunity in the population, (ii) the asymmetry between backward and forward cross-immune recognition, and (iii) waning or turn-over of immunity, the immune escape can either lead to dynamics dominated by selective sweeps, or to one were escape mutations have an initial growth advantage that dissipates before the variant fixes. The former scenario is observed when initial growth is fast, backward immunity high, and waning slow compared to variant dynamics. In this case, new variants can rise to high frequency driven by their own advantage and fix. Immunological heterogeneity slows down the initial rise, allowing for population immunity to respond and adjust before the variant has been fixed.
This process of partial sweeps reconciles two seemingly contradicting observations: HA evolution in human influenza A virus is clearly driven by adaptive immune escape and most substitutions are clustered in epitope regions (Bhatt et al., 2013). On the other hand, most substitutions does not sweep to fixation but tends to meander in a quasi-neutral fashion (Barrat-Charlaix et al., 2021). In the partial sweep scenario proposed here, diversity is dominated by immune escape mutations that are rapidly brought to macroscopic frequency by their initial growth advantage, but their ultimate fate is determined mostly by subsequent mutations.
In any real-world scenario, there will be a variety of mutations, including some mutations that perform complete selective sweeps, either because they escape immunity of a large fraction of the population ( small), because they generate robust immunity against previous strains (‘back-boost’ Fonville et al., 2014), or because of the increase in the intrinsic transmissibility of the virus (for example reverting a previous escape mutation that had a deleterious effect on transmissibility). The degree to which partial sweeps matter will vary from virus to virus and will change over time. Recently emerged viruses circulate in a homogeneous immune landscape and adapt to the new host for some time, consistent with rapid and complete sweeps of variants in SARS-CoV-2. Similarly, the influenza virus A/H1N1pdm, which emerged in humans in 2009, exhibited more consistent trajectory dynamics than A/H3N2 (Barrat-Charlaix et al., 2021).
More generally, qualitative features of the partial sweep dynamics investigated here are expected to exist in any system where the environment responds to evolutionary changes on time scales comparable to the time it takes for the adaptive variants to take over, leading to eco-evolutionary dynamics (Pelletier et al., 2009). In ecological systems involving eukaryotes, it is the evolutionary part of this interaction that is thought of as slow, while ecology is fast. In the cases of rapidly adapting RNA viruses in human populations with long-lived immunological memory, models often assume that viral adaptation is fast while hosts have long-lasting memory. The most complex and least predictable dynamics are expected when the evolutionary and ecological time scales are similar and different host-pathogen systems will fall on different points along this axis.
Materials and methods
Code availability
Request a detailed protocolFigures in the main text can be reproduced using a set of notebooks at https://github.com/PierreBarrat/ExpiringFitnessFigures (copy archived at Barrat, 2024a).
Code for the simulations of the SIR model is available at https://github.com/PierreBarrat/PartialSweepSIR.jl (copy archived at Barrat, 2024b).
Code for the population dynamics simulation is available at https://github.com/PierreBarrat/WrightFisher.jl (copy archived at Barrat, 2024c).
Code to generate empirical frequency trajectories and their averages is available as scripts ‘flu_fixation.py’ and ‘sc2_fixation.py’ in https://github.com/nextstrain/flu_frequencies on branch ‘fixation’ (Neher, 2024).
Data availability
Request a detailed protocolSequence data of influenza viruses was obtained from GISAID (Shu and McCauley, 2017). We thank the teams involved in sample collection, sequencing, and processing of these data for their contribution to global surveillance of influenza virus circulation. A table acknowledging all originating and submitting laboratories is provided as supplementary information.
Sequence data of SARS-CoV-2 viruses was obtained from NCBI and restricted to data from North America to ensure more homogeneous sampling. We are grateful to all teams involved in the collection and generation of these data for generously sharing these data openly.
Appendix 1
SIR model
Equilibrium of the SIR model with one immune group
To help us compute the equilibrium reached by the SIR model, we introduce additional notation: the vectors and will, respectively, represent the compartments of hosts susceptible and infectious to each strain; the matrix describes the cross-immunity; the vector is a vector of dimension whose elements are all equal to 1.
We derive the equilibrium state for Equations 1&2. For each strain, , equilibrium for is reached when . We thus have . Introducing this in the equation for the derivative of , we obtain the following equilibrium:
An interesting remark is that at equilibrium, is of order . Note that the structure of makes it invertible in most cases. Indeed, we impose and for .
Equilibrium for two viruses with one immune group
We consider the case where two viruses are present, called wild-type (wt) and mutant (m). The cross-immunity is represented by a matrix
As shown in the previous section, the equilibrium is given by
where stands for and for . It is straightforward to invert the cross-immunity matrix, and we obtain
Note that without cross-immunity, the number of infected by either virus would be . Positive values of and thus have the effect of lowering the equilibrium values of and with respect to the absence of cross-immunity.
It is interesting to compute the fraction of infections due to the mutant at equilibrium. This is easily derived from the relations above:
A few observations can be made:
if and , then the wild-type vanishes at equilibrium and the mutant reaches frequency 1. In this case, the presence of the mutant alone is enough to keep to its threshold value , making it impossible for the wild-type to grow.
Inversely, if , then the mutant stays at frequency 0.
If , the mutant will reach a finite frequency , with if and if .
Equilibrium without the mutant
We first derive the equilibrium situation before the mutant virus is introduced in the case with only one immune group. We remind that in this case there is only one cross-immunity matrix which has the form
where is the immunity to the wild-type caused by an infection with the mutant, and the reverse.
Since the mutant is absent from the host population, we assume . The equilibrium values for and are easily obtained from the dynamical equations:
We then set the derivative of to 0:
Since we assume , the initial number of susceptibles to the mutant will be larger than , allowing the initial growth of the mutant. Using the dynamical equation for , the initial growth rate of the mutant can be written as
If , the growth rate is , i.e., the one expected in a fully naive population. If however, the growth rate is 0 as the wild-type confers perfect immunity to the mutant.
The equations above generalize to more immune groups. Cross-immunity matrices now depend on parameters and , and the initial number of susceptibles in immune group is given by
In a given immune group , the mutant growth rate is proportional to . The growth rate of the mutant will thus be initially faster in immune groups for which it is antigenically different, i.e., , than in groups where it is similar to the wild-type, i.e., .
In the case of a well-mixed population, that is , we can write the growth of the infections by the mutant as an exponential growth with a time-dependent rate. In this case, the overall growth rate is given by the derivative of :
In particular, using the invasion scenario from the main text with (i.e.) in group and an arbitrary value in group 1, we obtain the following growth rate at :
That is, the initial growth rate for groups is times smaller than the one in the single group case.
In the case of a non-well-mixed population, i.e., arbitrary , it is not possible to write a pseudo-exponential growth rate as in Equation 22. However, it is clear that the initial growth rate will also be smaller than in the single group case since the mutant initially only grows in group .
Equilibrium with immune groups
For immune groups and arbitrary cross-immunity matrices , the equilibrium frequency of the two strains is not easy to compute. However, it is possible to give an analytical expression in the regime of fast mixing and when the two strains differ immunologically for only one group, i.e., for matrices.
Note that this corresponds to the situation studied in the main text with fast mixing and . We show here that in this case, the equilibrium frequency for all immune groups is the same as the one obtained for only one immune group with matrix . In other words, the expression for in Equation 6 is still valid.
To prove this, we assume the following form for the solution of the dynamical equations:
where the index runs over all strains (here wild-type and mutant), and where we have defined the infectious levels for group , for strain and globally:
Note that the second equation in Equation S24 means that the frequency of strain is the same across all immune groups and consequently also globally.
We now show that injecting these expressions of and in the dynamical system and solving for gives the expected result. First, note that with this choice of , the derivative of given by equation Equation 1 immediately vanishes. We thus concentrate on given by Equation 2. For any immune group and strain , we have
where we have used and to remove the sum on immune groups. Multiplying this equation by , we obtain
We now eliminate by using the expression :
Note that this last expression is true for all strains . Considering any two strains and , we can thus write
where the last expression is obtained by subtracting the two previous ones. First, we see that for any frequency vector is a solution since for all . For and defining and and using the expression for , we obtain
as claimed.
This result is not completely trivial and should be commented. In this setting, the mutant escapes immunity built by the wild-type for a fraction of the population, and yet it reaches the same frequency as in the case with one immune group. This can be rationalized as follows: for immune groups , the cross-immunity matrix is such that the wild-type and mutant strains are completely equivalent. If immune group 1 was not here, the mutant could thus equilibrate at any frequency between 0 and 1. Since it was initially introduced at a very low frequency, it would remain marginal in immune groups . However, since its ‘natural’ equilibrium frequency in group is and since the groups are connected, equilibrium is reached when the mutant reaches frequency in all groups.
Note that if we take the situation of the main text with
and , the expressions above do not hold. However, if , the perturbation is small, and we expect an equilibrium frequency close to β, which is the case in Figure 1.
Realistic modeling of the host’s immune state
The SIR model proposed in the main text relies on the assumption of immunity acquisition through exposure. This explains terms like in the derivative of : acquiring immunity to through cross-immunity requires a combination of prior susceptibility and exposure to strain . Importantly, this does not depend on the immune state of the hosts with respect to strain .
A more realistic representation would be one where acquiring immunity to strain from exposure to requires being infected by . However, this would require keeping track of more precisely of the immune state of hosts, as we would need to separate hosts into two groups, namely
hosts who are susceptible to both and , and can thus acquire immunity to through infection by ;
hosts who are susceptible to but immune to , and can no longer acquire immunity to through infection by .
To test whether our results are robust to such changes in hypothesis, we write a simple SIR model with two strains and where cross-immunity is only activated through infection rather than exposure. To properly track the immune status of the hosts, we introduce the groups and , respectively representing hosts immune to only or only , and representing hosts immune to both and . The compartment groups hosts susceptible to both strains. It is simpler in this case to write the dynamics in terms of compartments and , rather than and as in the main text. For simplicity, we do not use immune groups here. The dynamics involve two equations for the infected:
and three for the immune:
In Appendix 1—figure 1, we show both that the dynamical and equilibrium properties of this model are qualitatively the same as the one from the main text. On the left panel, we show that the dynamics of this new model do not differ qualitatively from the model of the main text. In particular, in the invasion scenario, the frequency of the variant converges to some equilibrium value after some oscillations. On the right, we show that this equilibrium value is different but relatively close to the one from the main text.
Change in frequency when adding subsequent strains
This section shows that under certain condition adding a new variant to the SIR model does not change the relative frequencies of previous variants. This is an important condition for the random walk of the main text to be valid.
Here is a quick summary of the results proved below. Adding a variant to the SIR model involves adding a column and a row to the cross-immunity matrix, which can be given by two vectors. If these vectors only depend on one parameter, i.e., and , then the relative frequency of previous strains is unchanged in the new equilibrium. What this means in practice is that the new strain must be at an equal ‘antigenic distance’ from all previous strains. A possible interpretation is an antigenic space of infinite dimensions: all mutations explore an antigenic region which is new.
We start from an initial situation where there are variants with an cross-immunity matrix . At equilibrium, the number of hosts infected by each virus is given by the elements of the vector that can be computed from the cross-immunity matrix and parameters of the model:
where is a vector containing only 1’s and of length . The relative frequency of the variant with respect to variant is simply defined as
We assume that the initial population has reached equilibrium.
We now add a new virus to this population, with index . The new cross-immunity matrix is now written as
where and are two vectors of length . This is a general way to write that the backward cross-immunity to variant caused by an infection with the new variant is . Inversely, the forward cross-immunity to variant caused by an infection with an old variant is .
This new cross-immunity matrix will of course result in a new equilibrium for the number of infected hosts, given by the vector :
The question we ask here is whether the relative frequency of two variants is changed by the addition of the new variant. In other words, we want to know whether the equality below holds:
Below, we prove this equality under a condition for cross-immunity of the new variant and :
where are scalars. This amounts to say that cross-immunity is the same between the new variant and any old variant , i.e., that the new variant is at an equal antigenic distance from all previous variants.
To prove the equality, we perform the computation To do that, we make use of the following formula for inverting a block matrix:
where we defined . The following identities map to our problem:
We immediately see that reduces to a scalar that we note for more clarity. We also define the other scalar value . A few manipulations give us the following for :
Multiplying this by results in
where we used the equalities .
This result essentially shows that after adding the new variant, the fraction of hosts infected by the previous variants if simply multiplied by a scalar value . This implies that the relative frequencies of the original variants are conserved when adding a new one.
Case with intrinsic fitness effects
In the SIR model of the main text, we assume that the transmission rate is the same for the different strains. It is also interesting to investigate the case where this transmission rate varies. Here, we study a simple extension of the SIR model without immune groups where there are two variants – mutant and wild-type – with respective transmission rates and . The quantities can be interpreted as intrinsic fitness values for the two strains. Note that if , the strain cannot grow even in a fully susceptible population. The cross-immunity is as usual defined by matrix with off-diagonal terms and .
The equations of motion are now
Computing the equilibrium, we immediately obtain
where we have defined the following quantities:
The quantities can be interpreted as a scaled growth rate of each variant given a fully susceptible population, and the matrix combines the cross-immunity and the ratio of fitness values . Note that it is straightforward to generalize these equations to an arbitrary number of strains: the relevant quantity will be the scaled cross-immunity matrix defined by .
Inverting and simplifying the equations a bit, we obtain
where we defined
Note the interesting structure of Equations 34: for each variant, they involve a first term that depends only on the intrinsic growth rate of the mutant, and a second that involves cross-immunity and relative growth rate through .
These equilibrium equations give us two conditions for the co-existence of the two variants,
respectively, corresponding to and . We mention three interesting cases below.
If the mutant has an intrinsic fitness disadvantage , it will only be able to invade if . Since represents the probability that a host becomes immune to the mutant if infected by the wild-type, this means that the immune ‘niche’ of the mutant must be large enough when compared to .
Invertly, if the mutant is fitter and , the mutant is always able to invade. The wild-type only survives if , meaning that the immunity to the wild-type caused by the mutant must be small enough.
If one considers a situation without total cross-immunity, *i.e.,* , the only way a mutant invades is if meaning , and the result is a full selective sweep.
Oscillations of the SIR model
The SI model from the main text tends to oscillate while returning to equilibrium. Here, we study this behavior in the simple case of one immune group () and two viruses (wild-type and variant).
The idea is to linearize the dynamical equations around the equilibrium. This gives us
where and
To quantify the convergence to equilibrium is the frequency of the oscillations, we need the eigenvalues of matrix . For low enough , we can prove that the four eigenvalues are
This is only valid if the terms in the square roots above are positive, which requires to be small enough. In our setting, we assume , so this will always hold.
From the eigenvalues we can compute:
The rate of convergence to equilibrium: . This means that convergence is slower for a smaller waning rate .
The two oscillation frequencies that appear:
Note that since , we always have . With the values of the main text (units are inverse of generations), we obtain . If one generation is 1 wk, this gives us a period , that is approximately 1 y.
Link between parameters of the SIR and expiring fitness models
The effective expiring fitness model used in the second part of this work is characterized by the system of differential equations
where is the frequency of the mutant strain. Here, we try to express the dynamics of the SIR model in this form to find a link between its parameters and the quantities and .
We first focus on the case with two strains and one immune group. The frequency of the mutant is . Using the logit function and the dynamical equations of the SIR, we find
which allows us to define the fitness in the SIR case: . At the beginning of the invasion, the initial growth rate is readily computed:
which is the same as the initial growth rate of . Note that if , the initial growth rate is 0.
We then compute the time derivative of early in the invasion, when , and are close to their equilibrium values. In this case, a straightforward calculation gives
where the approximation is valid if . This would give an expiry rate of fitness in the case of the SIR model.
These results can also be obtained in the case of immune groups. We then have the following expressions for and at :
where the second expression is again valid if .
Another question is that of the link between cross-immunity parameters and and the distribution of partial sweep sizes . The relation between cross-immunity and given by Equation 6 shows that the distribution of partial sweep size depends on the distribution of both and . As we do not have a prior on how and should be distributed, we explore the case where and are exponentially distributed. In other words, we define and , with the following distributions
The expression of the partial sweep size becomes . Note that both should remain smaller than 1, which is not guaranteed with exponential distributions. However, this is not problematic if μ and take small enough values.
These assumptions allow us to compute the distribution of :
with support on the interval . Appendix 1—figure 2 shows the various shapes that then takes for different values of the parameter. Note that if , tends to be higher than and is biased towards one. If , becomes uniform on the range.
The exponential distribution away from one of and is a reasonable assumption, and allows analytical derivation of . Of course, any other distribution of and could be considered. For this reason, we choose to use a Beta distribution for in the analysis of the main text, as it can accommaodate various shapes.
Appendix 2
Expiring fitness model and random walk
Clonal interference
In non recombining genomes with a large mutation rate, the appearance of many adaptive mutations in close succession leads to clonal interference. In this regime, beneficial mutations present on different background compete for fixation, and the success of a mutation does not depend only on its fitness effect but also on the global state of the population. For this reason, clonal interference causes a decrease in predictability: dynamics are not deterministic but rather depend on the precise structure of which mutation appeared on which background. For instance, a beneficial mutation that increases in frequency can be outcompeted by a fitter one before it has the time to fix, making the extrapolation of frequency trajectories difficult.
We conduct simulations to quantify how much predictability decreases because of clonal interference, based on the ones of the main text. We study a large population of genomes of length , where each genome position can be in either of two states . Fitness effects are associated to each position, and the fitness of an individual is . To simulate the adaptation of the population, we proceed in the following way: at a constant rate , we pick a position that is non-polymorphic and set the fitness effect by sampling its magnitude from distribution and choosing its sign in a way that favors mutations (positive if is more frequent, negative otherwise). At the same time, the corresponding mutation ( if and inversely) is introduced in the population at a small frequency . We choose to be an exponential distribution with scale , in agreement with findings on the distribution of fitness effects in Schiffels et al., 2011, Rice et al., 2015.
There is no fitness decay in this simulation, and the parameters , , and have numerical values such that neutral drift is mostly irrelevant to the dynamics of mutations. For example, without accounting for interference, the probability of fixation of a mutation of effect when it is introduced at frequency is . As a consequence, the two parameters governing the dynamics are the scale of fitness effects and the rate of introduction of beneficial mutations . The ratio of these two quantities represents the amount of clonal interference: at low , mutations are mostly independent, while at high they strongly interfere.
We measure the probability of fixation of mutations found in a frequency bin over a long simulation. We only consider mutations with increasing frequency, meaning that their frequency was below at all times and at some point was measured in the frequency bin. Figure 4—figure supplement 1 shows as a function of for different values of . According to intuition, a low clonal interference value leads to easily predictable fixations: whatever the frequency at which it is observed, a mutation that is increasing in frequency fixes with a very high probability. Increasing clonal interference clearly makes dynamics less predictable and closer to neutrality, with approaching the diagonal line. However, even in a regime of strong interference, e.g.,, deviations from neutrality remain very clear.
Expiring fitness effects: Sweep size and probability of overlap
This section gives a few results about the expiring fitness equations from the main text. We rewrite the equations here for reference:
First, we prove the expression for the amplitude of the partial sweeps. We divide the equation for by the one for to obtain
This immediately gives us
with a constant . At , we have and , while for we have and to be determined. From the case we obtain , and from we get . Assuming , we obtain the result of the main text:
We now try to find an expression for the probability that two partial sweeps overlap. First, we try to estimate the time it takes for one partial sweep to complete. While we could not solve the differential equations of the main text analytically, we can give an approximate expression for the time-dependent frequency during the partial sweep:
where is a function of and and . This is simply the expression of a logistic growth starting at and saturating at . From there, we compute the time it takes a partial sweep of initial fitness to reach a frequency with . We quickly find
We now consider that two consecutive partial sweeps of initial fitness values and overlap if the first one is not yet at frequency while the second one is already at . In the figure of the main text, we use : an overlap occurs if the first sweep is not yet at of its final value while the second one is already at of its final value. Thus, for an overlap to occur, we need the time between the two partial sweeps to be smaller than . For sweeps happening at rate , this has probability . Since the two sweeps have random initial fitness effects, we find that the overall probability for two consecutive sweeps to overlap is
This integrates over all possible pairs of sweep amplitudes (or initial fitnesses) and weighs them by the probability that the time between the two leads to an overlap. It is this quantity (computed numerically) that is used for the scale of the colorbar in panel E of Figure 4 of the main text.
Distribution of partial sweep size
This section discusses the distribution of the size of partial sweeps in the context of Equation 11 of the main text as well as the choice of parameters for panel E of Figure 4.
A first interesting case is when fitness effects are exponentially distributed, with parameter :
This is the distribution we use in most of the population simulations. We compute the corresponding distribution of in a straightforward way:
Taking the derivative with respect to , we obtain
This distribution can accommodate various shape: for it peaks at 0, and for it peaks at 1. We can also compute the following formula for the moments of :
When investigating the coalescence time in the main text, we use a different distribution for fitness effects. In this case, we want a finer control over the second moment of , and we decide to sample directly using a Beta distribution. The Beta distribution has a support over and can accommodate many different shapes. It is defined by two parameters and :
In our case, it is more practical to parametrize it by its mean and variance . For given and we have
In the case of panel E of Figure 4 and in order to explore a wide range of distributions, we used three values of , and for each
a low variance with
a high variance
For a given set of parameters defining a Beta distribution, we decide on the fitness effects by first sampling a for each new adaptive mutation, and then computing by using Equation 12 from the main text. For each distribution , the simulation is performed for 6 values of .
Random walk: Monotonous trajectories
Here, we compute the probability that in the random walk defined in the main text, a trajectory starting at converges straight to 0 without ever taking an upward step. While going to 0 requires an infinite amount of downward steps, the probability is still finite since the steps are increasingly likely to go down. For simplicity, we compute this for a fixed .
If the random walk always goes down, its position at time step will be . Since the probability of going down is , the probability of always going down is
We simplify this expression by taking the logarithm and assuming that for :
Since the random walk is invariant by the change , we can easily compute the probability of a trajectory always going up, and thus of a monotonous trajectory going straight to either boundary 0 or 1.
The quality of the approximation is quite good, as can be seen from Appendix 2—figure 1. The same figure also shows that this probability is relatively high, even for far from either boundary.
Coalescent
Consider a partial sweep happening between generations and , with probability . One individual in generation will then have children in generation . Any individual in generation has a probability of having as a direct ancestor, and a probability of the opposite. If we consider lineages at generation and look backward in time, the probability that at least out of have as an ancestor is . Averaging over , we find the probability of specific lineages to have a common ancestor in the previous generation:
Another useful quantity is the probability that given lineages, a particular set of exactly lineages merge one generation back. If a partial sweep of known amplitude took place, this requires the set of lineages to merge at this generation, with probability , and that the other do not merge, with probability .
This turns out to be the definition of the -coalescent with Schweinsberg, 2000, Berestycki, 2009. The -coalescent is a general model for genealogies of multiple mergers. We mention two interesting subcases:
if where is the Dirac distribution with all of the mass at 0, the only possible merge is and we recover the Kingman coalescent Berestycki, 2009. For this reason, we expect our coalescent to approach Kingman’s when , which will be shown explicitely below.
if is uniform in , meaning , we obtain the Bolthausen-Sznitman coalescent Bolthausen and Sznitman, 1998, Berestycki, 2009, which is used to describe the genealogy of populations under strong selection Bolthausen and Sznitman, 1998, Brunet et al., 2007, Neher and Hallatschek, 2013.
Finally, we derive a few more properties of the partial sweep coalescent and show the explicit link to Kingman’s when . Using the ’s, we can compute the times : the time during which exactly lineages are present in parallel in the genealogy. If there are lineages present, any coalescence will lower the number of lineages below . The time is thus exponentially distributed with rate , where is the total rate of coalescence given lineages:
Since we have , we finally obtain
With , we now exactly recover the Kingman coalescent. For simplicity, we assume a constant and expand up to the second order in , to obtain
These are the times expected for the Kingman coalescent with population size .
In the high limit, we also obtain , since quantities of the type vanish. This is expected as coalescences only take place when a partial sweep happens, with rate . It is another qualitative difference with the Kingman coalescent: since for all , one must wait a time to observe the first coalescence even in large trees. The shortest branches will thus always be of order . In contrast, in the Kingman process, the shortest branches vanish when the number of lineages increases. This difference is clearly visible when looking at terminal branches of trees in Appendix 2—figure 3.
Data availability
Accession numbers for all sequences from GISAID are provided as Supplementary file 1.
References
-
SoftwareExpiringFitnessFigures, version swh:1:rev:816f5c4102aedcc63310cd6d6c3e6b42bce4cb26Software Heritage.
-
SoftwarePartialSweepSIR.jl, version swh:1:rev:0cc02a6f288d911a1df8a65c05945c1049f0810cSoftware Heritage.
-
SoftwareWrightFisher.jl, version swh:1:rev:75dc0d1bf5af7f5447effaa10225141fd63c633dSoftware Heritage.
-
Limited predictability of amino acid substitutions in seasonal influenza virusesMolecular Biology and Evolution 38:2767–2777.https://doi.org/10.1093/molbev/msab065
-
Recent progress in coalescent theoryEnsaiosmatemáticos 16:1–193.https://doi.org/10.21711/217504322009/em161
-
The genomic rate of molecular adaptation of the human influenza A virusMolecular Biology and Evolution 28:2443–2451.https://doi.org/10.1093/molbev/msr044
-
The evolutionary dynamics of influenza A virus adaptation to mammalian hostsPhilosophical Transactions of the Royal Society of London. Series B, Biological Sciences 368:20120382.https://doi.org/10.1098/rstb.2012.0382
-
On ruelle’s probability cascades and an abstract cavity methodCommunications in Mathematical Physics 197:247–276.https://doi.org/10.1007/s002200050450
-
Diffusion models in population geneticsJournal of Applied Probability 1:177–232.https://doi.org/10.2307/3211856
-
An atlas of continuous adaptive evolution in endemic human virusesCell Host & Microbe 31:1898–1909.https://doi.org/10.1016/j.chom.2023.09.012
-
Timescales of influenza A/H3N2 antibody dynamicsPLOS Biology 16:e2004974.https://doi.org/10.1371/journal.pbio.2004974
-
Predictive modeling of influenza shows the promise of applied evolutionary biologyTrends in Microbiology 26:102–118.https://doi.org/10.1016/j.tim.2017.09.004
-
Genetic draft, selective interference, and population genetics of rapid adaptationAnnual Review of Ecology, Evolution, and Systematics 44:195–215.https://doi.org/10.1146/annurev-ecolsys-110512-135920
-
Eco-evolutionary dynamicsPhilosophical Transactions of the Royal Society of London. Series B, Biological Sciences 364:1483–1489.https://doi.org/10.1098/rstb.2009.0027
-
The evolution of seasonal influenza virusesNature Reviews. Microbiology 16:47–60.https://doi.org/10.1038/nrmicro.2017.118
-
SARS-CoV-2 evolution in the Omicron eraNature Microbiology 8:1952–1959.https://doi.org/10.1038/s41564-023-01504-w
-
Antigenic evolution of viruses in host populationsPLOS Pathogens 14:e1007291.https://doi.org/10.1371/journal.ppat.1007291
-
Coalescents with simultaneous multiple collisionsElectronic Journal of Probability 5:1–50.https://doi.org/10.1214/EJP.v5-68
-
Innovation rather than improvement: a solvable high-dimensional model highlights the limitations of scalar fitnessJournal of Statistical Physics 172:74–104.https://doi.org/10.1007/s10955-018-1956-6
-
RNA virus evolution via a fitness-space modelPhysical Review Letters 76:4440–4443.https://doi.org/10.1103/PhysRevLett.76.4440
Article and author information
Author details
Funding
Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung (310030_188547)
- Pierre Barrat-Charlaix
- Richard A Neher
University of Basel
- Pierre Barrat-Charlaix
- Richard A Neher
The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.
Acknowledgements
We gratefully acknowledge research support from the University of Basel (core funding) and the Swiss National Science Foundation (grant 310030_188547).
Version history
- Sent for peer review:
- Preprint posted:
- Reviewed Preprint version 1:
- Reviewed Preprint version 2:
- Version of Record published:
Cite all versions
You can cite all versions using the DOI https://doi.org/10.7554/eLife.97350. This DOI represents all versions, and will always resolve to the latest one.
Copyright
© 2024, Barrat-Charlaix and Neher
This article is distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use and redistribution provided that the original author and source are credited.
Metrics
-
- 564
- views
-
- 22
- downloads
-
- 0
- citations
Views, downloads and citations are aggregated across all versions of this paper published by eLife.
Download links
Downloads (link to download the article as PDF)
Open citations (links to open the citations from this article in various online reference manager services)
Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)
Further reading
-
- Computational and Systems Biology
- Medicine
Sudden death after myocardial infarction (MI) is associated with electrophysiological heterogeneities and ionic current remodelling. Low ejection fraction (EF) is used in risk stratification, but its mechanistic links with pro-arrhythmic heterogeneities are unknown. We aim to provide mechanistic explanations of clinical phenotypes in acute and chronic MI, from ionic current remodelling to ECG and EF, using human electromechanical modelling and simulation to augment experimental and clinical investigations. A human ventricular electromechanical modelling and simulation framework is constructed and validated with rich experimental and clinical datasets, incorporating varying degrees of ionic current remodelling as reported in literature. In acute MI, T-wave inversion and Brugada phenocopy were explained by conduction abnormality and local action potential prolongation in the border zone. In chronic MI, upright tall T-waves highlight large repolarisation dispersion between the border and remote zones, which promoted ectopic propagation at fast pacing. Post-MI EF at resting heart rate was not sensitive to the extent of repolarisation heterogeneity and the risk of repolarisation abnormalities at fast pacing. T-wave and QT abnormalities are better indicators of repolarisation heterogeneities than EF in post-MI.
-
- Computational and Systems Biology
Measuring mitochondrial respiration in frozen tissue samples provides the first comprehensive atlas of how aging affects mitochondrial function in mice.