Data deposited at Dryad: doi:10.5061/dryad.cv507

Review

# Quantifying the effects of migration and mutation on adaptation and demography in spatially heterogeneous environments

Article first published online: 3 MAY 2013

DOI: 10.1111/jeb.12132

© 2013 The Authors. Journal of Evolutionary Biology © 2013 European Society For Evolutionary Biology

Additional Information

#### How to Cite

Débarre, F., Ronce, O. and Gandon, S. (2013), Quantifying the effects of migration and mutation on adaptation and demography in spatially heterogeneous environments. Journal of Evolutionary Biology, 26: 1185–1202. doi: 10.1111/jeb.12132

#### Publication History

- Issue published online: 10 JUN 2013
- Article first published online: 3 MAY 2013

- Abstract
- Article
- References
- Cited By

### Keywords:

- adaptive dynamics;
- evolutionary rescue;
- gene flow;
- lethal mutagenesis;
- local adaptation;
- migration-selection balance;
- species range

### Abstract

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

How do mutation and gene flow influence population persistence, niche expansion and local adaptation in spatially heterogeneous environments? In this article, we analyse a demographic and evolutionary model of adaptation to an environment containing two habitats in equal frequencies, and we bridge the gap between different theoretical frameworks. Qualitatively, our model yields four qualitative types of outcomes: (i) global extinction of the population, (ii) adaptation to one habitat only, but also adaptation to both habitats with, (iii) specialized phenotypes or (iv) with generalized phenotypes, and we determine the conditions under which each equilibrium is reached. We derive new analytical approximations for the local densities and the distributions of traits in each habitat under a migration–selection–mutation balance, compute the equilibrium values of the means, variances and asymmetries of the local distributions of phenotypes, and contrast the effects of migration and mutation on the evolutionary outcome. We then check our analytical results by solving our model numerically, and also assess their robustness in the presence of demographic stochasticity. Although increased migration results in a decrease in local adaptation, mutation in our model does not influence the values of the local mean traits. Yet, both migration and mutation can have dramatic effects on population size and even lead to metapopulation extinction when selection is strong. Niche expansion, the ability for the population to adapt to both habitats, can also be prevented by small migration rates and a reduced evolutionary potential characterized by rare mutation events of small effects; however, niche expansion is otherwise the most likely outcome. Although our results are derived under the assumption of clonal reproduction, we finally show and discuss the links between our model and previous quantitative genetics models.

### Introduction

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

Over a landscape, physical factors may change, different habitats may be present and different species may be encountered. These abiotic and biotic heterogeneities result in spatially heterogeneous selection pressures. The interplay between spatially heterogeneous selection, mutation and migration is of paramount importance in evolutionary ecology, because these effects are at the core of the understanding of species geographic ranges (Gaston, 2009). Two factors are usually invoked to explain limited species ranges (Polechová *et al*., 2009): (i) gene flow, by which migration from regions where the population is adapted and numerous to marginal regions prevents adaptation there, because of gene swamping (Haldane, 1956; Lenormand, 2002), and (ii) a lack of genetic variance to allow for adaptation to a new niche (Hoffmann *et al*., 2003; Blows & Hoffmann, 2005), which can be a consequence of gene flow, but can also be due to a limited amount of mutational influx. Understanding the effects of mutation and migration on adaptation in heterogeneous environments may also have more applied importance in pathogen and pest management (Peck, 2001). Pathogens and pests are often facing heterogeneous environments where different habitats may be characterized by different levels of control agents – pesticides, herbicides, antibiotics, etc. – (Comins, 1977; Mani, 1989; Singer *et al*., 2006), different hosts (Koskella *et al*., 2011) or even different organs within the same host (Sanjuán *et al*., 2004). Understanding the effects of gene flow (Lenormand & Raymond, 1998) and mutation (Bull *et al*., 2007; Martin & Gandon, 2010) is key to predicting the evolution of drug resistance and to optimizing the efficacy of treatments.

In this article, we consider a two-habitat model with explicit demographic dynamics, a setting similar to the models studied by Meszéna *et al*. (1997), Day (2000) and Ronce & Kirkpatrick (2001). We study the conditions under which the whole environment can be colonized, and how migration and mutation influence the level of adaptation. Note that we use the terms ‘dispersal’ and ‘migration’ interchangeably, as is commonly done (Ronce, 2007), although, strictly speaking, we are modelling dispersal (but the use is for instance to talk about a ‘migration–selection’ balance, and not a ‘dispersal-selection’ balance). We assume that the two habitats are present in equal frequencies in the environment, and that adaptation to one or the other habitat is governed by a quantitative trait. Maladapted populations have a reduced growth rate, and cannot fill up their habitat. When maladaptation is too high, it leads to a demographical collapse, or even to global population extinction. Our model assumes that individuals reproduce asexually (or alternatively, that individuals are haploid and the trait is coded by a single locus with a continuum of possible alleles). To study this model, we have to follow both the local densities in each habitat and the distributions of phenotypes, and see how local selection, migration and mutation affect them. Borrowing tools from different frameworks (local stability analysis from adaptive dynamics (Geritz *et al*., 1998), moment-based approaches like in quantitative genetics (Lynch & Walsh, 1998; Bürger, 2000)), we derive analytical approximations for the densities and distributions of traits in each habitat. First, we study the limiting case where the genetic variance due to mutations is very low, and we fully characterize the equilibria of our model. Second, we extend this analysis to mutations that are more frequent and/or of larger effect, and we derive approximations for the level of adaptation under a migration–selection–mutation balance. We evaluate the accuracy of these approximations by comparing them to numerical solutions of our deterministic model. In addition, we also check the robustness of our conclusions when demographic stochasticity is allowed, by running stochastic individual-based simulations. Finally, we also show how our analysis relates to the quantitative genetics framework and to models with sexual reproduction.

### Model

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

#### Phenotypic model

We model an environment containing two different habitat types, labelled 1 and 2, present in equal frequencies, and with the same maximal density of individuals (i.e. with the same carrying capacity; see Fig. 1). Adaptation to one or the other habitat is governed by a quantitative trait *z*. In each habitat, there is selection towards an optimal value of the trait; without loss of generality, because it amounts to rescaling the trait *z* (see section A.1.3 in the Appendix for more details), we assume that the optimum value is in habitat 1 and in habitat 2. Locally, populations grow logistically [note that we rescaled our equations, so that the *r* and *K* parameters of the logistic equation will not appear in our formulas], but maladapted individuals suffer from an increased death rate, , where *g* is the (scaled) strength of selection, and the fitness function in habitat *j*. We assume that the fitness functions are symmetric, so that , and we can also define a trade-off function *u* that links the fitness values in both habitats: . We derive some results with these general fitness functions, but then use specific functions, and assume quadratic fitness effects:

- (1)

Offspring inherit their parent's trait modulo mutations. These mutations occur at rate , and add an increment *y* to the parent's phenotype; we assume that the distribution of these mutational effects is a Gaussian *μ*(*y*), with mean 0 (there is no directional effect of mutations). This corresponds to a continuum of alleles model (Kimura, 1965). For the sake of simplicity, we additionally assume that there is a direct mapping between genotype and phenotype, that is, we ignore environmental variations. Finally, individuals disperse among habitats, at rate *m*, which is the same for both habitats, and is independent of genotype. Note that *m* is a rate, and can therefore take any positive value. Let be the density distribution in habitat *j*, at time *t*, measured relative to the local carrying capacity (*l* ≠ *j* refers to the other habitat); with our assumptions, its dynamics read:

