# Fate of a mutation in a fluctuating environment

See allHide authors and affiliations

Edited by Boris I. Shraiman, University of California, Santa Barbara, CA, and approved July 27, 2015 (received for review March 17, 2015)

## Significance

Evolution in variable environments depends crucially on the fates of new mutations in the face of fluctuating selection pressures. In constant environments, the relationship between the selective effect of a mutation and the probability that it will eventually fix or go extinct is well understood. However, our understanding of fixation probabilities in fluctuating environmental conditions is limited. Here, we show that temporal fluctuations in environmental conditions can have dramatic effects on the fate of each new mutation, reducing the efficiency of natural selection and increasing the fixation probability of all mutations, including those that are strongly deleterious on average. This makes it difficult for a population to maintain specialist adaptations, even if their benefits outweigh their costs.

## Abstract

Natural environments are never truly constant, but the evolutionary implications of temporally varying selection pressures remain poorly understood. Here we investigate how the fate of a new mutation in a fluctuating environment depends on the dynamics of environmental variation and on the selective pressures in each condition. We find that even when a mutation experiences many environmental epochs before fixing or going extinct, its fate is not necessarily determined by its time-averaged selective effect. Instead, environmental variability reduces the efficiency of selection across a broad parameter regime, rendering selection unable to distinguish between mutations that are substantially beneficial and substantially deleterious on average. Temporal fluctuations can also dramatically increase fixation probabilities, often making the details of these fluctuations more important than the average selection pressures acting on each new mutation. For example, mutations that result in a trade-off between conditions but are strongly deleterious on average can nevertheless be more likely to fix than mutations that are always neutral or beneficial. These effects can have important implications for patterns of molecular evolution in variable environments, and they suggest that it may often be difficult for populations to maintain specialist traits, even when their loss leads to a decline in time-averaged fitness.

Evolutionary trade-offs are widespread: Adaptation to one environment often leads to costs in other conditions. For example, drug resistance mutations often carry a cost when the dosage of the drug decays (1), and seasonal variations in climate can differentially select for certain alleles in the summer or winter (2). Similarly, laboratory adaptation to specific temperatures (3, 4) or particular nutrient sources (5, 6) often leads to declines in fitness in other conditions. Related trade-offs apply to any specialist phenotype or regulatory system that incurs a general cost to confer benefits in specific environmental conditions (7). Despite the ubiquity of these trade-offs, it is not always easy to predict when a specialist phenotype can evolve and persist. How useful must a trait be on average to be maintained? How regularly does it need to be useful? How much easier is it to maintain in a larger population compared with a smaller one?

The answers to these questions depend on two major factors. First, how often do new mutations create or destroy a specialist phenotype, and what are their typical costs and benefits across environmental conditions? This is fundamentally an empirical question, which depends on the costs and benefits of the trait in question, as well as its genetic architecture (e.g., the target size for loss-of-function mutations that disable a regulatory system). In this paper, we focus instead on the second major factor: given that a particular mutation occurs, how does its long-term fate depend on its fitness in each condition and on the details of the environmental fluctuations?

To address this question, we must analyze the fixation probability of a new mutation that experiences a time-varying selection pressure. This is a classic problem in population genetics, and has been studied by a number of previous authors. The effects of temporal fluctuations are simplest to understand when the timescales of environmental and evolutionary change are very different. For example, when the environment changes more slowly than the fixation time of a typical mutation, its fate will be entirely determined by the environment in which it arose (8). On the other hand, if environmental changes are sufficiently rapid, then the fixation probability of a mutation will be determined by its time-averaged fitness effect (9, 10). In these extreme limits, the environment can have a profound impact on the fixation probability of a new mutation, but the fluctuations themselves play a relatively minor role. In both cases, the effects of temporal variation can be captured by defining a constant effective selection pressure, which averages over the environmental conditions that the mutation experiences during its lifetime. This result is the major reason why temporally varying selection pressures are neglected throughout much of population genetics, despite the fact that truly constant environments are rare.

