## Abstract

We study the establishment probabilities of locally adapted mutations using a multi-type branching process framework. We find a surprisingly simple and intuitive analytical approximation for the establishment probabilities in a symmetric two-deme model under the assumption of weak (positive) selection. This is the first analytical closed-form approximation for arbitrary migration rate to appear in the literature. We find that the establishment probability lies between the weak and the strong migration limits if we condition the origin of the mutation to the deme where it is advantageous. This is not the case when we condition the mutation to first occur in a deme where it is disadvantageous. In this case we find that an intermediate migration rate maximizes the probability of establishment. We extend our results to the cases of multiple demes, two demes with asymmetric rates of gene flow, and asymmetric carrying capacities. The latter case allows us to illustrate how density regulation can affect establishment probabilities. Finally, we use our results to investigate the role of gene flow on the rate of local adaptation and identify cases in which intermediate amounts of gene flow facilitate the rate of local adaptation as compared to two populations without gene flow.

STUDYING the maintenance of genetic variation under migration–selection balance has a long tradition in population genetics. While most theoretical research on the establishment and maintenance of local adaptation and population divergence has focused on deterministic models (reviewed in Felsenstein 1976; Karlin 1982; Lenormand 2002; Nagylaki and Lou 2008; see also Nagylaki and Lou 2007; Star *et al.* 2007; Bürger 2009a,b; Nagylaki 2009), considerably less work has been done on the probability of establishment of locally adapted mutations. Even in infinitely large populations, new beneficial mutations experience genetic drift while they are rare, and hence can get lost from the population despite their selective advantage. The probability that a new beneficial mutation evades extinction due to stochastic fluctuations has been called the invasion probability, establishment probability, or fixation probability, depending on the context. In the simplest case of a single panmictic population of infinite size, Haldane’s classical result states that the establishment probability of a mutation with time- and frequency-independent selection coefficient *s* is ∼ (Haldane 1927). Since then, Haldane’s result has been generalized and extended to several scenarios (see Patwa and Wahl 2008 for a review about fixation probabilities of beneficial mutations).

Traditionally, there are two main approaches to study establishment probabilities: branching processes and diffusion approximations. Branching processes often allow for the derivation of simple and intuitive results (Harris 2002), but are restricted to beneficial mutations in (infinitely large) populations. The diffusion approximation, first used by Kimura (1962) in this context, is a powerful tool that allows the derivation of results for both beneficial or deleterious mutations of arbitrary initial frequency in finite populations. The downside is that the derivation of closed-form solutions is often harder as compared to branching processes, and the underlying assumptions are not always clear (*e.g.*, the diffusion approximation requires that the mean and variance of the intergenerational change in allele frequencies are small, which is sometimes difficult to interpret in biological terms). Applications of establishment or fixation probabilities include the quantification of the rate of adaptation of populations (Orr and Otto 1994; Wilke 2004; Desai and Fisher 2007; Gonçalves *et al.* 2007), extinction risk due to the accumulation of deleterious mutations (Lynch and Gabriel 1990), or the rate of emergence of drug resistance or evolutionary rescue (Carlson *et al.* 2014).

