Abstract
Although many experimental and theoretical studies on natural selection have been carried out in a constant environment, as natural environments typically vary in time, it is important to ask if and how the results of these investigations are affected by a changing environment. Here, we study the properties of the conditional fixation time defined as the time to fixation of a new mutant that is destined to fix in a finite, randomly mating diploid population with intermediate dominance that is evolving in a periodically changing environment. It is known that in a static environment, the conditional mean fixation time of a co-dominant beneficial mutant is equal to that of a deleterious mutant with the same magnitude of selection coefficient. We find that this symmetry is not preserved, even when the environment is changing slowly. More generally, we find that the conditional mean fixation time of an initially beneficial mutant in a slowly changing environment depends weakly on the dominance coefficient and remains close to the corresponding result in the static environment. However, for an initially deleterious mutant under moderate and slowly varying selection, the fixation time differs substantially from that in a constant environment when the mutant is recessive. As fixation times are intimately related to the levels and patterns of genetic diversity, our results suggest that for beneficial sweeps, these quantities are only mildly affected by temporal variation in environment. In contrast, environmental change is likely to impact the patterns due to recessive deleterious sweeps strongly.
Keywords: changing environment, dominance, fixation time, selective sweeps
Introduction
In a finite, recombining population where a selected locus is linked to neutral loci, if a new advantageous mutation fixes faster than the time it takes for neutral loci to get dissociated via recombination, the neutral genetic diversity in the neighborhood of the selected locus is reduced (beneficial sweep) (Maynard Smith and Haigh 1974; Stephan 2016); a similar pattern arises when a mildly deleterious mutation reaches fixation due to genetic drift (deleterious sweep). Thus, the time of fixation is intimately related to the level and patterns of neutral diversity (Tajima 1990). It is important to note that the fixation time under discussion here is obtained from a stochastic process that is conditioned on fixation. At the end of a selective sweep, one is observing only those trajectories of the new allele in which fixation has occurred, and not those in which the allele is lost due to drift and/or selection (Ewens 1973; Zhao et al. 2013).
Theoretical models of sweeps and their genomic applications assume the selective environment to be constant in time; however, environmental variation is ubiquitous in nature, and may potentially affect the fixation time. For example, suppose a mutant arises while selection is positive and increasing. In this case, the mean fixation time, conditional on fixation, is expected to be smaller than when the selection pressure remains the same as that when the mutant arose, and can result in a larger reduction in neutral diversity. One may then ask: how much does the fixation time in a changing environment (especially, if it varies slowly) differ from that in a static environment?
Furthermore, in static environments, the conditional mean fixation time has the important property of being the same for a mutant with selection coefficient s and dominance coefficient h and a mutant with respective parameters, – s and (Maruyama 1974; Maruyama and Kimura 1974), as a result of which it may be difficult to distinguish between diversity patterns due to positive and negative selection (Johri et al. 2020). In a changing environment, on general grounds, this symmetry can be expected to be absent, and one may delineate the parameter space where the lack of this symmetry has a strong effect on variability patterns.
As a first step toward an understanding of selective sweeps in changing environments, here we study the properties of the conditional fixation time of a mutant in a finite, diploid population when the selection coefficient is time-dependent. To the best of our knowledge, except for a preliminary study (Uecker and Hermisson 2011), the fixation time in a changing environment has not been investigated in detail. We consider evolution in an environment that changes periodically due to, for example, seasonal cycles (Williams et al. 2017), and study how the fixation time is affected by the rate of environmental change, the time of appearance of the mutant, the strength of selection and the dominance coefficient. Throughout the article, we assume random mating and autosomal inheritance.
Our results are obtained analytically using a diffusion theory for time-inhomogeneous processes when selection of either sign is weak or moderate and a semi-deterministic theory for strongly selected beneficial mutants, and are supplemented and checked by numerical simulations. Our main finding is that in slowly changing environments, the conditional mean fixation time of an initially beneficial mutant with intermediate dominance is well-approximated by that in a static environment, and the same holds true for an initially deleterious dominant mutant under moderate selection. However, if an initially deleterious mutant is recessive, its conditional mean fixation time is considerably longer or shorter in a slowly changing environment than in a static environment. In other words, the symmetry property for the conditional mean fixation time mentioned above (Maruyama 1974; Maruyama and Kimura 1974) does not hold between recessive deleterious and dominant beneficial mutants. Since by virtue of Haldane’s sieve, which operates in both static (Haldane 1927) and slowly varying environments (Devi and Jain 2020), most deleterious mutations are recessive and beneficial ones are dominant, the results obtained here are relevant to an understanding of selective sweeps in changing environments (see Discussion for details).
Model
We consider the model in Devi and Jain (2020) that deals with a randomly mating population of size N. We assume that a single biallelic locus is under selection and the three genotypes, aa, Aa and AA have the fitness and 1, respectively. Here, is the dominance parameter and is the time-dependent selection coefficient that varies periodically with cycling frequency ω. Without loss of generality, we assume that the oscillation amplitude but the time-averaged selection coefficient is arbitrary, and the initial phase .
For large population size and small selection coefficient, instead of genotypic frequencies, we can work with the allelic frequencies (Nagylaki 1992). We start with a single mutant allele in the population and ignore any further mutations. The evolution of the population under selection and random genetic drift is modeled by a continuous time birth-death process [Chapter 4, Karlin and Taylor (1975)] in which the number i of alleles a increase or decrease by one at rate or , respectively. These rates are given by
(1) |
(2) |
where and are, respectively, the marginal fitness of allele a and A. The allele numbers at time t are updated at time where the interval δt is chosen from the probability distribution with being the total rate at which either birth or death events occur.
For computational efficiency, numerical simulations of the above model were carried out assuming that the birth and death rates remain constant at r(t) during the interval δt. Then it follows that δt obeys an exponential distribution with rate r(t); however, we have checked that our results do not change if we relax this assumption. In our simulations, independent trajectories of the mutant allele were generated, but the data for the fixation time were averaged over only those trajectories that lead to the fixation of the mutant. The conditional mean fixation time was thus obtained by averaging over about 103 and 104 fixation events for deleterious and beneficial mutants, respectively. The standard error on the conditional mean fixation time was also calculated for some representative parameters and found to be at most 2% of the mean value.
Conditional fixation time in changing environments
In a constant environment, the expected fixation time of a new mutant that is destined to fix decreases with the magnitude of its selection coefficient s, since a strongly deleterious mutant fixes soon to avoid extinction, whereas a strongly beneficial mutant that has a low chance of extinction grows fast (Kimura and Ohta 1969; Teshima and Przeworski 2006; Charlesworth 2020). In a population of size N, this result holds only for a strongly selected mutant () but for weak selection (), the conditional mean fixation time can vary nonmonotonically with s (Mafessoni and Lachmann 2015). Interestingly, for any selection strength, diffusion theory predicts that the conditional mean fixation time of a single mutant has a remarkable property: it is the same for a beneficial mutant with selective coefficient s and dominance coefficient h and a deleterious mutant with respective parameters – s and (Maruyama 1974; Maruyama and Kimura 1974). For a codominant mutant (h = 1/2), this symmetry is even stronger in that it holds for any initial mutant number (Ewens 2004, p. 170).
In order to test whether the Maruyama-Kimura symmetry mentioned above also holds in a periodically changing environment, we need to compare the fixation time of mutants whose selection coefficients are of opposite sign at all times. Figure 1A shows the conditional mean fixation time of mutants with dominance parameter h and and selection coefficient s(t) and , respectively, when they are under moderate selection and on-average neutral (for nonzero average selection coefficient, see Supplementary Figure S1). It is clear from these figures that the Maruyama–Kimura symmetry does not hold when selection is time-dependent.
To understand the qualitative behavior of the conditional mean fixation time in Figure 1A, we first consider the fixation time of the initially deleterious mutant in a slowly deteriorating environment. If this mutant segregates in the population for too long, it is at a risk of extinction even if it manages to reach a high allele frequency (see mutant allele trajectory for cycling frequency in Figure 1B). For this reason, in Figure 1A, below , the fixation time is smaller than the corresponding result in the static environment. The fixation time of the initially beneficial mutant in a slowly improving environment is also smaller than that in the constant environment, but for a different reason: here, as exemplified by the allele trajectories for ω = 0 (static environment) and in Figure 1C, the mutant in the latter case, by virtue of its larger selection coefficient, grows faster than the one in the static environment; therefore, for frequencies below , the fixation time decreases.
However, if the environment changes fast enough ( in Figure 1A) so that an initially deleterious mutant experiences a relatively better environment () on reaching a high frequency, fixation can occur at a later time than in a static environment (see allele trajectory for in Figure 1B). For a further increase in cycling frequency ( in Figure 1A), the mutant can experience strong positive selection at late times (refer to allele trajectory for in Figure 1B), which, as explained above, results in a faster growth and a decrease in the fixation time. For the initially beneficial mutant, as the cycling frequency increases (), the mutant allele experiences decreasing selection and must fix soon to avoid extinction (see allele trajectory for in Figure 1C). As the cycling frequency is further increased (), the mutant population sees negative but improving selection at late time, and hence runs a lower risk of extinction, which results in an increase of the conditional mean fixation time. At even higher frequencies, as selection changes sign and direction several times during the fixation process, the fixation time for both mutants approaches the value in the time-averaged environment.
We also note that in Figure 1A, an extremum in the fixation time occurs at the resonance frequency, which is defined as the cycling frequency at which the environment changes at a rate proportional to a frequency scale in the population when the oscillation amplitude σ = 0. In Figure 1A, the resonance frequency ωr is proportional to the reciprocal of the fixation time 2 N in the neutral environment (Kimura and Ohta 1969). Whether this extremum in the fixation time is a maximum or a minimum is determined by the initial phase θ [for a discussion of the resonance frequency for fixation probability in changing environments, refer to Devi and Jain (2020)].
Diffusion theory in slowly changing environments
To explore and better understand the qualitative observations discussed above, we now develop a diffusion theory for time-dependent selection coefficients. As explained in Appendix A, the probability distribution that the mutant frequency is x at time t, given that it was p at time obeys the following backward Kolmogorov equation (Risken 1996):
(3) |
where and . Using (3), it can be shown that the unconditional mean fixation time and the eventual fixation probability , respectively, obey (A.4) and (A.5). But, unfortunately, these equations do not appear to be solvable for the full range of parameters. For slow and fast-changing environments, simple expressions for the eventual fixation probability have been obtained in Devi and Jain (2020) using a perturbation theory. Below, using the same method, we find the mean fixation time in slowly changing environments.
In environments that change at a rate with arbitrary , the unconditional mean fixation time and the eventual fixation probability, , where the subscripts 0 and 1 denote quantities in a static and slowly changing environment, respectively. As described in Appendix B, u1 and obey the following ordinary differential equations,
(4) |
(5) |
and the quantities u0 and in the static environment obey (Kimura and Ohta 1969)
(6) |
(7) |
In the above equations, prime denotes the derivative with respect to p and is the scaled selection strength. Equations (4)–(7) are subject to boundary conditions and . The conditional mean fixation time scaled by the mean fixation time 2 N in the neutral environment is then given by
(8) |
where (see Appendix B for details).
Although a formal solution of (4)–(7) can be written down, it appears difficult to obtain a simple analytical expression for the fixation time by using these results in (8). However, (4)–(7) can be easily integrated numerically, and as attested by Figure 1A, these numerical results are in good agreement with those obtained from the simulations at small cycling frequencies.
Weak selection
In a static environment, the conditional mean fixation time of a beneficial mutant under weak selection () and with dominance coefficient h > 1∕2 increases with the selection pressure and can be larger than the fixation time of a neutral mutant. This may be understood by noting that although the mutant population is subject to strong random fluctuations, the fixation probability of a beneficial mutant increases with the level of dominance (Kimura 1957) and therefore a beneficial dominant mutant can counter the risk of extinction at late times. By the Maruyama-Kimura symmetry, an analogous result is obtained for a deleterious mutant with dominance coefficient h < 1∕2 (Mafessoni and Lachmann 2015).
To see this result quantitatively, for small , we expand the fixation probability u0 and the fixation time in a power series about α = 0 up to order , and substitute them in (6) and (7). Collecting terms with the same power of α on both sides of these equations, we get a set of second order ordinary differential equations which can be solved straightforwardly, and we finally obtain
(9) |
where is the deviation from codominance. The above result shows that the conditional mean fixation time (relative to the neutral fixation time) is a nonmonotonic function of α with a maximum at and the value at the maximum, . As , the conditional mean fixation time of the selected mutant can exceed that of the neutral mutant at most by , as observed numerically in Mafessoni and Lachmann (2015).
In a slowly changing environment, unlike in the last section where , the fixation time of an initially beneficial (deleterious) mutant in an improving (deteriorating) environment increases (decreases) with selection strength when ; this is due to a slight increase (decrease) in the fixation probability from the neutral value (see Figure 2). But with increasing selection strength, the fixation time in either case eventually decreases. Proceeding in a similar fashion as for the static environment, we expand and in a power series in α to quadratic orders, and plug them in (4) and (5). We then find the change in the fixation time due to slowly changing environment to be
(10) |
for . Using this result, the maximum in the total conditional mean fixation time is found to occur at
(11) |
Equations (9) and (10) and also Figure 2 show that the conditional mean fixation time continues to be a nonmonotonic function of the selection coefficient in changing environments. But, for a codominant mutant, while is symmetric about α = 0 in a constant environment [see (9)], due to the lack of the Maruyama-Kimura symmetry in the changing environment, the maximum in the fixation time occurs at a nonzero , as predicted by (11). For small α, from (10), we have which shows that the changing environment has the strongest effect when the mutant of either sign is dominant; however, the magnitude of these effects is quite small, see inset of Figure 2.
Moderate selection
We now consider the parameter regime where selection is moderately strong and the deleterious mutant has a significant chance of fixation (). As in the last subsection, one would like to obtain simple analytical expressions for the time but, unfortunately, it is generally not possible to develop consistent approximations when the parameters are of moderate size. Below, we therefore discuss the results obtained by numerically integrating (4)–(7).
To understand the results shown in Figure 3, we first consider the fixation time of the initially deleterious mutant in a deteriorating environment and the initially beneficial mutant in an improving environment (both denoted by open symbols) for a given dominance coefficient. On account of larger scaled selection strength, the former has a lower fixation probability than a deleterious mutant in the constant environment, and therefore should fix sooner to avoid extinction; the initially beneficial mutant, on the other hand, grows faster in an improving environment than in the corresponding static environment. In either case, the fixation time is smaller than that in the static environment. For similar reasons, the fixation time of the initially beneficial (deleterious) mutant in a deteriorating (improving) environment is larger than that in the static environment.
Crucially, however, as Figure 3 shows, the magnitude of the deviation between the fixation time in the changing and the constant environment is larger for the initially deleterious mutant than for the initially beneficial mutant. The reason underlying this behavior is the strong asymmetry between the fixation probabilities of beneficial and deleterious mutants. In a static environment, for moderate-to-strong selection, a small change in the selection coefficient affects the chance of fixation of a beneficial mutant only by a small amount, but the fixation probability of a deleterious mutant changes by an exponential factor (Kimura 1957). This strong asymmetry holds even in slowly changing environments [refer to Figure 2 for moderate selection and Equation (11) for strong selection of Devi and Jain (2020)]. As a result, the fixation time of an initially deleterious mutant is more strongly affected by a changing environment.
Although a strongly deleterious mutation has a negligible chance of fixation, it is possible to obtain some analytical understanding of its fixation time. In Appendix S1, we find that which captures the effect of changing environment on the fixation time decays slowly, as for a deleterious mutant, while as shown in the following section for a mutant under strong positive selection, [see (20)]. These results again emphasize that the changing environment has a much stronger impact on deleterious mutations (see also Supplementary Figure S2).
To understand the dominance-dependence of the fixation time, we first recall that in the static environment, the fixation probability increases (decreases) with the dominance level for mutants under positive (negative) selection. This result known as Haldane’s sieve (Haldane 1927) operates in slowly changing environments also (Devi and Jain 2020), and explains the increasing (decreasing) fixation time of the initially beneficial (deleterious) mutant with increasing h. For the initially deleterious mutant, since the recessive mutant (as compared to the dominant mutant) spends more time in the varying environment, its trajectories are more influenced by the changing selection coefficient, and the fixation time differs considerably from that in the static environment.
Semi-deterministic theory for on-average beneficial mutants in a large population
In the preceding discussion, we assumed the mutant to be under weak-to-moderate selection, as strongly deleterious mutations are unlikely to fix (Kimura 1957). Here, we study the conditional mean fixation time of a mutant that is under strong positive selection () at all times. Since the frequency of a mutant will rise faster (slower) if its selection coefficient remains larger (smaller) than s(0) until it fixes, the fixation time shown in Figure 4A initially decreases, then increases and finally approaches the fixation time in the time-averaged environment, exhibiting oscillations with decreasing amplitude. For nonzero , the resonance frequency ωr is inversely proportional to the fixation time when the selection coefficient is [which, for strong positive selection, is given by (19) on replacing s(0) by ], and we verify that the data in Figure 4A is consistent with this assertion.
Below we study the dependence of on the dominance coefficient and the rate of environmental change within a semi-deterministic theory (Cohn and Jagers 1994). This approach has been recently used to find the distribution of the conditional fixation time in a constant environment (Martin and Lambert 2015); here, we are interested in generalizing these results to time-dependent environments.
Starting at a low initial frequency, if it escapes stochastic loss, the mutant population evolves stochastically until a time t1 when it reaches a finite frequency (phase A). For such allele trajectories, it is a good approximation to treat the further evolution of the mutant population deterministically (phase B). However, at a time , when the mutant frequency is close to one, as the wildtypes are in low number, they are subject to stochastic fluctuations and go extinct at a time Tc (phase C). The stochastic phases A and C can be described by a Feller process, as discussed below.
Time-inhomogeneous Feller process
In a time-dependent environment, the allele frequency distribution which describes the probability that the mutant frequency is p given that its initial frequency was p0 obeys the following forward Kolmogorov equation (Risken 1996),
(12) |
where, as before, and . At short times where the mutant frequency is low (), the frequency distribution , and (12) reduces to
(13) |
where is the probability distribution of a Feller process (Feller 1951a, 1951b). This process describes the mutant frequency dynamics when the lineages can be assumed to grow independently, and is a continuous analog of classical branching process that is defined in discrete time and deals with the number of individuals. The Feller diffusion equation above can be easily generalized to include mutations and time-dependent population size (Cattiaux et al. 2009; Masoliver and Perelló 2012; Gan and Waxman 2015; Masoliver 2016). In the later discussion, we will use the Feller process to describe the wildtype dynamics also at large times where the wildtype frequency is low. As detailed in Appendix C, the exact solution of (13) is given by (C.4).
Fixation probability
Since the probability that the mutant dies out by time t is equal to , its eventual fixation probability, (see also Appendix C); using (C.4), we then obtain
(14) |
The above equation shows that u is nonzero provided the integral is finite. We verify that for constant selection and single initial mutant, (14) gives for a beneficial mutant (Haldane 1927).
Before proceeding further, we compare the result (14) with that obtained using a birth-death process in earlier studies (Kendall 1948; Uecker and Hermisson 2011; Devi and Jain 2020). While , the probability [refer to (4) of Devi and Jain (2020)] for a single mutant. For small selection coefficients, as the fixation probability is expected to be small, J must be large. Then, it follows that to leading order in , both processes yield the fixation probability to be .
Mean fixation time in slowly changing environments
As described in Appendix D, the distribution of the conditional fixation time for a mutant with initial phase θ is given by
(15) |
where
(16) |
(17) |
and the eventual fixation probability u is given by (14) for a single mutant. Supplementary Figure S3 shows a comparison between the expression (15) and the results obtained using numerical simulations when the cycling frequency is below, above, and close to the resonance frequency ωr, and we find a good agreement in all the three cases. For constant selection, we find that the generating function for the conditional fixation time obtained using (15) reduces to (A.11) of Martin and Lambert (2015).
Figure 4A shows that, except for strongly recessive or dominant mutants, the conditional mean fixation time depends weakly on dominance for arbitrary rates of environmental change. Figure 4A also suggests that for small and large cycling frequencies, the conditional mean fixation time . To understand this result, using (15), we rewrite the time as
(18) |
and analyze it for slowly changing environments using a perturbation theory. As explained in Appendix E, for , we get where,
(19) |
(20) |
In the above equations, is the Euler constant and, as before, . Note that while the fixation time was expanded in powers of in the last section, here the expansion parameter is .
The semi-deterministic theory described in this section is not a systematic, controlled approximation (unlike various perturbation theories) and it is not clear how good this approximation is; however, here we find that (19) matches exactly with (4.2) of Ewing et al. (2011) (on replacing N in the above expression by 2 N), which is obtained using a diffusion theory, and shows that the conditional mean fixation time in a population with dominance coefficient h is approximately equal to that in a population with the corresponding parameter . Note that this result holds for large , while as shown in Figure 3 for moderate selection, the dominant mutant takes longer than the recessive one to fix [see also Teshima and Przeworski (2006)].
Equation (20) captures the effect of a slowly changing environment on the conditional mean fixation time and matches well with the data obtained by numerically integrating (18) as shown in Figure 4B. The leading term on the right-hand side (RHS) of (20) is symmetric about h = 1/2, pointing to the approximate symmetry, discussed above. While the subleading correction does not have symmetry, its effect is small compared to the leading term for intermediate dominance. Supplementary Figure S4 further suggests that the distribution of the fixation time has approximate symmetry for small cycling frequencies but not for frequencies close to the resonance frequency, in accordance with the behavior of the mean fixation time shown in Figure 4A.
Equation (20) also shows that the mean fixation time decreases (increases) if the beneficial allele arises when the selection gradient (in time) is positive (negative), as intuitively expected; furthermore, both and decay with increasing selection. Finally, we mention that at the beginning of this section, we had assumed that . But in a slowly changing environment, the semi-deterministic approximation may be expected to work for and ; this is indeed confirmed in Supplementary Figure S4.
Discussion
In this study, we have investigated how a selective environment that is varying periodically and predictably in time affects the fixation time of a mutant in a finite, diploid population.
Effect of the environmental parameters
We find that if the environment changes fast, the fixation time in the temporally varying environment differs considerably from that in the static environment, as can be seen in Figures 1A and 4A at intermediate cycling frequencies. But for a meaningful comparison with the body of work on the fixation time in constant environments (Charlesworth 2020), most of our analysis has focused on the effect of slowly changing environments.
It should be noted that for time-dependent selection coefficients, the stochastic process is time-inhomogeneous and therefore the fixation time depends on the time at which the mutant arose and whether the environment is improving or deteriorating (Uecker and Hermisson 2011; Devi and Jain 2020). If an initially deleterious mutant on the way to fixation experiences a more favorable environment, its chance of extinction reduces and such a mutant can be expected to have a larger time of fixation than in an environment that remained unfavorable. On the other hand, if an initially deleterious (or beneficial) mutant faces an even more unfavorable environment, due to the higher risk of extinction at late times, the mutant is likely to fix sooner. The dynamics of an initially beneficial mutant that remains beneficial until fixation are, however, less affected by random genetic drift—if selection increases, due to the higher growth rate, the mutant fixes sooner than in an environment that had remained constant.
Selection regimes
In static environments, the qualitative behavior of the conditional mean fixation time of a mutant depends on the sign and strength of the scaled selection coefficient, . For a beneficial mutant, if selection is weak (), the fixation time increases with the dominance coefficient h and selection strength α, and can even exceed the fixation time of a neutral mutant (Mafessoni and Lachmann 2015). But for moderately strong selection (), the conditional mean fixation time decreases with α and increases with h (Teshima and Przeworski 2006; Charlesworth 2020). For stronger selection, it decreases with α and is approximately identical for two mutants with the same selection coefficient but dominance coefficients h and (van Herwaarden and van der Wal 2002; Ewing et al. 2011). The patterns for deleterious mutations follow on realizing that the conditional fixation time for a beneficial mutant with dominance coefficient h and a deleterious mutant with the same magnitude of selection but dominance level are equal (Maruyama 1974; Maruyama and Kimura 1974).
Here, we find that all the qualitative patterns described above continue to hold when the environment changes slowly, but there are quantitative differences. While a slowly changing environment has only a mild effect on the conditional mean fixation if the mutant is beneficial, its impact is much stronger for deleterious mutants. This asymmetry can be traced back to the fact that the fixation probability of a deleterious mutant is much more sensitive to a change in selection than the fixation probability of a beneficial mutant. Furthermore, for initially deleterious mutants, as the fixation probability of the recessives is higher than the dominants, the former can segregate in the population for a longer time and are therefore exposed to the changing environment for a longer duration, resulting in a fixation time which is substantially different from that in a constant environment.
Implications
In a constant environment, due to the Maruyama-Kimura symmetry for the conditional mean fixation time (Maruyama 1974; Maruyama and Kimura 1974), similar diversity patterns for beneficial and deleterious sweeps may be generated (Johri et al. 2020). But in a changing environment, due to the lack of the Maruyama-Kimura symmetry, a beneficial mutant in a slowly improving (deteriorating) environment can generate a diversity pattern different from that due to the fixation of a deleterious mutant under the same selection pressure but in a slowly deteriorating (improving) environment.
To ascertain this effect, we have conducted a preliminary study of the effect of hard sweep on linked neutral variation in a two-locus model of a finite, diploid population in which the first locus is modeled as in the Model section but the second biallelic locus is neutral. Recombination is assumed to occur with a probability but recurrent mutations are not allowed. As a result of genetic hitchhiking, the heterozygosity at the neutral locus following the fixation event (relative to the heterozygosity H0 before the new mutant appeared) is expected to decrease (Maynard Smith and Haigh 1974). Figure 5 shows the relative heterozygosity as a function of the cycling frequency for the parameters in Figure 1A, and we find that its qualitative behavior is the same as that of the conditional mean fixation time (Tajima 1990). The inset of Figure 5 emphasizes that the slowly changing selective environment only mildly influences the heterozygosity of an initially beneficial dominant mutant but has a strong effect on the heterozygosity of an initially deleterious recessive mutant. A more detailed study of the effect of environmental variation on various measures of genetic diversity will be taken up in a future work.
As already mentioned, although the qualitative patterns for the fixation time in a static environment are robust with respect to a slow change in the environment, there are quantitative differences. As a consequence, the effect of varying environment may be interpreted as an effective selection coefficient or dominance parameter. For example, in Figure 3, the fixation time in slowly changing environment, and for dominance coefficient h = 1/2 and selection strength (initial phase ) is about 1691. But if one assumes a constant environment, the same fixation time is obtained for which implies an 8% increase in the selection coefficient.
We therefore suggest to include the effect of changing environment in theoretical models of selective sweeps as this can potentially allow one to distinguish between the sign of selection, detect deleterious sweeps and correctly estimate the model parameters. Generalizing the above results to include the effect of inbreeding and sex-linked inheritance (Glémin 2012; Hartfield and Bataillon 2020) could also help to assess the importance of changing environment in evolutionary dynamics.
Data availability
The authors state that all data necessary for confirming the conclusions presented in the article are represented fully within the article. Supplemental material including the simulation program and a Mathematica notebook are available at GENETICS online.
Supplementary Material
Acknowledgments
The authors are grateful to three anonymous reviewers and Aurélien Tellier for many useful suggestions and comments to improve this work; Guillaume Martin and Amaury Lambert, and Joachim Hermisson for helpful correspondence on their work; and Parul Johri and Wolfgang Stephan for helpful comments on an earlier version of the manuscript.
Conflicts of interest
The authors declare that there is no conflict of interest.
Appendix A: Diffusion theory for time-inhomogeneous process
For a large finite population with small selection coefficient, the average fixation time can, in principle, be studied using the backward Fokker-Planck equation with time-dependent selection coefficient. The probability distribution obeys the following partial differential equation:
(A1) |
where and . In the above equation, the first term on the RHS is obtained on using that the deterministic rate of change of the mutant allele frequency is given by , and the second term is due to the sampling noise in a finite population. In (A1), the probability distribution is assumed to be a function of the initial time t0 and the final time t. But one can also consider the variables t0 and the time interval which leads to (S5) in Uecker and Hermisson (2011). However, as the formulation (A1) is much easier to handle, we work with it in the rest of the article.
The (unconditional) mean fixation time for a mutant arising at time t0 can be written as
(A2) |
Using Leibniz integral rule,
(A3) |
and (A.1), we then obtain
(A4) |
where the eventual fixation probability obeys (Uecker and Hermisson 2011; Devi and Jain 2020)
(A5) |
We verify that (A4) and (A5) reduce to the corresponding equations for the time-homogenous process where the fixation probability and the fixation time are independent of the initial time (Ewens 2004). The partial differential Equations (A4) and (A5) along with the boundary conditions
(A6) |
can, in principle, be used to find the mean fixation time for either sign of selection. However, these equations do not appear to be solvable, even for the dominance parameter h = 1/2, as the eigenfunction expansion method commonly employed for solving partial differential equations with time-dependent coefficients requires the eigenfunctions of the problem with constant selection that are, unfortunately, not known in a closed form (Jain and Devi 2020).
Appendix B: Mean fixation time in slowly changing environments
In slowly changing environments where and is arbitrary, the eventual fixation probability and the mean fixation time can be expanded in a power series in the small, dimensionless parameter , that is, . But for small enough , it is a good approximation to terminate this series at i = 1.
To find the equation satisfied by ui, it is useful to rewrite (A5) for the fixation probability as
(B1) |
where . Substituting the power series expansion for u on both sides of the above equation, collecting terms with the same power of and taking (that is, ), we obtain (4) and (6) in the main text for u1 and u0, respectively. The fixation probability in a static environment obeys the boundary conditions, . Therefore, due to (A6), . In a similar fashion, the Equations (5) and (7) for the mean fixation time and the corresponding boundary conditions can be derived.
The conditional mean fixation time in slowly changing environment can be written as
(B2) |
from which (8) follows on using for small .
Appendix C: Feller process with time-dependent coefficients
Taking the Laplace transform on both sides of (13), we find that obeys a first order differential equation,
(C1) |
where and . The above differential equation can be solved using the method of characteristics for the initial condition , and we obtain (Feller 1951b; Masoliver 2016)
(C2) |
(C3) |
Taking the inverse Laplace transform of the summand in the last expression and then carrying out the sum over n, we get
(C4) |
where is modified Bessel function of the first kind. In (C4), is the expected mutant allele frequency at time t, as can also be checked using (13); however, when conditioned on fixation, this frequency grows as which is faster than (Uecker and Hermisson, 2011). We also note that the eventual fixation probability (14) can also be written as .
Appendix D: Distribution of the fixation time of on-average beneficial mutant
In the stochastic phase A, although the expected mutant frequency grows exponentially with time, (C4) and (14) show that at large times [where , since s(t) > 0 at all times], the random variable , conditioned on fixation, has a stationary distribution,
(D1) |
[see also Uecker and Hermisson (2011)]. Furthermore, in the vicinity of time t1, the mutant frequency in the stochastic phase A is given by and in the deterministic phase B, the average mutant frequency grows as . Thus the initial mutant frequency in the deterministic phase is given by , and from (D1), it follows that the random variable is exponentially distributed with mean .
In the deterministic phase B that begins at time t1 and ends at time t2, the average mutant frequency obeys ; integrating this equation over time from t1 to t2, we get , where
(D2) |
But as the frequency , the initial frequency in phase C is related to as
(D3) |
In the stochastic phase C, the wildtype population evolves stochastically from time t2 until it goes extinct at time Tc. The wildtype frequency can be described by a Feller process that obeys (12) for the distribution when . For constant selection, it has been claimed that looking backward in time (that is, ), the wildtype frequency obeys the same dynamics as the mutant frequency with but s unchanged (Martin and Lambert 2015); however, this prescription results in a forward Kolmogorov equation with negative population size which is clearly absurd. Therefore, we will work always looking forward in time.
Proceeding in a manner similar to that for stochastic phase A, the distribution for the wildtype frequency subject to the initial condition can be found for . Then the probability that the wildtype goes extinct by time Tc is given by [refer to (14) for a comparison]
(D4) |
(D5) |
On taking the derivative of the above cumulative distribution with respect to Tc and averaging over the distribution of which can be found using (D1) and (D3), we finally arrive at (15) in the main text.
Appendix E: Mean fixation time of on-average beneficial mutant
To find the conditional mean fixation time given by (18), we need to express Tc as a function of using (16) which is given by
(E1) |
For small ω, we first expand the exponent of the integrand on the RHS to linear order in cycling frequency to obtain
(E2) |
where and . On carrying out the integrals and taking the logarithm on both sides, to order ω, we get
(E3) |
which can be inverted to finally give
(E4) |
where . Using this expression in the inner integral of (18) and carrying out the integrals, to leading and subleading orders in α, we obtain (19) and (20) in the main text.
Literature cited
- Cattiaux P, Collet P, Lambert A, Martinez S, Méléard SS, et al. 2009. Quasi-stationary distributions and diffusion models in population dynamics. Ann Probab. 37:1926–1969. [Google Scholar]
- Charlesworth B. 2020. How long does it take to fix a favorable mutation, and why should we care? Am Nat. 195:753–771. [DOI] [PubMed] [Google Scholar]
- Cohn H, Jagers P.. 1994. General branching processes in varying environment. Ann Appl Prob. 4:184–193. [Google Scholar]
- Devi A, Jain K.. 2020. The impact of dominance on adaptation in changing environments. Genetics. 216:227–240. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ewens W. 1973. Conditional diffusion processes in population genetics. Theor Popul Biol. 4:21–30. [DOI] [PubMed] [Google Scholar]
- Ewens W. 2004. Mathematical Population Genetics. Berlin: Springer. [Google Scholar]
- Ewing G, Hermisson J, Pfaffelhuber P, Rudolf J.. 2011. Selective sweeps for recessive alleles and for other modes of dominance. J Math Biol. 63:399–431. [DOI] [PubMed] [Google Scholar]
- Feller W. 1951a. Diffusion processes in genetics. In: Proceedings of the Second Berkeley Symposium on Mathematical Statistics and Probability. University of California Press, p. 227–246.
- Feller W. 1951b. Two singular diffusion problems. Ann Math. 54:173–182. [Google Scholar]
- Gan X, Waxman D.. 2015. Singular solution of the Feller diffusion equation via a spectral decomposition. Phys Rev E Stat Nonlin Soft Matter Phys. 91:012123. [DOI] [PubMed] [Google Scholar]
- Glémin S. 2012. Extinction and fixation times with dominance and inbreeding. Theor Popul Biol. 81:310–316. [DOI] [PubMed] [Google Scholar]
- Haldane JBS. 1927. A mathematical theory of natural and artificial selection. Math Proc Camb Phil Soc. 23:838–844. [Google Scholar]
- Hartfield M, Bataillon T.. 2020. Selective sweeps under dominance and inbreeding. G3 (Bethesda). 10:1063–1075. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jain K, Devi A.. 2020. Evolutionary dynamics and eigenspectrum of confluent Heun equation. J Phys A Math Theor. 53:395602. [Google Scholar]
- Johri P, Charlesworth B, Howell EK, Lynch M, Jensen JD.. 2020. Revisiting the notion of deleterious sweeps. bioRxiv 2020.11.16.385666. [DOI] [PMC free article] [PubMed]
- Karlin S, Taylor HM.. 1975. A First Course in Stochastic Processes. Academic Press, California, USA. [Google Scholar]
- Kendall DG. 1948. On the generalized “birth-and-death” process. Ann Math Statist. 19:1–15. [Google Scholar]
- Kimura M. 1957. Some problems of stochastic processes in genetics. Ann Math Statist. 28:882–901. [Google Scholar]
- Kimura M, Ohta T.. 1969. The average number of generations until fixation of a mutant gene in a finite population. Genetics. 61:763–771. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mafessoni F, Lachmann M.. 2015. Selective strolls: fixation and extinction in diploids are slower for weakly selected mutations than for neutral ones. Genetics. 201:1581–1589. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Martin G, Lambert A.. 2015. A simple, semi-deterministic approximation to the distribution of selective sweeps in large populations. Theor Popul Biol. 101:40–46. [DOI] [PubMed] [Google Scholar]
- Maruyama T. 1974. The age of an allele in a finite population. Genet Res. 23:137–143. [DOI] [PubMed] [Google Scholar]
- Maruyama T, Kimura M.. 1974. A note on the speed of gene frequency changes in reverse directions in a finite population. Evolution. 28:161–163. [DOI] [PubMed] [Google Scholar]
- Masoliver J. 2016. Nonstationary Feller process with time-varying coefficients. Phys Rev Evol. 93:012122. [DOI] [PubMed] [Google Scholar]
- Masoliver J, Perelló J.. 2012. First-passage and escape problems in the Feller process. Phys Rev E Stat Nonlin Soft Matter Phys. 86:041116. [DOI] [PubMed] [Google Scholar]
- Maynard Smith J, Haigh J.. 1974. Hitchhiking effect of a favourable gene. Genet Res. 23:23–35. [PubMed] [Google Scholar]
- Nagylaki T. 1992. Introduction to Theoretical Population Genetics. Springer-Verlag, Berlin, Germany. [Google Scholar]
- Risken H. 1996. The Fokker Planck Equation. Methods of Solution and Applications. Berlin: Springer. [Google Scholar]
- Stephan W. 2016. Signatures of positive selection: from selective sweeps at individual loci to subtle allele frequency changes in polygenic adaptation. Mol Ecol. 25:79–88. [DOI] [PubMed] [Google Scholar]
- Tajima F. 1990. Relationship between DNA polymorphism and fixation time. Genetics. 125:447–454. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Teshima KM, Przeworski M.. 2006. Directional positive selection on an allele of arbitrary dominance. Genetics. 172:713–718. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Uecker H, Hermisson J.. 2011. On the fixation process of a beneficial mutation in a variable environment. Genetics. 188:915–930. [DOI] [PMC free article] [PubMed] [Google Scholar]
- van Herwaarden OA, van der Wal NJ.. 2002. Extinction time and age of an allele in a large finite population. Theor Popul Biol. 61:311–318. [DOI] [PubMed] [Google Scholar]
- Williams CM, Ragland GJ, Betini G, Buckley LB, Cheviron ZA, et al. 2017. Understanding evolutionary impacts of seasonality: an introduction to the symposium. Integr Comp Biol. 57:921–933. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zhao L, Lascoux M, Overall ADJ, Waxman D.. 2013. The characteristic trajectory of a fixing allele: a consequence of fictitious selection that arises from conditioning. Genetics. 195:993–1006. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The authors state that all data necessary for confirming the conclusions presented in the article are represented fully within the article. Supplemental material including the simulation program and a Mathematica notebook are available at GENETICS online.