- (2a)

The first line of eqn (2a) corresponds to logistic growth (first term in the brackets) and to selection (second term in the brackets). Note that the resulting exponential growth rate (i.e. the growth rate when the local density is close to 0), is , and that *ρ* is not always positive. This means that maladapted populations can go extinct (as in Ronce & Kirkpatrick, 2001). We show in Fig. 1b how the strength of selection parameter *g* affects this exponential growth rate, when quadratic fitness functions are used. The second line of eqn (2a) corresponds to the dispersal of individuals from one habitat to the other. Finally, the third line corresponds to mutations. Note that all parameters and variables in eqn (2a) have been rescaled to reduce the number of parameters (see section A.1.3 in the Appendix).

If we assume that the variance of the mutation kernel *μ* is small enough, we can use a diffusion approximation for the mutation term of eqn (2a) (Kimura, 1964; Lande, 1975; Rice, 2004). We can rewrite the third line of eqn (2a), and we obtain the following:

- (2b)

where is the variance of the mutation kernel (Var(*μ*)) times the probability of mutation ().

#### Numerical solutions and simulations of the full model

Numerical (deterministic) solutions of the full model (2b) are done by discreticizing the trait space in *nz* = 501 units, and by solving the 2**nz* coupled differential equations in R (R Development Core Team, 2010) with the ode.1D function of the deSolve package (Soetaert *et al*., 2010). The results are presented in Fig. 2 (filled curves), and in Figs 5 and 6 (dashed curves).

Individual-based stochastic simulations are run to check whether drift changes our predictions, since the analytical model does not take it into account. Continuous time is simulated using a Gillespie algorithm (Gillespie, 1977); the simulations are also coded in R. Results are presented in Figs 5 and 6 (dots).

### Results

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

Model (2a) yields four qualitatively different types of outcomes, illustrated in Fig. 2. These outcomes are global population extinction (labelled 0, Fig. 2a); an asymmetric equilibrium, where the whole population is adapted to one habitat only (*A*, Fig. 2b); and symmetric equilibria, where the global population is either unimodal (, Fig. 2d) or bimodal (, Fig. 2c). We use different frameworks and sets of assumptions to further describe these equilibria and their stabilities.

#### Moment-based approach

##### Derivation of the equations

Except under some specific cases, it is not possible to analyse in general the whole model (2a) (or its diffusion equivalent (2b)). We start by rewriting model (2a) using summary variables to describe the distributions of densities in each habitat; these summary variables are, for each habitat *j*, the total local densities , and the local mean traits . Specifically, we follow the difference between the local mean trait and the local optimum, that is, and . We also need to define the local variances, , and third central moments . The details of the derivations are presented in Appendix A.2. To study the dynamics of these summary variables, however, we need to evaluate the mean fitnesses in each habitat, and these expressions depend on the distributions of traits. A Taylor expansion of the fitness functions allows us to write the mean fitnesses as a function of the fitness of the mean traits, and of the local variances:

- (3)

Equation (3) is exact with quadratic fitness functions (see eqn (1); this is because the third and higher derivatives are null), and is valid otherwise with wide enough fitness functions (Abrams *et al*., 1993; Abrams, 2001) [e.g. when Gaussian fitness functions are used, for small distances between the local optima () relative to the width of the functions, which corresponds to weak trade-offs (Débarre & Gandon, 2010)]. After some algebra we obtain the following dynamics:

- (4a)

- (4b)

It is important to note that system (4) is still not closed: there are more variables than equations. The local variances () and third moments () are variables too, and their dynamics depend on higher moments of the distribution. Still, we can use these general equations to provide unclosed expressions for measures of local adaptation.

##### Characterization of the symmetric equilibrium

Using the summary variables presented in system (4), we can further characterize the symmetric equilibria and (Fig. 2d,c) under a selection–migration–mutation balance. Because of symmetries, system (4) is dramatically simplified: the equilibrium densities, and also the variances are the same in both patches () and so are the variances (); the mean traits and the third moments are symmetrical ( and ). Even using these symmetry relations, setting and in system (4) does not yield explicit solutions unless the fitness functions are specified. We therefore use quadratic fitness functions (see eqn (1)), and obtain the following expressions for the local densities and mean trait :

- (5a)

- (5b)

and the differentiation among habitats at equilibrium is :

- (6)

It is important to keep in mind that expressions (5)–(6) are not closed: they depend on the local variances and third moments , which are themselves functions of the model's parameters *m* and *g*. In addition, the equations for the dynamics of each moment of the distribution depend on the two higher moments (the dynamics of depends on *v* and *ς*, the dynamics of *v* will depend on *ς* and the fourth moment, and so on and so forth). One solution to cut this chain is to use a moment closure approximation, that is, to make some approximations on the shape of the distributions. This is commonly done in quantitative genetics models, where the distributions of breeding values are assumed to be Gaussian. However in this study, we are dealing with asexual populations, there is no reason to assume Gaussian distributions of traits in each deme for all parameters. We therefore need another kind of approximation. We are first going to neglect the variance due to mutations, so as to approximate the distributions of traits as collections of spikes; we will just need to find the localization and height of these spikes. Later on, we will relax this assumption.

#### Adaptive dynamics approach

In this section, we assume that evolution proceeds gradually, because mutations are rare and of weak effect. Rare mutations means that a mutation is fixed or goes extinct before a new one appears in the population; weak effect means that the traits of the mutants are close to the resident's traits, so that we can use weak selection approximations – but we will relax this assumption later on. Evolution therefore proceeds as a series of competitive replacements. The local distributions are approximated as collections of spikes (instead of smooth curves like Gaussians), and adaptive dynamics (Geritz *et al*., 1998) is an optimization method (Abrams, 2001) to find the equilibrium localization in trait space of these spikes, which are also called evolutionary stable strategies (ESS). This method also allows us to determine whether selection at the scale of the whole environment is, or not, disruptive.

##### Gradual evolution in monomorphic populations

Using eqn (2a), we can write the dynamics of rare mutants with a trait , trying to invade a population containing only individuals with trait (the resident population), having reached its ecological equilibrium, so that the density of the resident population in habitat *j* is :

- (7)

These mutants can invade when their fitness gradient (whose expression with general fitness functions is given in eqn (B.1) in the Appendix) is positive.

###### Singular strategies

Singular strategies, that is, potential ESS, that is, localization of the spikes in the local distributions, are values of at which the fitness gradient is equal to zero.

###### Intermediate strategy

As the two habitats are present in equal frequencies, the intermediate trait is always a singular strategy (since and ).

###### Other singular strategies

For some parameter values, there are other roots of the selection gradient besides ; however, there is no general simple analytical expression for them, even when explicit, quadratic fitness functions are used. When they exist, the other roots, , correspond to the asymmetric equilibrium (A) (see Fig. 2b); they are found numerically in the general case. In the specific case, where the migration rate *m* is low, and selection is strong enough (in particular *g* > 1), and with quadratic fitness functions, it is possible to find approximations of (see Appendix B.1.3):

- (8)

The higher the migration rate *m* and the weaker the strength of selection *g*, the closer is to the intermediate strategy 1/2. The accuracy of this approximation is evaluated in Fig. 6a–b (dotted grey lines): the prediction is accurate at low migration rate *m*, as expected.