In the context of spatially structured populations, Barton (1987) extended the diffusion approximation to account for spatial variation in fitness along a one-dimensional habitat and derived analytical solutions for some special cases. Kirkpatrick and Peischl (2013) used a similar approach to study the contribution of new mutations to evolutionary rescue in environments that change in space and time. McPeek and Holt (1992) studied the conditions in which a genotype can invade populations fixed for another genotype in environments varying spatially or temporally in a two-patch model. Tachida and Iizuka (1991), Gavrilets and Gibson (2002), and Whitlock and Gomulkiewicz (2005) have explored the probability of a single mutant allele fixing in both patches of a two-patch model using diffusion approximations. Gavrilets and Gibson (2002) and Whitlock and Gomulkiewicz (2005) present the fixation probability as the solution of a system of two quadratic equations that can be solved numerically, but so far no closed-form solution for the fixation probability has been derived. Building on the results by Gavrilets and Gibson (2002), Wei *et al.* (2015) derived an explicit formula describing the effect of population size, migration rate, and selection intensity on the rate of adaptive substitutions and identified conditions under which the rate of substitution increases (or decreases) with increasing population size. Yeaman and Otto (2011) have used a heuristic “splicing” approach in which they combine the leading eigenvalues of the transition matrix of a deterministic two-deme model with Kimura’s classical fixation probability formula. Their approach allowed them to study the probability of a locally beneficial mutation becoming permanently established as well as the critical threshold migration rate above which the maintenance of polymorphism is unlikely in finite populations. They confirmed the accuracy of the splicing approach by comparison with simulations as well as numerical solutions of a multi-type branching process approximation for establishment probabilities. Vuilleumier *et al.* (2008) studied the fixation of locally beneficial alleles through simulations of a metapopulation in a spatially heterogeneous environment. Their findings suggest that a mutation experiencing strong positive selection in parts of an otherwise neutral environment has a higher chance of reaching fixation than an unconditionally beneficial mutation with the same average selection coefficient. This illustrates that heterogeneity in selection coefficients across space can have a large impact on the probability of fixation. Recently, Aeschbacher and Bürger (2014) combined multi-type branching processes and diffusion approximations to analytically study the effect of linkage on the establishment of locally beneficial mutations in a continent–island model (see also Yeaman *et al.* 2016).

Despite these advances, several open questions remain. Perhaps most importantly, no closed-form approximation for the establishment probability in a spatially structured population is available, even for the simplest cases of two demes with heterogeneous selection (apart from the heuristic formula obtained in Yeaman and Otto 2011). Furthermore, Vuilleumier *et al.* (2010) showed that the details used to model migration can have a large influence on the outcome of the effects of spatial structure on establishing locally adapted mutations. The same study also identified cases where fixation probabilities lie outside of the range set by low- and high-migration limits, in contrast to what is observed in simpler analytical models (Tachida and Iizuka 1991; Gavrilets and Gibson 2002; Whitlock and Gomulkiewicz 2005).

Deriving a closed expression for the establishment probability in patchy environments is necessary to better understand the role of habitat fragmentation and dispersal on adaptation in spatially heterogeneous environments, for instance in models of evolutionary rescue or evolution of drug resistance (Gomulkiewicz and Holt 1995; Uecker *et al.* 2014), studying the spatial origin of mutations that cause range expansion (Behrman and Kirkpatrick 2011), or studying the role of gene flow on the establishment of local adaptation (Seehausen 2004).

Here we study the establishment of locally adapted mutations in a discrete migration–selection model using the framework of multi-type branching processes. We present a surprisingly simple and intuitive analytical approximation for the probability that new mutations escape genetic drift and become permanently established. Our results are valid in the limit of weak positive selection in one of the selective habitats, but allow for arbitrary migration rates or arbitrarily strong negative selection in the other habitat. We recover previous results for special cases, such as weak or strong migration. Our results allow us to quantify the effects of migration on the fate of mutations—depending on whether mutations first occur in individuals living in the deme where the mutation is favored or in the deme where the mutation is selected against. We apply our results to biologically interesting scenarios and derive simple results for the effect of asymmetric carrying capacities and density regulation, as well as asymmetric migration, the rate of local adaptation, and the contribution of different demes to local adaptation. In particular, we derive conditions under which gene flow between demes facilitates the rate of establishment of locally adapted alleles as compared to the case without gene flow. The latter result is in contrast with common wisdom that gene flow tends to hinder local adaptation, and could have interesting implications for the role of hybridization during adaptive radiations.

## Model and Results

We start with a symmetric two-deme model to present our model and derive our main result. We then generalize our results to asymmetric migration, multiple demes, and account for the effects of density regulation and unequal carrying capacities.

### Two-deme model