However, this simple result is crucially dependent on the assumption that environmental changes are much slower or much faster than all evolutionary processes. When these timescales start to overlap, environmental fluctuations can have important qualitative implications that cannot be summarized by any effective selection pressure, even when a mutation experiences many environmental epochs over its lifetime. As we will show below, this situation is not an unusual special case, but a broad regime that becomes increasingly relevant in large populations. In this regime, the fate of each mutation depends critically on its fitness in each environment, the dynamics of environmental changes, and the population size.

Certain aspects of this process have been analyzed in earlier studies. Much of this earlier work focuses on the dynamics of a mutation in an infinite population (11⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓–24). However, these infinite-population approaches are fundamentally unsuitable for analyzing the fixation probabilities of mutations that are neutral or deleterious on average (and even for mutations that are beneficial on average, population sizes must often be unrealistically large for this infinite population size approximation to hold). Another class of work has focused explicitly on finite populations, but only in the case where the environment varies stochastically from one generation to the next (25⇓⇓⇓⇓⇓–31). Later work has extended this analysis to fluctuations on somewhat longer timescales, but this work is still restricted to the special case where selection cannot change allele frequencies significantly during an individual environmental epoch (9, 32, 33).

These studies have provided important qualitative insights into various aspects of environmental fluctuations. However, we still lack both a quantitative and conceptual understanding of more significant fluctuations, where selection in each environment can lead to measurable changes in allele frequency. This gap is particularly relevant because significant changes in allele frequency are the most clearly observable signal of variable selection in natural populations.

In this work, we analyze the fate of a new mutation that arises in an environment that fluctuates between two conditions either deterministically or stochastically on any timescale. We provide a full analysis of the fixation probability of a mutation when evolutionary and environmental timescales are comparable and allele frequencies can change significantly in each epoch. We find that even in enormous populations, natural selection is often very inefficient at distinguishing between mutations that are beneficial and deleterious on average. In addition, substitution rates of all mutations are dramatically increased by variable selection pressures. This can lead to counterintuitive results. For instance, mutations that result in a trade-off but are predominantly deleterious during their lifetime can be much more likely to fix than mutations that are always neutral or even beneficial. Thus, it may often be difficult for populations to maintain specialist traits, even when loss-of-function mutations are selected against on average. This can lead to important signatures on the genetic level, e.g., in elevated rates of nonsynonymous to synonymous substitutions (*dN/dS*) (34).

## Model