###### Stability of the intermediate strategy

It is possible to investigate the stability of the singular strategy without specifying the fitness functions, which generalizes the results of Meszéna *et al*. (1997). First, the equilibrium density associated with the intermediate strategy is

- (9a)

which, with quadratic fitness functions, reads

- (9b)

This means that a population fixed for the strategy goes extinct if *g* > 4; this is because the exponential growth rate of the intermediate strategy becomes negative when *g* > 4, see Fig. 1b.

Using standard adaptive dynamics techniques (Geritz *et al*., 1998), we find that gradual evolution leads to the intermediate strategy when (Eshel, 1983):

- (10)

This is the condition for convergence stability (CS). Note that this condition is implicit, because it requires the evaluation of the equilibrium density , which will depend on the chosen fitness functions. Qualitatively, however, we know that the second term of the right-hand side of (10) is positive. If condition (10) is not fulfilled, then is a repellor, and gradual evolution leads the resident trait away from it; this is for instance the case in Fig. 3. An explicit analytical expression exists for (10), when quadratic fitness functions are used, but it is too long to be written here, and is instead plotted in Fig. 4 (thick grey line). Note also that this corresponds to a local stability condition, derived assuming mutations of weak effects.

A population with strategy resists invasion from any other (close) mutant when

- (11)

First, note that, whichever the chosen fitness functions, evolutionary stability implies convergence stability (if condition (11) is fulfiled, then (10) is too); this means that there are no ‘Garden of Eden’ strategies (Hofbauer & Sigmund, 1990), where an evolutionary stable strategy cannot be reached by gradual evolution. Second, whether is evolutionary stable or not, that is, whether global selection is stabilizing or disruptive, depends only on the concavity of the trade-off curve at , relative to −2*g*/*m*. Condition (11) means that the intermediate strategy can only be evolutionary stable if the trade-off is concave enough (i.e. weak, which corresponds to a convex fitness set *sensu* Levins, 1962) at . In this case, the higher the migration rate *m*, and the weaker the strength of selection *g*, the more stable the intermediate strategy . A convex (i.e. strong) trade-off, however, always leads to disruptive selection, and turns into a branching point. Condition (11) is plotted as a black dashed line in Fig. 4, where quadratic fitness functions are used.

Adaptive dynamics analyses often stop at this point, but it is possible to investigate further what happens when selection is disruptive, that is, when condition (11) is not satisfied.

##### Evolution in polymorphic populations

When selection is disruptive, the resident population becomes polymorphic, and is now composed of individuals with traits and . Because of symmetries in the model, we have , and the corresponding densities are equal: , *l* ≠ *j*. The invasion dynamics of a rare mutant with trait read (the equation is similar when the mutant is close to the other resident strategy ):

- (12)

and the corresponding selection gradient is given in the Appendix, eqn (B.5).

###### Singular strategies

The ESS strategies and at the polymorphic evolutionary equilibrium are strategies at which the selection gradient vanishes. With general fitness functions, the condition for strategies and to be singular is given in eqn (B.6) in the Appendix. With quadratic fitness functions, this yields

- (13)

The lower the migration rate *m* and the higher the strength of selection *g*, the closer these strategies are to the local optima 0 and 1. The local relative abundances in habitat 1 associated with these strategies are (switch − and + for relative abundances in habitat 2):

- (14)

###### Stability

When evolution proceeds gradually, that is, when mutations are rare and of weak effect, the polymorphic equilibrium (13) can only be reached from an initially monomorphic population if is stable by convergence, that is, if (10) holds and if the population is viable (light grey area in Fig. 4). However, the polymorphic equilibrium (13) is stable for a much larger range of parameters values. With quadratic fitness functions, the polymorphic equilibrium is actually stable, whenever:

- (15a)

and

- (15b)

Condition (15a) means that selection is disruptive; it corresponds to condition (11) with quadratic functions, and is plotted as a black dashed line in Fig. 4. Condition (15b) corresponds to the condition for whole population persistence, and delimits the black area in Fig. 4. Note that condition (15b) always holds when *g* ≤ 4. Fig. 4 shows that, in addition to the light grey area, the equilibrium can also be reached for stronger selection *g*, in the dark grey area, if mutations have large phenotypic effects (i.e. are not infinitesimal). This means that the polymorphic equilibrium can be reached for a wider range of parameter values. This effect of the size of mutations is illustrated in Fig. 3, for a specific combination of *m* (migration rate) and *g* (strength of selection) parameters. Fig. 3 shows the combinations of couples of traits which can coexist: it corresponds to the superimposition of a pairwise invasion plot, PIP, and its reciprocal. Monomorphic populations are on the highlighted diagonal. If evolution proceeds gradually, from a monomorphic population, then it leads away from the intermediate strategy to one of the two monomorphic singular strategies (dots labelled *A*, localized at the other roots of the selection gradient, and corresponding to the asymmetric equilibrium approximated in eqn (8)). However, if mutations are large, or if the population is initially polymorphic, then evolution leads to the dimorphic strategies labelled in Fig. 3, whose values are given in system (13): this is the symmetric bimodal equilibrium. Hence, whether the outcome is an asymmetric (*A*) or symmetric bimodal () equilibrium depends on the initial state of the population, and on whether mutations are constrained.

##### Summary variables

Going back to the whole model (2a), the assumptions associated with adaptive dynamics amount to assuming that the mutation rate is very low, which is equivalent to in eqn (2b). The equilibrium distributions of traits are approximated as one ( and *A* equilibria) or two () spikes–and for the equilibrium system (14) gives us the relative heights of the spikes. Note that this is not equivalent to neglecting standing genetic variance altogether, since there is a non null variance in the trait distribution at a bimodal equilibrium . Since we know the distributions, we can compute summary variables to bridge the gaps with the moment-based approach. Table 1 summarizes these variables; it is important to note that all expressions are compatible with the results given in section 3.1.2, and also that this time these expressions are closed, that is, do not depend on other variables. The expressions in Table 1 will be described in more detail in the next section, when deriving more general expressions.

Equilibrium | ||
---|---|---|

Conditions for viability | g ≤ 4 | |

Conditions for stability | g ≤ 2m | g > 2m |

Mean trait | 1/2 | |

Differentiation | 0 | |

Local total density | ||

Local variance | 0 | |

Local third central moment | 0 |

With adaptive dynamics methods, we analysed our model assuming that mutations are rare. Now, what happens with more frequent mutations?

#### Merging both methods

We will now add mutational variance to the equilibrium solutions derived under the adaptive dynamics model. This can be done numerically by finding solutions to model (2b) (see the filled curves in Fig. 2). The aim of this section is to find analytical approximations of these solutions. To this end, we will assume that each local distribution of traits is composed of one or two Gaussian distributions, each centred at the singular strategies derived under adaptive dynamics (Meszéna *et al*., 2005), and with a variance which we will approximate as follows. We will assume that the variance around the singular strategies (the former spikes) is the same as the genetic variance in a population at a mutation–selection balance. We therefore first have to derive this variance (‘*μs*’ like mutation–selection). We use a diffusion approximation for mutation (see (2b)). Note also that from now on we focus on quadratic fitness functions.

##### Mutation–selection equilibrium

In a single population, the equilibrium distribution of traits at a mutation–selection equilibrium is found by solving the following differential equation:

- (16)

A Gaussian distribution of mean 0 and variance is a solution of (16), and we find:

- (17)

(Kimura, 1965; Bürger *et al*., 1989). Equation (17) tells us that the variance at mutation–selection equilibrium in a single population under stabilizing selection, with a quadratic fitness function, is the square root of the mutational variance scaled by the strength of selection *g*. Note that we obtain this formula because we assume ‘incremental’ mutations, as in a continuum-of-alleles model (see the third line of eqn (2a)), as opposed to mutations which totally change the value of an allele, as is assumed under the House of Cards model (Turelli, 1984).

When the mean of the distribution is not at the local optimum *θ*, which will occur under a migration–selection balance (i.e. when there is directional selection Brodie *et al*., 1995), then should be skewed, and therefore not Gaussian. However as a first approximation, we will neglect this skew for the *unimodal* distributions, and assume that the sub-distributions around the ESS spikes are Gaussian. Note that this does not mean that we generally neglect the skew of the distributions.

##### Mutation–migration–selection equilibrium

###### When the population is unimodal

At the symmetric unimodal equilibrium , we assume that the distribution of traits is the same in both habitats: a Gaussian distribution centered around , with variance :

- (18)

This distribution is compared to the actual distribution obtained with the diffusion approximation in Fig. 2d: the black thick curves are our analytical approximation, while the filled curves are the deterministic numerical solutions of model (2b). Taking this mutational variance into account, the local density now reads:

- (19)

So the condition for whole population persistence, at the symmetric unimodal equilibrium (i.e. when *g* < 2*m*) is now:

- (20)

The critical variance only depends on *g*, because the mean of the distribution of traits at the symmetric unimodal equilibrium, , is independent of the migration rate *m*. By making intermediate values unviable (see Fig. 1b), stronger local selection (higher *g*) compromizes global persistence.

At the asymmetric equilibrium *A*, the distributions of traits are assumed to be the same in both habitats, that is, Gaussians of mean and of variance (given in eqn (17)). The value of is obtained using the approximation presented in eqn (8), or by numerically finding roots of the selection gradient; the height of the distributions is then found by solving for (eqn (14), with one trait only). The result is compared to the full model in Fig. 2b.

###### When the population is bimodal

At the symmetric bimodal equilibrium , we now assume that the local distributions are weighted sums of Gaussian distributions, centred around the peaks found under adaptive dynamics ( and , see eqn (13)), and with variance (given in (17)). The weights are the relative abundances of individuals with each strategy, that is, the height of the spikes and given in eqn (14). We then have the following distribution of traits in habitat 1:

- (21)

The trait distribution in the other habitat is obtained by exchanging the and weights. This approximation is compared to the numerical solution of the full model in Fig. 2c. Note that the solution presented in eqn (21) is approximate, and is meant to be accurate only with low (even though it can be seen in Fig. 5 that the approximation is still surprisingly precise for higher ).

Using eqn (21), we can recalculate the summary variables of the distribution. The mean of this distribution is

- (22)

This is the same mean trait as found with adaptive dynamics (see Table 1). Ticks for the mean traits and are shown on the top of distributions plotted in Fig. 2c, and the accuracy of the result is evaluated in Fig. 5b (full line). However, adding mutational variance increases the equilibrium local genetic variance:

- (23)

With our approximation, we find that the equilibrium local variances at the symmetric bimodal equilibrium are the variances at the mutation–selection equilibrium plus the variance at the migration–selection equilibrium assuming rare mutations (the second term of eqn (23) is also in Table 1). In particular, eqn (23) tells us that the equilibrium local variances are highest for intermediate migration rates (*m* = *g*/4), as can be seen on Fig. 6c.