We consider an infinitely large population with discrete and nonoverlapping generations. The (biologically unrealistic) assumption of an infinitely large population allows us to use branching processes to describe the fate of initially rare mutations, which has been shown to yield accurate results in large but finite populations [*e.g.*, in single panmictic populations the approximation is accurate if where *N* is the population size and *s* is the selection coefficient of a beneficial mutation (Patwa and Wahl 2008)]. The population is structured into two demes that exchange migrants. At the focal locus, a resident allele is fixed in both demes and a new mutation occurs in a single individual. Each copy of the mutant allele in the population produces a random number of descendant copies in the following generation (“offspring”) that is independent of the number produced by other mutant copies. The mean number of offspring of a mutant copy is given by in deme *i*.

In the following, we will focus on the case where selection is acting in opposing directions in the two demes, *i.e.*, but note that our derivations do not require this assumption. For the remainder, we set without loss of generality. In a haploid population, is the relative fitness advantage (when ) or disadvantage (when ) of a mutant in deme *i*; while in a randomly mating diploid population, it is the relative fitness (dis)advantage of a heterozygote. Because the ultimate fate of the mutation is decided while mutant homozygotes are still rare, we can ignore their fitness. After reproduction, each mutant copy migrates to the other deme with probability and remains in its current deme with probability Thus, corresponds to two demes without gene flow and is a special case of the Levene model (Levene 1953), where allele frequencies are equal in the two patches due to complete mixing of the gene pool every generation. The case can hence be considered as a single panmictic population with effectively frequency-dependent selection over the whole environment (see also Ayala and Campbell 1974). There are two possible outcomes to the above described process: the mutant allele dies out or it becomes established permanently. Note that establishment does not necessarily imply fixation in both demes in our model: alleles may become permanently established in a balanced polymorphism if migration is sufficiently weak relative to the strength of negative selection against locally disadvantageous alleles. The exact conditions for a balanced polymorphism have been studied extensively in deterministic models (see, *e.g.*, Bulmer 1972; Gavrilets and Gibson 2002; Nagylaki 2009). We note that a balanced polymorphism may get lost due to drift in finite populations (Yeaman and Otto 2011) and such a temporary polymorphism is considered as establishment here. We denote by the probability of establishment of a mutation that initially appears in an individual in deme *i*.

We model the evolution of the number of copies of a mutant allele that first appears in a single individual using a branching process with two types of individuals. The type *i* () corresponds to the deme in which an individual carrying a copy of the mutant allele resides. We assume that the number of offspring of each copy of the mutant allele is independent of the number of offspring of the rest of the population. The number of mutant copies present in generation *n* can then be described by a vector where denotes the number of mutant copies in deme *i* at generation *n* (see Supplemental Material, Equation S4). The theory of multi-type branching processes (*e.g.*, Harris 2002) tells us that the vector of extinction probabilities is given by(1)where f is the vector of probability-generating functions of the offspring distribution and denotes the *n*-fold application of It can be shown that the establishment probabilities are given by the smallest positive solution of (see Equations S1–S6 for details).

Under a Wright–Fisher model of selection and migration, offspring numbers are determined via binomial sampling from the parental generation, which can be approximated by Poisson-distributed offspring in large populations. The mean number of offspring for each type are summarized in Table 1 (see Equations S12–S17 for the derivation of the expected number of offspring per individual). For example, an individual in deme 1 (type 1) will migrate to deme 2 (and hence become a type-2 individual) with probability and then leaves an average number of offspring. Alternatively, it remains in deme 1 with probability (and hence remains a type-1 individual) and then leave offspring on average. Thus, the expected number of individuals of type 1 and 2, produced by a parent of type 1 will be and respectively (see Table 1). We assumed here that juveniles migrate before reproduction (and selection) but note that the order of reproduction and migration in the life cycle does not affect our results.

Since we approximate the binomial sampling as Poisson-distributed offspring, the establishment probabilities are then given by the smallest positive solution of(2)(3)Equations 2 and 3 are transcendental equations for which one can in general not obtain exact solutions and we resort to approximation. We first introduce new parameters that describe the strength of the evolutionary forces relative to the strength of selection for the mutant allele in deme 1: and Assuming and taking the limit of weak selection, *i.e.*, ignoring second- and higher-order terms in in the derivation of Equations S25 we show that the establishment probabilities can be written as(4)(5)where(6)and(7)are scaled measures of the heterogeneity in selection and the migration rate, respectively. We note that Equations 4 and 5 show that the probability of establishment can be written as a weighted sum of the strength of selection in the two demes. Figure 1 shows establishment probabilities for various combinations of selection intensities.