We consider the dynamics of a mutation that arises in a haploid population in an environment that fluctuates over time. We assume the population has constant size *N* (neglecting potential seasonal changes in the size of the population) and denote the frequency of the mutant at time *t* as *A*). Through the bulk of our analysis we will focus on the case of a mutation with a strong pleiotropic trade-off, such that *Supporting Information*. We note that this does not imply that the trait is nearly neutral on average because selection can still be strong in the traditional sense (

We assume that the duration of each epoch is drawn at random from some distribution with mean τ and variance *B*). For simplicity, we assume that the distribution of epoch lengths is the same for both environments through most of the analysis, but our approach can easily be generalized to the asymmetric case as well (*Supporting Information*). Through most of our analysis we focus on the case where the mutation rate, μ, is low enough that we can ignore recurrent mutation between the allelic types (*Supporting Information* that our analysis and conclusions also extend to the regime in which the mutation rate is high (*Supporting Information*.

### Timescales of Environmental Variation.

The fate of a new mutation will crucially depend on how the characteristic timescale of environmental fluctuations, τ, compares to the typical lifetime of a new mutation. For example, in the extreme case where environmental fluctuations are very slow, each mutant lineage will either fix or go extinct during the epoch in which it arose. Thus, its fate is effectively determined in the context of a constant environment in which it is either strongly beneficial or strongly deleterious. The fixation probability of such a mutation has been well studied, and can be most easily understood as a balance between the competing forces of natural selection and genetic drift. We briefly review the key results here, because they will serve as the basis for the rest of our analysis below.

When the mutation is rare, genetic drift dominates over natural selection, and the mutant allele drifts in frequency approximately neutrally. When the mutation is more common, natural selection dominates over genetic drift: a beneficial mutation increases in frequency deterministically toward fixation, and a deleterious mutation declines deterministically toward extinction. To determine the threshold between these two regimes, we ask whether significant changes in allele frequency are driven by selection or drift. According to Eq. **1**, natural selection changes the frequency of a rare allele substantially (i.e., by of order *x*; see ref. 36 for details) in a time of order

In the drift-dominated regime where *x* drifts to frequency *Supporting Information* for further discussion and analysis of the correction due to finite epoch lengths.

In contrast, whenever *D*).

### An Effective Diffusion Process.

Because we aim to predict the long-term fate of the mutation, we are primarily concerned with how multiple epochs combine to generate changes in the allele frequency. This suggests that we define an effective diffusion process which integrates Eq. **1** over pairs of environmental epochs, similar to the earlier approaches of refs. 9 and 32. This yields a modified diffusion equation,*x* now represents the frequency of a mutation at the beginning of a beneficial epoch, and time is measured in pairs of epochs (Fig. 1 *C* and *D*). Eq. **3** also leads to a corresponding backward equation,*x* (35). Here, **1** over a pair of epochs. These functions will be independent of time, but will generally have a more complicated dependence on *x* than the coefficients in Eq. **1**. In this way, we can reduce the general problem of a time-varying selection pressure to a time-independent diffusion process of a different form. The only caveat is that this process describes the fate of a mutation starting from the beginning of a beneficial epoch, but mutations will actually arise uniformly in time. Thus, we must also calculate the frequency distribution of a mutation at the beginning of its first full beneficial epoch, so that we can compute the overall fixation probability

In the following sections, we calculate *s*, τ, *N*. We begin by analyzing the problem at a conceptual level to provide intuition for the more formal analysis that follows.

## Heuristic Analysis

We first consider the simplest case of an on-average neutral mutation in a perfectly periodic environment (*Supporting Information*), and we find that the coarse-grained process is indistinguishable from a neutral mutation in a constant environment (9, 32).

In contrast, when τ is much greater than *s* can survive for at most of order *A*). Therefore, the mutation must arise within the first *A*). We let

If a mutation does arise during this critical time, its future behavior is characterized by a series of dramatic oscillations in frequency, which can drive an initially rare mutant to high frequencies (and back) over the course of a single cycle (Fig. 1*D*). Because selection is efficient within each epoch (*A*). However, provided that the mutation starts at a frequency *x* throughout the environmental cycle. As a result, the contributions from drift are dominated by the first *x*. Thus, the overall magnitude of drift is reduced by a factor of *Supporting Information*).

Fortunately, by the time that the mutation reaches an initial frequency of *A*).

Given that *B*). Because it is equally likely to fix or go extinct at this point, the net fixation probability is simply**5** is much larger than *s* when *Discussion*.

### The Reduced Efficiency of Selection.

It is straightforward to extend this picture to mutations that are beneficial or deleterious on average (*x*. Meanwhile, the contribution from drift over a single cycle is of order *B*), and it will fix with the probability in Eq. **5**. On the other hand, if *C*). The threshold between these two behaviors occurs at

### The Role of Seasonal Drift.

Of course, environmental fluctuations in nature are never truly periodic, so it is natural to consider what happens when we allow for stochastic variation in the length of each epoch. To illustrate these effects, it is useful to first return to the case where

If *B* and *C*), and the fixation probability will remain the same as Eq. **5**. On the other hand, if *D*). In large populations, this condition can be satisfied even when *c*) is proportional to **9** is much larger than *N*, the relative enhancement becomes even more pronounced in larger populations.

The addition of selected mutations (*C*). On the other hand, when *D*), where the logarithm of the mutation frequency undergoes a biased random walk with mean **9**. This will be true provided **7**, but with **10**. In other words, seasonal drift also leads to an increase in the fitness effects required for natural selection to operate efficiently. But as we saw for the neutral fixation probability in Eq. **9**, this increase is even more pronounced when seasonal drift becomes important.

## Formal Analysis

We now turn to a formal derivation of the results described above. We begin by calculating the moments of the effective diffusion process in Eq. **4**. As in the heuristic analysis above, we will work in the limit that *Supporting Information*.