The third central moment remains (see Table 1):

- (24)

The third central moment is highest for a smaller value of the migration rate *m* (the maximum is reached for *m* = *g*/6), as can be seen on Fig. 6d. The local densities read as follows:

- (25)

so that, in particular, the condition for global persistence becomes as follows:

- (26a)

and

- (26b)

The critical variance decreases with both *g* and *m*. Stronger selection *g* makes intermediate phenotypes less viable. Lower migration rates *m* favour more specialized types, closer to the local optima in each habitat, and therefore favour population persistence.

#### Checking the accuracy of the approximations

The accuracy of our approximations when mutations are not infinitesimal (i.e. the results derived in the previous section) is evaluated in Figs 5 and 6. Our analytical predictions for the summary variables (population densities , mean traits (distance to local optimum) , variances , and absolute value of the third moments ; full curves) are compared to the results obtained by integrating numerically model (2b) (dashed curves, behind the full curves when the analytical approximation matches the full model, and therefore sometimes not visible). The fit is very good when is small enough, as expected, because our analytical approximations were derived assuming relatively small mutational effects (nonzero, but still small ). For very high , that is, very frequent mutations and/or mutations of large effect, our approximations remain surprisingly rather accurate (see Fig. 5 and compare our approximations [full lines] to solutions of the deterministic model [dashed lines]); note however that, compared to deterministic solutions, our approximations slightly overestimate the genetic variance (Fig. 5c), overlook the effect of high on the asymmetry of the distributions of traits (Fig. 5d), and as a consequence, underestimate the equilibrium population size for very high (Fig. 5a). We also check the robustness of these predictions when stochasticity is taken into account; the dots in Figs 5 and 6 are the average summary variables obtained after running individual-based stochastic simulations. In the stochastic simulations, the population sometimes ends up at a symmetric bimodal equilibrium, starting from an asymmetric initial state (grey dots), while it may remain trapped at an asymmetric equilibrium in the deterministic version of the model; this illustrates the fact that the asymmetric equilibria are only locally stable, while the symmetric equilibria are globally stable. Adding stochasticity in the simulations did not substantially influence neither the final population densities nor the mean traits (the simulation dots are on the deterministic curves in subfigures (a) and (b) of Figs 5 and 6), but because of drift, the variances and asymmetry were lower in the stochastic individual-based simulations than predicted with a deterministic model (subfigures (c) and (d) of Figs 5 and 6) (Bürger *et al*., 1989; Bürger & Lande, 1994).

### Discussion

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

In this article, we study the interplay of demographical and evolutionary dynamics in a spatially heterogeneous environment with two habitats in equal frequencies. Four qualitatively different types of outcomes are possible (summarized in Fig. 2): whole population extinction (labelled 0); adaptation to one habitat only (*A*), leaving the other almost empty; adaptation to both habitats, with specialized () or generalist () phenotypes. Which of these equilibria is reached depends on the migration rate, *m*, and the strength of selection *g*, but also on the rate and variance of mutations . Quantitatively, we derive analytical approximations for the distributions of phenotypes under a migration–selection–mutation balance; this allows us, in particular, to derive analytical expressions of local densities, and mean, variance and asymmetry of the distributions of phenotypes in each habitat.

#### Conditions for population persistence

The conditions for global population persistence are the conditions for not reaching the (0) outcome of global population extinction (see conditions in eqn (20) when *g* < 2*m* and (26) otherwise). We show that whole population extinction is possible when selection is strong and when migration and/or mutation rates are high.

##### Migration load