The weak selection approximation requires that the establishment probability is small but positive (that is, the branching process is slightly supercritical, see Haccou *et al.* 2005). Analysis of the leading eigenvalue of the mean reproduction matrix (Equations S20 and S21) reveals that the branching process is slightly supercritical if positive selection is weak () and either negative selection () or migration (*m*), but not necessarily both, are sufficiently weak. This implies that our approximation is valid even if the mutation is, on average, (strongly) deleterious (*i.e.*, ) as long as migration is sufficiently weak. Furthermore, if selection is sufficiently weak in both demes (), our approximation holds for arbitrarily strong migration. This is sensible because if both migration rate and the strength of negative selection () are large, mutations will go extinct almost surely and the establishment probability will be zero (*i.e.*, the branching process is subcritical). Figure 2 shows the comparison between the analytical approximation and exact solutions of Equations 2 and 3, obtained by numerical iteration of the probability-generating function. We find that the approximation shown in (4) and (5) is very accurate with respect to the solutions of Equations 2 and 3. The establishment probabilities are positive if or if Note that this condition is equivalent to the invasion conditions derived in deterministic models (Bulmer 1972). Because *σ* is monotonically decreasing in *m* and *μ* is monotonically increasing in *m*, it follows immediately that is monotonically decreasing in *m* (see Figure 1). For the dependence in *m* is more complicated. If it is clear that because Because if or is always maximized for some positive migration rate if (Figure 1). Straightforward calculations yield that either the maximum of is attained at or is monotonically increasing in *m*.

### Comparison with previous results

Equations 2 and 3 recover several previous results for establishment probabilities. In the absence of migration, we have that and and we get in agreement with Haldane’s classical result for a single panmictic population (Haldane 1927). In the limit of strong migration, we get which means that the establishment probability is determined by the average selection coefficient across demes (Nagylaki 1980). In the limit of weak migration, we get and Gavrilets and Gibson (2002) used a diffusion approximation to compute fixation probabilities in a biallelic one-locus two-deme model similar to ours. The key difference between our and their approach is that we calculate establishment rather than fixation probabilities, which makes it hard to directly compare our results. Furthermore, no closed-form solution is available for their model. However, in the case where establishment implies fixation, our results are in very good agreement (see Figure S1). Yeaman and Otto (2011) extended classical deterministic two-deme models for diploid individuals (such as Bulmer 1972) to derive a heuristic approximation for the establishment probability of new mutations. They calculate the rate of increase in frequency of a rare locally beneficial mutation and use this initial growth rate as a the selection coefficient in Kimura’s classical equation for fixation probabilities in finite populations (Kimura 1962) and verified their approach via analytical and numerical investigation of a multi-type branching process model similar to the one studied here. Numerical comparison reveals a good fit between their results and our Equations 4 and 5 (see Figure S2).

### Asymmetric migration

We next assume that gene flow is asymmetric and let denote the rate of migration from deme *i* to deme *j*. This includes symmetric migration as a special case if we chose for In Equations S25, we show that the establishment probabilities are then given by(8)(9)where (with ), In these last definitions, we used An always exists, such that is positive if Furthermore, is monotonically decreasing in *m* (see Equations S27–S29). The migration rate for which attains its maximum can be easily calculated (see Equation S26). We can see from Equations 8–9 that selection for locally adapted mutations is amplified as compared to symmetric migration if deme 1 acts as a sink population ( and ), and the chances of establishment generally increase with respect to the symmetric migration model (Figure 3). Conversely, if deme 1 acts as a source ( and ), selection for locally adapted mutations will be hampered as compared to symmetric migration.

### Island model with multiple demes