To calculate the moments of the effective diffusion, we must integrate the dynamics in Eq. **1** over an entire environmental cycle. When environmental switching is fast (**1** derived in the *Supporting Information*. We can then average over the epoch lengths to obtain the moments of the effective diffusion equation

These short-time asymptotics break down when environmental switching is slow (*Supporting Information* that the moments of the effective diffusion equation are given by

To extend this solution to frequencies above **12** (with **4** at some intermediate frequency where both sets of moments are valid (e.g., at *Supporting Information*.

In both the fast and slow switching limits, we find that the fixation probability of a new mutant in a fluctuating environment satisfies a modified version of Kimura’s formula,**6** and **10**. Eq. **13** shows that the relevant fitness effect is the average fitness *N*, *s*, τ, and

## Discussion

In this work, we have analyzed how temporal fluctuations alter the dynamics and fixation probability of a new mutation. We find two main qualitative impacts. First, fluctuations reduce the efficiency of selection. This efficiency is commonly quantified by the ratio of fixation probabilities of beneficial and deleterious mutations, **14** implies that selection cannot distinguish between beneficial and deleterious mutations when

Given the similarity of Eq. **14** to the constant environment case, where

These correlated fluctuations are also responsible for the second effect of environmental fluctuations: an overall increase in the fixation probability of all mutations. This increased rate of fixation can lead to counterintuitive results. For example, consider a mutation that is deleterious on average (

Our findings have important implications for the maintenance of regulatory functions in the face of a changing environment. In contrast to previous work, which primarily focuses on traits that are essential in one of the two environments (7, 37), our analysis here applies to traits with more subtle costs and benefits (see ref. 38 for a recent review). For example, bacterial regulatory mechanisms can provide an important advantage in a specific environment, but are typically costly otherwise [e.g., in the case of the *lac* operon *N* can easily exceed *N* when environmental fluctuations are irregular.

In addition to predicting fixation probabilities, our results also specify the regimes in which the evolutionary process is altered as a result of changing environmental conditions. We might have assumed that the fate of a mutation is determined by its average strength of selection whenever it experiences many beneficial and deleterious epochs over the course of its lifetime [i.e., whenever *i*) either selection within each environment is strong enough, or the duration of each epoch is long enough, that *ii*) environmental fluctuations are sufficiently irregular that seasonal drift becomes important (Fig. 6).

It is not a priori clear which regime is most relevant for natural populations, largely due to the difficulty in measuring time-varying selection pressures in their native context. For a randomly chosen combination of *s* and τ, the rate of environmental fluctuations will often be either very fast or very slow, and the behavior described here will not apply. However, the region between these two limits becomes larger as the size of the population increases (Fig. 6), both because longer fixation times permit more extreme frequency oscillations and also because genetic drift becomes weaker relative to seasonal drift. Moreover, given a distribution of fitness effects of new mutations, it is natural to expect that some alleles will exhibit long-lived oscillations of the type studied here. Trade-offs in this regime are arguably the most likely to be directly observed in natural populations, precisely because they exhibit frequency changes that can be measured from time-course population sequences.

For example, a recent study has identified numerous polymorphisms in natural *Drosophila melanogaster* populations that undergo repeated oscillations in frequency over the course of the year (10 generations) (2). Although the oscillations in many of these SNPs are likely driven by linkage to other seasonally selected sites, these data suggest that there are at least some driver alleles with

In our analysis so far, we have primarily discussed the case where mutations incur a strong pleiotropic trade-off and the average selection coefficient is much less than *Supporting Information*). We have also assumed that the variance in epoch lengths is not too large, so that the changes due to seasonal drift in each cycle are small (**3** can technically no longer be applied. However, many of our heuristic arguments remain valid, and we expect qualitatively similar behavior of the fixation probability. We leave a more detailed treatment of this regime for future work.

## The Effective Diffusion Regime

We analyze the fate of a mutation in a fluctuating environment by using an effective diffusion approximation, which coarse grains the evolutionary dynamics over pairs of environmental epochs. Such an approximation is appropriate whenever the mutation experiences many beneficial and deleterious epochs over the course of its lifetime, and the net change over each cycle is small. Formally, this requires that*Beyond the Effective Diffusion Regime*.

### Fast Switching [s τ ≪ 1 ≪ 2 log ( N s ) ].

In the fast switching regime, the environmental timescale (τ) is much shorter than the timescale of selection (**1**. in Langevin form (40),*x* is approximately constant over the course of a pair of epochs and coarse grain Eq. **S1.5** over an environmental cycle*x* is thus (35)**S1.10**, we obtain**S1.11** and requiring that **S1.12** for small *x* to arrive at

### Slow Switching [1 ≪ s τ ≪ 2 log ( N s ) ].

In contrast to the fast switching regime above, slower environmental switching (

To account for the nonlinear effects of selection over the course of a cycle, we begin by introducing the change of variable **1**, which transforms the original diffusion equation into the form**S1.18** when **S1.19** when

Concretely, let *t* after the beginning of the beneficial epoch, such that **S1.26** by noting that **S1.7** and **S1.30**) are equivalent up to the term proportional to *Fast Switching* section. Defining

To find the probability of fixation of a new mutation arising at an arbitrary point in time, we must again average over the possible frequencies at the beginning of the first deleterious epoch. To leading order in

### Unequal Epochs (τ 1 ≠ τ 2 ).

The preceding analysis was carried out under the implicit assumption that the distribution of time spent in each environment is equal. We can relax this assumption simply by redefining the variables *s*,

### Recurrent Mutation (N μ ≫ 1 ).

In large populations, new mutations that either create or destroy a specialist phenotype might arise multiple times during the course of evolution. In this section, we consider the scenario in which wild-type individuals recurrently mutate with per-generation probability μ and reverse mutations from the mutant to the wild-type allelic state occur with rate ν. These mutation rates can encompass any mechanism by which individuals change allelic state (e.g., in prokaryotes they can include both mutations and trait gain and loss due to horizontal gene transfer). For conciseness of presentation, we will limit ourselves to the special case where

In the limit that

When the mutant allele is rare, genetic drift takes of order *x*. During this time mutation changes the allele frequency by

In the absence of seasonal drift, recurrent mutation from the wild type to the mutant will act to increase the frequency of the mutant individuals below

In the presence of seasonal drift, mutational pressure will lead to the increase of the frequency of mutant alleles below

We have seen that the same heuristic analysis applies in the *N* with

Over the course of a single environmental cycle of length

## Beyond the Effective Diffusion Regime

The effective diffusion approach in the previous section relied on three basic assumptions:

### Fixation During the First Epoch [1 ≪ 2 log ( N s ) ≪ s τ ].

The primary assumption of the effective diffusion approach is that the mutation will experience many beneficial and deleterious epochs during its lifetime. This assumption will obviously break down in the limit of extremely slow environmental switching [

Thus, the primary source of variability in whether the mutation fixes stems from the random arising time of the mutation. In other words, to leading order, the fixation probability of a new mutation in this limit is given by

### Substantial Average Fitness Effects (s ¯ τ ≳ 1 ).

When *s* can start to become important as well.

We first note that **13** shows that the fixation probability of a deleterious mutation is bounded by an arbitrarily small number, and the fixation probability of a beneficial mutation is at least **1**,*B* denote the (random) value of the integral in the denominator:*B*:*B* is essentially deterministic, so that we can simply solve the equation for *B* to obtain*Slow Switching* *[**]*. Integrating over the possible arising times of the mutation, we find that

### Substantial Variation in Epoch Lengths (s δ τ ≫ 1 ).

When

However, given that the log-transformed allele frequency is still diffusive even when

In addition, when *The Effective Diffusion Regime* with occasional jumps that can potentially drive the allele to fixation or extinction (similar to the generalized diffusion models studied in ref. 41). A detailed analysis of this regime is beyond the scope of the present paper, and remains an interesting avenue for future work.

## Relation to Previous Work

In the present work, we have focused on a diffusion model (Eq. **1**) for the frequency of an allele in a fluctuating environment. This model bears many similarities to those used in earlier studies of time-varying selection pressures, but it differs from these earlier models in several key ways. It is therefore useful to briefly review this earlier literature, so that we may comment on the major differences that arise.

The earliest attempts to model the effects of fluctuating selection pressures were largely focused on infinite-population models in which the selection coefficient is resampled from some fixed distribution in every generation, and the log frequency of the allele undergoes a discrete random walk (12⇓–14, 17⇓⇓⇓–21, 26, 31). In our present terminology, this is effectively a model of pure seasonal drift. However, we have seen that although seasonal drift shares the dispersive nature of genetic drift, its multiplicative nature ensures that it can never completely drive an allele to fixation or extinction. Rather, the allele frequencies start to accumulate near

More general diffusion models were later proposed to account for the joint effects of seasonal variation and genetic drift (27⇓⇓⇓–31). Like their earlier counterparts above, these models assumed that selection pressures were resampled every generation, so that the standard derivation of the diffusion equation could still be applied (35). However, due to this assumption of rapid and uncorrelated environmental change, these studies found that the effects of fluctuations are relevant only when the variance in the selection pressure is large compared with the other selection pressures in the population. This requires a modified version of the standard diffusion limit to account for the fact that *s* effects can lead to an emergent form of overdominance, even for otherwise semidominant alleles (9). When this occurs, the boundaries of the diffusion process are no longer accessible, and the mutation can be maintained at intermediate frequencies for extended periods of time (42⇓⇓–45).

However, we stress that all of these effects are absent in the standard diffusion limit (i.e.,

## Acknowledgments

We thank Eric Kang, Dmitri Petrov, Dan Rice, and Joshua Weitz for useful discussions and helpful comments on the manuscript. Simulations in this article were run on the Odyssey cluster supported by the Faculty of Arts and Sciences Division of Science Research Computing Group at Harvard University. This work was supported in part by the James S. McDonnell Foundation, the Alfred P. Sloan Foundation, the Harvard Milton Fund, Grant PHY 1313638 from the National Science Foundation, and Grant GM104239 from the National Institutes of Health.

## Footnotes

↵

^{1}I.C. and B.H.G. contributed equally to this work.- ↵
^{2}To whom correspondence should be addressed. Email: mdesai{at}oeb.harvard.edu.

Author contributions: I.C., B.H.G., E.R.J., and M.M.D. designed research, performed research, and wrote the paper.

The authors declare no conflict of interest.

This article is a PNAS Direct Submission.

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1505406112/-/DCSupplemental.

## References

- ↵.
- Drlica K

- ↵
- ↵.
- Yona AH , et al.

- ↵.
- Rodríguez-Verdugo A ,
- Carrillo-Cisneros D ,
- González-González A ,
- Gaut BS ,
- Bennett AF

- ↵
- ↵.
- Turner PE ,
- Elena SF

- ↵.
- Gerland U ,
- Hwa T

- ↵
- ↵.
- Gillespie JH

- ↵
- ↵
- ↵.
- Dempster ER

- ↵.
- Lewontin RC ,
- Cohen D

- ↵.
- Levins R

- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵
- ↵.
- Kussell E ,
- Leibler S

- ↵.
- Leibler S ,
- Kussell E

- ↵.
- Uecker H ,
- Hermisson J

- ↵
- ↵.
- Kimura M

- ↵.
- Kimura M

- ↵
- ↵
- ↵
- ↵
- ↵.
- Takahata N ,
- Ishii K ,
- Matsuda H

- ↵.
- Takahata N ,
- Kimura M

- ↵.
- Mustonen V ,
- Lässig M

- ↵.
- Ewens WJ

- ↵.
- Fisher DS

*Les Houches*, eds. Bouchaud JP, Mézard M, Dalibard J (Elsevier, Paris), Vol. 85, pp. 395–446 - ↵
- ↵
- ↵.
- Eames M ,
- Kortemme T

- ↵
- ↵.
- Der R ,
- Epstein C ,
- Plotkin JB

- ↵
- ↵.
- Hedrick PW

- ↵
- ↵.
- Gillespie JH ,
- Langley CH