High migration rates favour a generalist strategy , which is intermediate between the two local optimum traits, and therefore adapted to global, averaged conditions. If the intensity of selection, *g*, is very high – high meaning *g* > 4 with quadratic fitness functions – the generalist strategy may not be viable in either habitat: it has a negative exponential growth rate in both habitats (see Fig. 1b, dashed curve), which results in global population extinction (see the dark grey area, labelled 0, in Fig. 4). Note that this outcome is possible because our fitness functions allow for negative exponential growth rates, a situation often neglected in other models (e.g. Meszéna *et al*. (1997), where the exponential growth rate when , with their notations; and while Ronce & Kirkpatrick (2001) did allow for negative exponential growth rates, they analysed their model assuming a fixed variance of the distribution of traits). High migration rates and strong selection make the environment globally unsuitable, while individuals could survive under lower migration rates.

##### Mutation load

Large mutation rates may also lead to extinction, but for a different reason. More frequent mutations, or mutations of larger effect (i.e. greater ) inflate the variance of the phenotypic distribution. This creates a mutation load where many genotypes are far from their local optimum, which decreases the mean fitness of the population. Beyond a critical value of ( when *g* < 2*m*, eqn (20) and otherwise, (26a)), the drop in fitness is so large that the population cannot persist. Again, this phenomenon occurs because, in our model, high maladaptation may result in negative exponential growth rates. Fig. 5a illustrates the effect of more frequent mutations and/or mutations of larger effect (both resulting in a higher ) on population persistence.

This effect of is akin to the effect of high mutation rates on the viability of some microbes. Our results may thus be relevant in the context of lethal mutagenesis, a promising new antiviral therapy in which viruses are driven to extinction by chemically increasing their genomic mutation rate (Freistadt *et al*., 2004; Bull *et al*., 2007; Martin & Gandon, 2010). Previous attempts to model this phenomenon always considered the infected host to be a homogeneous environment. While Steinmeyer & Wilke (2009) explicitly took into account some within-host heterogeneity, by allowing the rate of lethal mutations to vary between compartments, they focused on viral population dynamics and did not include the possibility for the virus to adapt to intrinsic differences between compartments. There is, however, some evidence that the individual host is a structured environment, where subpopulations of virus may differentiate in different tissues (Sanjuán *et al*., 2004). This differentiation may be driven by the balance between heterogeneous selective pressures, migration and mutation. Our model accounts for the interplay between these three different forces (but note that we assume that the compartments are present in equal frequencies, with symmetrical migration rates between them), and the critical values of we derive may help to examine the influence the effects of various parameters on the feasibility of lethal mutagenesis.

#### Conditions for niche expansion

Niche expansion occurs when a population initially adapted to only one habitat expands its range and colonizes both habitats; with our notations, it occurs when the final state is a symmetric ( or ) equilibrium. Our analysis shows that niche expansion depends on whether mutations are constrained or not. If mutations are constrained, that is, if the variance of the mutation kernel is small or mutations are infrequent (infinitesimally small ), niche expansion only occurs when the strength of selection is weak and when the migration rate is high, that is, right of the full grey curve in Fig. 4; otherwise, the population remains at an asymmetric equilibrium *A*, and cannot efficiently colonize the other habitat. However, if the mutations are not constrained, that is, if arbitrarily large mutational steps are possible, niche expansion *always* ultimately occurs, provided the population is viable.

Classically, dispersal is viewed as a force that can have diverse effects on niche expansion. On the one hand, dispersal contributes to gene flow, and could potentially prevent niche expansion due to gene swamping, yielding what Ronce & Kirkpatrick (2001) coined a migrational meltdown. On the other hand, dispersal brings new individuals in the unoccupied patch, and therefore allows for colonization and subsequent evolution (Gomulkiewicz *et al*., 1999). In addition, dispersal contributes to the increase in local genetic variances, and therefore leads to more available variance for adaptation. Effects of dispersal on niche expansion in source-sink models vary widely with both the details of the life cycle and the genetic architecture of traits involved in local adaptation (see Holt & Barfield, 2011, for a recent review). In our asexual / one locus model, where the two habitats are present in equal frequencies, we see that niche expansion is only ultimately prevented when (i) selection (*g*) is strong and migration (*m*) is high, so that the global population is not viable (0 zone in Fig. 4), and (ii) migration is weak and mutations are rare and of small effect only. Otherwise (when the global population is viable and mutations are not infinitesimally small or rare), migration has mainly a positive demographic effect for niche expansion. Yet, it has a negative impact on the pattern of local adaptation.

#### Local adaptation

A classical way to measure adaptation in heterogeneous environments is to do transplant experiments. Local adaptation is often defined as the average mean ‘local’ fitness minus the average mean fitness ‘foreign’ (Kawecki & Ebert, 2004; Nuismer & Gandon, 2008; Blanquart *et al*., 2012):

- (27)

In our model, with quadratic fitness functions, the level of local adaptation at the symmetric equilibrium defined as in eqn (27) is given by the product of the intensity of selection *g* and the equilibrium divergence in local mean traits :

- (28)

The simplicity of eqn (28) should remind the reader that this result is valid under specific assumptions; in particular, the two habitats are assumed to be present in equal frequencies, and fitness functions are assumed to be quadratic, or at least wide enough (i.e. weak enough trade-off) for Taylor expansions like in eqn (3) to be valid approximations. Although these assumptions are common, partly because they make models analytically tractable and therefore help to gain some analytical insights (see e.g. Hendry *et al*., 2001; Ronce & Kirkpatrick, 2001, and this article), they correspond to limiting cases. Switching from perfectly symmetrical (*c* = 1/2) to nonsymmetrical (*c* ≠ 1/2) environments may quantitatively, but also sometimes qualitatively affect the evolutionary outcomes.

After these words of caution, eqn (28) gives some insights on the factors moulding the level of local adaptation. We recover the direct effect of migration, which decreases local adaptation by selecting for more generalist strategies, that are therefore less specialized and less locally adapted.

Because of the symmetry of the environment, eqn (28) hides the fact that migration and mutation also affect higher moments of the local distributions of traits in each habitat, and in particular their variances (2nd moments) and asymmetries (3rd moments, proportional to the skew): these effects are illustrated on panels (c) and (d) of Figs 5 and 6. Importantly, our analysis emphasizes that the equilibrium value of each moment of the local distributions of traits depends on higher moments; for instance, the mean traits at equilibrium, , depend in particular on the asymmetry of the local distribution of traits (see eqn (5b)). This asymmetry is not a parameter – and neither is the local variance – both affect and are affected by the value of .

Our approximations suggest, and numerical simulations confirm that mutation, which in this model is assumed to be unbiased (the mean of the mutation kernel is zero) has almost no effect on the mean traits (see Fig. 5b). This confirms that although migration and mutation may have similar demographic consequences — which are the migrational and mutational loads, resulting in a drop in population densities (panels (a) in Figs 5 and 6) — these two evolutionary forces have different effects on the evolutionary outcome, that is, on the local mean traits : while gene flow limits local adaptation, mutations do not influence the values of the local mean traits (see eqns (22) and (28)).

#### Links with previous quantitative genetics models

Equations (4a) and (6) may have a taste of *déjà vu* for readers familiar with quantitative genetics models. To see this, compare for instance the moment-based eqns (4a) to system (2a) in Ronce & Kirkpatrick (2001), or solution (6) to eqn (7) in Hendry *et al*. (2001). Coincidence? We think not. The effects of selection, migration and mutation on the distributions of phenotypes which are described in eqn (2a) are the same in sexual models. With sexual reproduction however, reproduction also affects the distributions of phenotypes. Deriving expressions for traits coded by multiple loci, and with sexual reproduction (i.e. taking into account the effect of recombination), is much more challenging in the general case; usually, some additional simplifying assumptions are made.