We can extend our results to an island model with multiple demes and two selective habitats. Let and denote the selection coefficients of the mutation in habitat 1 and 2, respectively. We assume that migration occurs at rate *m* between all demes [*i.e.*, the island model (Wright 1931)]. This model can readily be reduced to a two-deme model with asymmetric migration rates (Whitlock and Gomulkiewicz 2005). We assume that all demes are of the same size and that selective habitats 1 and 2 contain and demes, respectively. The migration rates between the two selective habitats are then given by and and the establishment probabilities are given by Equations 8–9 (we call the probabilities of establishment accordingly). If there are more demes where the mutation is beneficial (habitat 1) than where the mutation is detrimental (habitat 2), we have more individuals migrating from habitat 2 to habitat 1 and hence As a consequence, the contribution of selection in deme 1 is amplified and establishment probabilities are generally larger as compared to the case with two equally large habitats (see Equations 8 and 9, see also Figure 3).

### Asymmetric carrying capacities and density regulation

So far we ignored the effects of density regulation because we assumed infinitely large populations. We next modify the offspring distribution in our branching process to account for the effects of deme-independent density regulation (soft selection, *sensu* Wallace 1975) in a model with symmetric migration. Let and denote the carrying capacities of deme 1 and 2, respectively. The larger deme then acts as a source, *i.e.*, it sends out more migrants than it receives. Here we assume that density regulation acts after migration and brings each deme back to its carrying capacity instantaneously. Initially both demes are at carrying capacity. The number of individuals in deme *i* after migration but before density regulation are denoted and are given by(10)Density regulation will then change the number of individuals in each deme by a factor(11)We can integrate this effect of density regulation in our branching process framework by modifying the absolute fitness of individuals in deme *i* to (see Equation S34).

The establishment probabilities for this case are explicitly calculated in Equations S35.

If deme 1 receives more migrants than it sends out and density regulation will cull the population size back to carrying capacity. Thus, in a certain sense deme 1 is behaving like a shrinking population, which should reduce the establishment probability of mutations that are beneficial in that deme (Otto and Whitlock 1997). Our results confirm this intuition (Figure 4) and show that the establishment probability increases if the deme where the allele is beneficial has a smaller carrying capacity. Likewise, if deme 1 is growing after migration, which reduces drift and increases the establishment probability of mutations that are adapted to that deme.

### Comparison with simulations

In single, panmictic populations, the branching process assumption requires that the population is sufficiently large relative to the strength of (positive) selection (Patwa and Wahl 2008). While the applicability of multi-type branching processes to study establishment probabilities has been established in previous studies (Haccou *et al.* 2005), the exact conditions under which the branching process approximation is expected to be accurate in structured populations of finite size remain unclear and are difficult to derive (especially in the absence of solutions for models with finite population size for comparison). To assess the quality of our approximation in finite populations, we therefore resort to comparison with simulations for small populations ( or 400 individuals) and moderately strong positive selection () such that Results from simulations show a good fit with analytical results (see Figure 5) for the case of symmetric demes, asymmetric migration, or asymmetric carrying capacities. Simulations were performed assuming logistic density regulation (Beverton and Holt 1957) and by inserting one mutant in either deme 1 or 2 and letting the system evolve for 20,000 generations. A total of 50,000 replications are done for each simulated scenario. Our approximation tends to overestimate and underestimate This is expected, since the same behavior can be seen when we compare the approximation to the exact solution (see Figure 2).

### Global rate of establishment of locally adapted alleles

It is commonly assumed that gene flow hampers or even prevents local adaptation (Lenormand 2002). Here we use our results to quantify the effect of migration on the overall establishment probability, defined as(12)where *c* and denote the relative sizes of deme 1 and deme 2, respectively.

We next take the derivative of *P* with respect to *m* at If this derivative is positive, the rate of adaptation increases when we introduce some gene flow as compared to the case without gene flow between demes. In other words, we derived the condition under which the unconditional establishment probability of locally adapted mutations increases when we introduce small amounts of migration. We find that this is the case in all our models if(13)where and are the number of individuals in deme 1 and 2, respectively. Hence, in the symmetric model where the probability of establishment is given by (4) and (5), we find that gene flow increases the chances of establishment when Therefore, if the selective advantage in one deme is larger than the selective disadvantage in the other deme, some gene flow can facilitate the establishment of local adaptation as compared to completely isolated demes. This can also be seen directly via the weak migration approximation and derived above. If we consider the model with asymmetric migration, the condition becomes(14)Using the definitions of and derived for an multi-deme island model, Equations 13 and 14 are identical.