##### Linkage equilibrium

For instance, some quantitative genetics models (see for instance the derivation in Barton, 1999, continuum of alleles model) assume that all loci coding for the trait are at linkage equilibrium (i.e. are statistically independent), and that there are no epistatic interactions for the value of the trait (i.e. the effects of all loci are additive). At each locus, the distributions of alleles follow eqn (2a); the trait value of an individual is obtained by summing the allelic values at all loci. Under such assumptions, Barton (1999)'s eqn (2a) for the change in the mean phenotypic value is equivalent to our eqn 4(b). Although the biology is different (clonal vs. sexual reproduction), with the continuum-of-alleles derivation and the assumption of linkage equilibrium, the equations used to model sexual reproduction are the same as the ones used to model clonal reproduction.

##### Gaussian distributions and fixed variances

Many quantitative genetics models further make the simplifying assumptions that the distributions of phenotypes are Gaussian (therefore, symmetric, so that the third moments *ς* are zero), but even that the genetic variance is constant (so that *v* is not a variable anymore but becomes a parameter). In our asexual model, such assumptions are obviously problematic – but they can also be problematic with sexual reproduction (as underlined for instance by Tufto, 2000; Lopez *et al*., 2008; Yeaman & Guillaume, 2009; Huisman & Tufto, 2012). In particular, assuming fixed variances (as in Kirkpatrick & Barton, 1997; Ronce & Kirkpatrick, 2001) may artificially constrain the potential for adaptation, while adaptation will be easier with nonfixed variances, as noted for instance by Barton (1999, 2001) for models of evolution on gradually changing environments (models of clines). In addition, local distributions of phenotypes are also likely not to be Gaussian under a migration–selection balance, even with sexual reproduction (Yeaman & Guillaume, 2009; Huisman & Tufto, 2012). Using genetically explicit simulations, Yeaman & Guillaume (2009) showed that neglecting the asymmetry (skew) of the distributions led to an underestimation of the equilibrium divergence () among habitats. Their conclusion is confirmed by our formula (6). Also, like Yeaman & Guillaume (2009), we find that the skew is highest at intermediate migration rates (see eqn (24) and Fig. 6d).

##### Additive loci of equal effect

Other models assume that the quantitative trait is coded by a large number of loci, each with two alleles (+/−), all loci contributing additively to the phenotype (no epistasis or dominance effects), and of fixed, and often also equal effects. Under this diallelic architecture, less skew is generated than under a continuum-of-alleles model (Yeaman & Guillaume, 2009). Recently, however, Yeaman & Whitlock (2011) examined the evolution of the genetic architecture of adaptation in heterogeneous environments. In their simulations, the effect sizes of each locus could evolve, and they found that adaptation under a migration–selection balance resulted in concentrated architectures with a few linked loci of large effect (instead of many loci of small effect), a situation – ploidy aside – close to the one-locus with continuum-of-alleles architecture used in this article.

Finally, taking into account linkage disequilibrium, spatially heterogeneous selection, and explicit population dynamics in a single analytical model is particularly challenging but constitutes an interesting perspective to this study.

#### Other limits and perspectives

As we wanted to link our model to previous studies, in particular those by Meszéna *et al*. (1997) and Ronce & Kirkpatrick (2001), and because this made our model analytically tractable, we focused on a specific scenario, where environmental heterogeneity is represented by two habitats in equal frequencies. Assumptions of symmetry are common in models. As mentioned earlier, our predictions on local adaptation are likely to change with asymmetric environments. In particular, asymmetry allows for gene swamping (Nagylaki, 1975; Lenormand, 2002), making niche expansion more difficult (see Holt & Barfield, 2011, for a recent review). In addition, although we derived as many results as we could with general fitness functions, our illustrations are done with quadratic fitness functions like in Ronce & Kirkpatrick (2001); such functions correspond to weak trade-offs in fitness in both habitats (i.e. convex fitness sets). Our figures would differ if stronger trade-offs were used, because such trade-offs make the bimodal equilibrium less easily attainable by gradual evolution (see e.g. Levins, 1962; Kisdi, 2001; Ravigné *et al*., 2009, in non-demographical models).

As Ronce & Kirkpatrick (2001) and Meszéna *et al*. (1997), we focused on a continuous time model, where density regulation and migration are decoupled. In discrete time models, the order of events in the life-cycle matters, by making selection more or less frequency-dependent, and may critically affect evolutionary outcomes (Via & Lande, 1985; Ravigné *et al*., 2004; Débarre & Gandon, 2011).

### Conclusion

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

To conclude, this study is an attempt to bridge some gaps between different theoretical approaches. We borrowed and combined tools from different frameworks: formulations with partial differential equations for clonal inheritance (Doebeli, 2011; Sasaki & Dieckmann, 2011) (equation (2a)) and diffusion approximations (Kimura, 1964) (eqn (2b)); quantitative genetics (Lynch & Walsh, 1998) and moment-based approaches (Bürger, 1991, 2000) adaptive dynamics (Geritz *et al*., 1998) for our derivations with rare mutations; and we finally combined them all. This generalist approach allowed us to reach a better understanding of the demography and evolution of populations in heterogeneous environments.

### Acknowledgments

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

We thank S.P. Otto, R. Aguilée, S. Yeaman, F. Guillaume, M. Kirkpatrick, N. Barton and five anonymous reviewers for comments and discussions on previous versions of this study, and R. FitzJohn for his expeRtise.

FD acknowledges funding from the French ministry of research, from an NSF grant DMS 0540392, and from UBC's Biodiversity Research Centre (NSERC CREATE Training Program in Biodiversity Research); OR and SG acknowledge financial support from CNRS, the Agence Nationale de la Recherche, ‘6th extinction’ program, through the project EVORANGE (ANR-09-PEXT-011), ANR grant 07 JCJC 0129 EPICE and ERC Starting Grant 243054 EVOLEPID. The stochastic simulations were initially run on the ISEM cluster, then on the Zoology cluster at UBC. This is publication ISEM 2013-011 of the Institut des Sciences de l'Evolution.

### References

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

- 2001. Modelling the adaptive dynamics of traits involved in inter- and intraspecific interactions: an assessment of three methods. Ecol. Lett. 4: 166–175.Direct Link:
- 1993. On the relationship between quantitative genetic and ESS models. Evolution 47: 982–985. , &
- 1999. Clines in polygenic traits. Genet. Res. 74: 223–236.
- 2001. Integrating Genetics and Ecology in a Spatial Context, Chapter Adaptation at the Edge of a Species' Range. Blackwells, London.
- 2012. The effects of migration and drift on local adaptation to a heterogeneous environment. J. Evol. Biol. 25: 1351–1363. , &
- 2005. A reassessment of genetic limits to evolutionary change. Ecology 86: 1371–1384. &
- 1995. Visualizing and quantifying natural selection. Trends. Ecol. Evol. 10: 313–318. , , &
- 2007. Theory of lethal mutagenesis for viruses. J. Virol. 81: 2930–2939. , &
- 1991. Moments, cumulants, and polygenic dynamics. J. Math. Biol. 30: 199–213.
- 2000. The Mathematical Theory of Selection, Recombination, and Mutation. John Wiley & Sons Ltd, Chichester, UK.
- 1994. On the distribution of the mean and variance of a quantitative trait under mutation-selection-drift balance. Genetics 138: 901–912. &
- 1989. How much heritable variation can be maintained in finite populations by mutation-selection balance? Evolution 43: 1748–1766. , , &
- 1977. The development of insecticide resistance in the presence of migration. J. Theor. Biol. 64: 177–197.
- 2000. Competition and the effect of spatial resource heterogeneity on evolutionary diversification. Am. Nat. 155: 790–803.
- 2010. Evolution of specialization in a spatially continuous environment. J. Evol. Biol. 23: 1090–1099. &
- 2011. Evolution in heterogeneous environments: between soft and hard selection. Am. Nat. 177: E84–E97. &
- 2011. Adaptive Diversification and Speciation as Pattern Formation in Partial Differential Equation Models, chapter 9. Princeton University Press, Princeton, New Jersey.
- 1983. Evolutionary and continuous stability. J. Theor. Biol. 103: 99–111.
- 2004. Lethal mutagens: broad-spectrum antivirals with limited potential for development of resistance? Drug. Resist. Updat. 7: 19–24. , &
- 2009. Geographic range limits of species. Proc. R. Soc. Biol. Sci. 276: 1391–1393.
- 1998. Evolutionarily singular strategies and the adaptive growth and branching of the evolutionary tree. Evol. Ecol. 12: 35–57. , , &
- 1977. Exact stochastic simulation of coupled chemical reactions. J. Phys. Chem. 81: 2340–2361.
- 1999. The effects of density dependence and immigration on local adaptation and niche evolution in a black-hole sink environment. Theor. Popul. Biol. 55: 283–296. , &
- 1956. The relation between density regulation and natural selection. Proc. R. Soc. Lond. B. Biol. Sci. 145: 306–308.
- 2001. Population mixing and the adaptive divergence of quantitative traits in discrete populations: a theoretical framework for empirical tests. Evolution 55: 459–466. , &
- 1990. Adaptive dynamics and evolutionary stability. Appl. Math. Lett. 3: 75–79. &
- 2003. Low potential for climatic stress adaptation in a rainforest drosophila species. Science 301: 100–102. , , &
- 2011. Theoretical perspectives on the statics and dynamics of species' borders in patchy environments. Am. Nat. 178: S6–S25. &
- 2012. Comparison of non-Gaussian quantitative genetic models for migration and stabilizing selection. Evolution 66: 3444–3461. &
- 2004. Conceptual issues in local adaptation. Ecol. Lett. 7: 1225–1241. &
- 1964. Diffusion models in population genetics. J. Appl. Prob. 1: 177–232.
- 1965. A stochastic model concerning the maintenance of genetic variability in quantitative characters. Proc. Natl Acad. Sci. USA 54: 731–736.
- 1997. Evolution of a species' range. Am. Nat. 150: 1–23. &
- 2001. Long-term adaptive diversity in Levene-type models. Evol. Ecol. Res. 3: 721–727.
- 2011. Local biotic environment shapes the spatial scale of bacteriophage adaptation to bacteria. Am. Nat. 177: 440–451. , , &
- 1975. The maintenance of genetic variability by mutation in a polygenic character with linked loci. Genet. Res. 26: 221–235.
- 2002. Gene flow and the limits to natural selection. Trend. Ecol. Evol. 17: 183–189.
- 1998. Resistance management: the stable zone strategy. Proc. R Soc. Lond. B 265: 1985–1990. &
- 1962. Theory of fitness in a heterogeneous environment.1. fitness set and adaptive function. Am. Nat. 96: 361–373.
- 2008. Migration load in plants: role of pollen and seed dispersal in heterogeneous landscapes. J. Evol. Biol. 21: 294–309. , , , &
- 1998. Genetics and Analysis of Quantitative Traits. Sinauer Assocs. Inc., Sunderland, MA. &
- 1989. Evolution of resistance with sequential application of insecticides in time and space. Proc. R Soc. Lond. B 238: 245–276.
- 2010. Lethal mutagenesis and evolutionary epidemiology. Philos. Trans. R. Soc. B Biol. Sci. 365: 1953–1963. &
- 1997. Adaptive dynamics in a 2-patch environment: a toy model for allopatric and parapatric speciation. J. Biol. Syst. 5: 265–284. , &
- 2005. Link between population dynamics and dynamics of Darwinian evolution. Phys. Rev. Lett. 95: 078105. , , &
- 1975. Conditions for the existence of clines. Genetics 80: 595–615.
- 2008. Moving beyond common-garden and transplant designs: insight into the causes of local adaptation in species interactions. Am. Nat. 171: 658–668. &
- 2001. Antibiotic and insecticide resistance modeling–is it time to start talking? Trends Microbiol 9: 286–292.
- 2009. Species' range: adaptation in space and time. Am. Nat. 174: E186–E204. , &
- 1970. Selection and covariance. Nature 227: 520–521.
- R Development Core Team 2010. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0.
- 2009. Live where you thrive: joint evolution of habitat choice and local adaptation facilitates specialization and promotes diversity. Am. Nat.174: E141–E169. PMID: 19737113. , &
- 2004. Implications of habitat choice for protected polymorphisms. Evol. Ecol. Res. 6: 125–145. , &
- 2004. Evolutionary Theory: Mathematical and Conceptual Foundations, chapter 7: Quantitative Genetics. Sinauer Associates, Sunderland, Massachusetts.
- 2007. How does it feel to be like a rolling stone? Ten questions about dispersal evolution. Annu. Rev. Ecol. Evol. Syst. 38: 231–253.
- 2001. When sources become sinks: migrational meltdown in heterogeneous habitats. Evolution 55: 1520–1531.Direct Link: &
- 2004. Natural selection and the organ-specific differentiation of HIV-1 V3 hypervariable region. Evolution 58: 1185–1194.Direct Link: , , , and
- 2011. Oligomorphic dynamics for analyzing the quantitative genetics of adaptive speciation. J. Math. Biol. 63: 601–635. &
- 2006. Can landscape ecology untangle the complexity of antibiotic resistance? Nat. Rev. Micro 4: 943–952. , &
- 2010. Solving differential equations in R: package deSolve. J. Statist. Softw. 33: 1–25. , &
- 2009. Lethal mutagenesis in a structured environment. J. Theor. Biol. 261: 67–73. &
- 2000. Quantitative genetic models for the balance between migration and stabilizing selection. Genet. Res. 76: 285–293.
- 1984. Heritable genetic variation via mutation-selection balance: Lerch's zeta meets the abdominal bristle. Theor. Pop. Biol. 25: 138–193.
- 1985. Genotype-environment interaction and the evolution of phenotypic plasticity. Evolution 39: 505–522. &
- 2009. Predicting adaptation under migration load: the role of genetic skew. Evolution 63: 2926–2938. &
- 2011. The genetic architecture of adaptation under migration–selection balance. Evolution 65: 1897–1911. &

### Appendix A: General model, with demography

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

#### A.1. Continuum of alleles model

In this section, we first derive a more complete model, and then show how to reduce the number of parameters, by rescaling the different variables, which will yield model (2a). All parameters and variables before scaling are written in capital letters.

##### A.1.1. The environment

We consider an environment containing two habitat types, present in equal frequencies. Both habitats can host the same maximal density of individuals – they have the same carrying capacities, and they are linked by dispersal, which occurs at rate *M*. To each habitat corresponds an optimum trait value , and selection is locally stabilizing towards this optimum.