### Data availability

The authors state that all data necessary for confirming the conclusions presented in the manuscript are represented fully within the manuscript. This theoretical contribution did not involve data. Details about the derivation of our results can be found in Appendix A of the Supplemental Material. More details about performed simulations can be found in Appendix C of the Supplemental Material. Supplemental material available at Figshare: https://doi.org/10.25386/genetics.6281267.

## Discussion

We used multi-type branching processes to study the establishment of locally beneficial mutations in a spatially heterogeneous environment with two selective habitats. Our main result is a simple and analytical closed-form approximation for the probability of establishment of a locally beneficial mutation in a two-deme model with divergent selection and symmetric migration between demes (Equations 4 and 5). By establishment we mean that a mutation permanently establishes in the metapopulation, either by going to fixation or by maintenance as a balanced polymorphism. To our knowledge, this is the first closed-form analytical approximation for an establishment probability in this context that is valid for arbitrary migration rates (but see Yeaman and Otto 2011 for a heuristic approach as well as an implicit solution for a multi-type branching process very similar to the one studied here). The resulting formula is intriguingly simple and intuitive: the probability of establishment is simply a weighted average over selection coefficients in the two demes, where the weights are determined by the relative contributions of migration and spatial variation in selection. We extended our main result to asymmetric migration between two demes, a multi-deme island model with two selective habitats, and studied the impact of variation in carrying capacities and density regulation on the establishment of locally adapted mutations. We show that establishment probabilities can fall outside the range spanned by the weak or strong migration limits, and provide conditions for when this is the case. In particular, we identify conditions under which small amounts of migration can facilitate the build-up of adaptive divergence as compared to two demes without gene flow. Examination of the weak selection approximation provides an intuitive explanation for this phenomenon. On the one hand, migration removes mutations from the deme where they are favored and hence decreases the establishment probability in deme 1 from to On the other hand, gene flow allows mutations occurring in the wrong habitat, which are doomed to extinction in the absence of gene flow, to eventually reach the right habitat and then spread there. Thus, gene flow increases the establishment probability from 0 to for mutations occurring in a deme in which they are maladaptive. Taken together, the net effect of migration will therefore be positive if positive selection in one deme is sufficiently strong relative to negative selection in the other deme. For instance, if the two demes are of equal size, this is the case if

Our derivation assumes an (infinitely) large population, that selection for the beneficial mutation is sufficiently weak, and that either migration or negative selection is not too large. With respect to finite population sizes, we expect that our approximation should hold in finite populations as long as the product of population size and selection coefficient is larger than 1 ( see Figure 5), in analogy to single panmictic populations. However, the exact conditions for when our approximation is accurate will depend on the population sizes in both demes, the strength of positive as well as negative selection, and the amount of gene flow; these conditions are thus difficult to derive and beyond the scope of this study. Worthy of note, our approximation remains valid if the mutation is strongly deleterious (or even lethal) in one of the demes (see Figure S3), and holds for arbitrarily strong migration if negative selection is sufficiently weak. Furthermore, we have modeled a haploid population to avoid the intricacies of dominance. However, our results should remain valid in diploid populations if we use the fitness of the mutant allele in our model as the fitness of heterozygotes in a diploid model. The ultimate fate of a mutation will be determined while it is rare so that we can ignore the fitness of homozygotes.

We have been discussing single mutations in isolation and neglected genetic events that may interfere with the establishment process [*e.g.*, clonal interference (Gerrish and Lenski 1998)]. Our results should therefore hold in sexually reproducing species with strong recombination. Our approximation is less plausible in organisms that reproduce with little or no recombination, such as most microbes, or for mutations in genomic regions with low recombination rates. Competition between simultaneously spreading beneficial mutations (clonal interference) can have severe impacts on each other’s establishment (Gerrish and Lenski 1998; Orr 2000). This effect is difficult to account for (Wilke 2004) and is most important in populations with little or no recombination, because recombination can break associations between mutations that occur in different parts of a genome (Muller 1932; Hill and Robertson 1966). A second effect that we did not account for is the genomic background on which the mutation falls via additive or epistatic interactions between mutations. This can be sidestepped by interpreting the selection coefficient as referring to the focal individual’s fitness rather than to the effect of the mutation. Recently, Aeschbacher and Bürger (2014) and Yeaman *et al.* (2016) have studied the establishment of islands of differentiation in a continent–island model and explicitly modeled two different genetic backgrounds using a multi-type branching process, similar to the approach used here. While it would be very interesting to combine our approach with their analysis, the algebraic challenges of studying a branching process with four different types will make analytical progress challenging.

Previous work based on individual-based simulations has shown that variation in densities across demes can affect the establishment of new mutations (Vuilleumier *et al.* 2010). Our results confirm this and show that selection is more efficient in source demes. We show that the combination of density regulation and asymmetric migration mimics the effects of a growing population, which increases the absolute fitness of individuals and leads to more efficient positive selection (Otto and Whitlock 1997).

The solution that we presented in this article also assumes that migration rates remain fixed in time. We know, however, that spatially varying selection can lead to evolution of dispersal (Ronce 2007). Our model is therefore plausible if migration is mainly determined by geographical features of the environment, or if there is little or no genetic variability for traits related to dispersal. Furthermore, variation in density can introduce nonrandom movement between demes. We have accounted for this in Equations 8 and 9 where we allowed migration rates to be asymmetric. In Equations 8 and 9, the carrying capacity of each type of habitat is not explicitly taken into account. A combination of the result for asymmetric migration rates with the scenario with density regulation (see Equations S35) may be necessary to study extreme cases in which asymmetry of migration is related with asymmetry in carrying capacities. While this should be possible in a multi-type branching process framework, the derivations are complicated and are beyond the scope of this work. An alternative approach would be to model the evolution of dispersal traits deterministically, which would yield a time-dependent multi-type branching process that could be studied with a perturbation approach similar to the one derived in Peischl and Kirkpatrick (2012).

Our predictions could be tested in experimental metapopulations, for instance, using a setup similar to the one in Bell and Gonzalez (2011), where gene flow was mimicked via pipetting in experimental yeast metapopulations. Interestingly, in their experiment, Bell and Gonzalez (2011) found that gene flow can facilitate the chance for evolutionary rescue in a gradually deteriorating, spatially extended population relative to the case of no gene flow, which could be explained by our theoretical predictions (see also Uecker *et al.* 2014). Another promising system to test our predictions experimentally would be the ciliate model organism *Tetrahymena*, where metapopulations can be created as microcosms of connected vials and selection intensities could be controlled with antibiotic concentrations (Altermatt *et al.* 2015). Empirical evidence for our predictions will be somewhat harder to obtain as crucial factors such as the fitness effects of mutations as well as the amount of gene flow are hard to measure.

We have presented here a mathematically rigorous approximation of establishment probabilities in a spatial framework using the theory of multi-type branching processes. It would be very interesting to generalize our approach to more than two different types of individuals. While the theoretical foundation is laid out, finding actual solutions for establishment probabilities in higher-dimensional systems poses algebraic challenges that might be difficult to overcome. Nevertheless, the simple and intuitive form of our solution suggests that this approach can be exploited further and that our results can be generalized and extended to various scenarios that include more than two types of individuals.

## Acknowledgments

We thank Reinhard Bürger for stimulating discussions on the subject. We gratefully acknowledge helpful comments from Lindi Wahl, Sally Otto, as well as three anonymous reviewers.

## Footnotes

Supplemental material available at Figshare: https://doi.org/10.25386/genetics.6281267.

*Communicating editor: L. Wahl*

- Received January 15, 2018.
- Accepted May 9, 2018.

- Copyright © 2018 by the Genetics Society of America