##### A.1.2. Local dynamics

We derive our model under the assumption of clonal reproduction. We consider continuously growing populations with overlapping generations. The fitness of an individual depends on its adaptation to local conditions, governed by a quantitative trait *Z*, and on the intensity of competition with the other inhabitants of its patch. This competition is frequency-independent: it only depends on the local density, but not on the phenotype of the individuals that are present – hence, locally adapted populations grow logistically (with an exponential growth parameter *R* and a carrying capacity *K*). We assume that maladapted individuals suffer from an increased mortality, scaled by a parameter *G*; this additional mortality is greater when the individual's phenotype *Z* is away from the local optimum . We first use general functions to describe this additional mortality due to maladaptation, and then illustrate our results with specific functions.

The fitness functions take values between 0 and 1 for the phenotypic values of interest, and are twice differentiable. We further assume that they are symmetric, and are such that

- (A.1)

and we can define a trade-off function, *U*, linking fitnesses in the two habitats:

- (A.2)

Due to symmetry, we have

- (A.3)

where is the phenotype intermediate between the two optima:

- (A.4)

We ignore environmental effects in this study, by assuming that all individuals with the same genotype express the same phenotype.

Finally, mutations occur at rate and add an increment *Y* to the allelic effect *Z*; the distribution of these mutational effects is M(*Y*), and is assumed to be symmetric: there is no preferential direction of the mutations.

Let be the density of individuals with trait *Z* in habitat *j*, at time *T*; with our assumptions, its dynamics read as follows:

- (A.5)

##### A.1.3. Rescaling

With appropriate changes of variables, it is possible to reduce the number of parameters in eqn (A.5). We first scale time relative to the maximum growth rate, and the local densities relative to the carrying capacity:

- (A.6)

and we define the compound parameters

- (A.7)

We can then rewrite eqn (A.5):

- (A.8)

The value of the trait *Z* depends on the chosen units; we can measure the traits relative to the local optima

- (A.9)

and define the new scaled optima

- (A.10)

and the new fitness functions, so that for all traits *z*,

– which, with quadratic fitness function, gives

- (A.11)

we can then rewrite eqn (A.5):

- (A.12)

which is eqn (2a) in the main text. We still have the same symmetries for the fitness functions:

- (A.13)

and we also can define a trade-off function, *u*, linking fitnesses in the two habitats:

- (A.14)

such that

- (A.15)

#### A.2. Summarizing the distribution

Equation (A.12) shows how the densities of each type *z* change under the action of selection and dispersal, but cannot be used as such to obtain analytical predictions. As classically done in quantitative genetics studies, we will derive summary variables: the total density in each habitat, , the mean trait value in each habitat, , and the genetic variance in each habitat (which is equivalent to the phenotypic variance as there is no environmental variation in our model).

##### A.2.1. Definitions

The total density in habitat *j* is

- (A.16)

The proportion of individuals with trait *z* in habitat *j* is

- (A.17)

The mean trait in habitat *j* is

- (A.18)

The genetic variance in habitat *j* is

- (A.19)

We will also use the following relations between central moments, moments and cumulants:

- (A.20a)

- (A.20b)

- (A.20c)

where and are the third central moment and the fourth cumulant, respectively, of the distribution in habitat *j*.

##### A.2.2. One additional assumption

We will assume that the local distributions are such that traits are close to the local mean trait values , so that we can Taylor-expand the functions :

- (A.21)

Using the above expansion (A.21), we can rewrite the local mean fitness as functions of the fitnesses of the mean traits:

- (A.22)

##### A.2.3. Total density in habitat *j*

With definition (A.16), the dynamics of the total density in habitat *j* is the following:

- (A.23)

##### A.2.4. Mean trait in habitat *j*

We first have to write the dynamics of the proportion of individuals with phenotype *z* in habitat *j*, :

Its dynamics read

- (A.25)

- (A.26)

which is exact (and the first term, corresponding to selection, is classic); now using the Taylor expansion from eqn (A.21), we obtain the following:

- (A.27)

and using a diffusion approximation for mutations (Kimura, 1964; Rice, 2004), we obtain the following:

- (A.28)

Now, using (A.27) we can focus on the dynamics of :

(the first term, corresponding to local selection, is the Price equation Price, 1970); now using the Taylor expansion from eqn (A.21), we have, after reorganizing terms, and using relations between moments,

- (A.29)

Note that mutations do not appear in this expression, because they do not change the mean trait, as they are isotropic.

##### A.2.5. Genetic variance in habitat *j*

Let us now derive the dynamics of the genetic variance :

- (A.30)

After rearrangement we obtain the following equation:

- (A.31)

where is the mutational variance (the increase per time unit in trait variance due to mutation), that is the probability of mutation times the variance of the distribution of mutational effects *μ*(*z*).

We derived eqns (A.23)–(A.31) assuming that the individuals in the population reproduce clonally, and that the adaptation trait was controlled by a single polyallelic locus. We obtain the same equations as other authors who assumed sexual reproduction: compare our eqns (A.29) eqns (A.29) and (A.31) to eqns (2a) and (3) in Barton (1999), or our eqns (A.29) and (A.31) to system (2) in Ronce & Krikpatrick (2001). Note that if the phenotype is determined by multiple loci instead of only one, we have to take into account the effective number of loci, *ν* (see Barton, 1999), in the dynamics of the variance, and to assume linkage equilibrium (so that all loci are independent) – but the equations for the total density and for the mean trait remain the same (Barton, 1999).

### Appendix B: Adaptive dynamics analysis of the demographic model

- Top of page
- Abstract
- Introduction
- Model
- Results
- Discussion
- Conclusion
- Acknowledgments
- References
- Appendix A: General model, with demography
- Appendix B: Adaptive dynamics analysis of the demographic model

This section summarizes the results found by doing an adaptive dynamics analysis. The calculations are done with Mathematica, and the file is available on Dryad doi: 10.5061/dryad.cv507.

##### B.1 Invasion fitness and selection gradient

We consider a resident population with trait at equilibrium; its densities and are such that

The dynamics of a rare mutant with trait read:

The selection gradient reads as follows:

- (B.1)

with .

We can see that this selection gradient vanishes at the intermediate strategy , because and .

###### B.1.1. Convergence stability of the intermediate strategy

The intermediate strategy can be reached by gradual evolution, when

- (B.2)

###### B.1.2. Invadability of the intermediate strategy

The intermediate strategy cannot be invaded by any other strategy, when

- (B.3)

###### B.1.3. Other singular strategies

It is not possible, in the general case, to find analytical solutions of ∂*λ*(*z*) = 0 (eqn (B.1)). However, with quadratic fitness functions, when the migration rate *m* is low enough, and the strength of selection *g* high enough, the local densities of the resident population can be approximated as and , with close to 0. The selection gradient becomes

- (B.4)

Neglecting dispersal terms *m* of order 3 and higher, and under the condition *g* > 1, we find an approximate solution of ∂*λ*(*z*) = 0, which reads as follows:

This solution corresponds to the adaptation to habitat 1, and there is a miror solution for adaptation to habitat 2 only.

##### B.2 Characterization of the polymorphic equilibrium

Using the symmetries described in the main text, the selection gradient reads

- (B.5)

The strategies and are singular if

- (B.6)