Ecological Genetic Conflict: Genetic Architecture Can Shift the Balance between Local Adaptation and Plasticity

Genetic polymorphism can contribute to local adaptation in heterogeneous habitats, for instance, as a single locus with alleles adapted to different habitats. Phenotypic plasticity can also contribute to trait variation across habitats, through developmental responses to habitat-specific cues. We show that the genetic architecture of genetically polymorphic and plasticity loci may influence the balance between local adaptation and phenotypic plasticity. These effects of genetic architecture are instances of ecological genetic conflict. A reduced effective migration rate for genes tightly linked to a genetic polymorphism provides an explanation for the effects, and they can occur both for a single trait and for a syndrome of coadapted traits. Using individual-based simulations and numerical analysis, we investigate how among-habitat genetic polymorphism and phenotypic plasticity depend on genetic architecture. We also study the evolution of genetic architecture itself, in the form of rates of recombination between genetically polymorphic loci and plasticity loci. Our main result is that for plasticity genes that are unlinked to loci with between-habitat genetic polymorphism, the slope of a reaction norm is steeper in comparison with the slope favored by plasticity genes that are tightly linked to genes for local adaptation.


Introduction
Genetic local adaptation and phenotypic plasticity can both contribute to trait variation in heterogeneous habitats. Our aim here is to investigate how their relative contribution depends on genetic architecture. In particular, we examine the influence on trait variation of the rate of recombination between genetically polymorphic loci, responsible for local adaptation, and plasticity loci influencing the intercept and slope of a reaction norm ( fig. 1). As we explain, this issue is less straightforward than is generally understood, even though it involves phenomena that have a long history of study in evolutionary ecology (e.g., van Tienderen 1991van Tienderen , 1997West-Eberhard 2003;DeWitt and Langerhans 2004;Kawecki and Ebert 2004;Richards et al. 2006;Griffith and Sultan 2012). The reason is that there can be ecological genetic conflict between plasticity genes that are tightly versus loosely linked to a genetically polymorphic locus. Ecological genetic conflict has been studied previously (Leimar et al. 2006;Dall et al. 2015;Leimar et al. 2016), but its importance in local adaptation and plasticity is not widely recognized. To shed light on the issue, we demonstrate the influence of genetic conflict on between-habitat genetic polymorphism and phenotypic plasticity of a trait, in addition to the already well-studied effects of factors like gene flow between habitats, strength of selection, and environmental cue accuracy (Tufto 2000;Sultan and Spencer 2002). As we will show, ecological genetic conflict depends on genetic architecture.
In general, genetic conflict occurs when genetic elements, such as alleles at different loci influencing the same phenotypic trait, differ in their selective circumstances and thus in their evolutionary interests. This possibility has been given much attention Werren and Beukeboom 1998;Burt and Trivers 2006;Gardner and Úbeda 2017), resulting in the insight that genetic conflict can be important for evolutionary change and innovation and can also influence phenomena like sex determination (Werren 2011). Most work has focused on genetic conflict with a basis in the properties of genetic transmission systems. For instance, the different pathways of transmission for nuclear and mitochondrial genes has been put forward as a source of genetic conflict (e.g., Frank and Hurst 1996;Perlman et al. 2015).
It is known that the balance between polymorphism and plasticity is influenced by the level of between-habitat migration (e.g., Tufto 2000;Sultan and Spencer 2002;Leimar et al. 2006), with less migration favoring between-habitat genetic polymorphism. It is also known that the effective migration rate (Bengtsson 1985; Barton and Bengtsson 1986), estimated for a neutral locus linked to a selected genetically polymorphic locus, is lower for tighter linkage to the polymorphism and is also lower for stronger selection maintaining the polymorphism. Putting these observations together sug-gests that the selective circumstances for plasticity loci depend on their linkage to a polymorphic locus, with weaker selection for plasticity when linkage is tight and the effective migration rate is thus low. This difference in how selection operates on plasticity genes, depending on their position in the genome, can be interpreted as an ecological genetic conflict.
In our evolutionary modeling, we examine betweenhabitat variation of one trait as well as of two different traits for which the optimum differs between habitats. The kind of genetic architecture we are concerned with is the degree of linkage between genetically polymorphic loci, the epistatic modifiers of the effects at these loci, and the genes influencing a reaction norm slope. We emphasize the distinction between the case where all loci are tightly linked together and that where modifier and slope loci are unlinked to genetically polymorphic loci ( fig. 1B), but we also investigate intermediate cases-for instance, a polymorphic locus with a tightly linked modifier and an unlinked locus determining the slope of a reaction norm. We also investigate effects of previously well-studied factors, such as the rate of between-habitat migration, the strength of selection, and the accuracy of environmental cues. Finally, we examine the question of the evolution of the rate of recombination between polymorphic loci, modifiers, and plasticity loci. Our aim is to determine whether either tight or loose linkage of plasticity loci to a genetically polymorphic locus is favored by selection.
For the analysis, we use individual-based evolutionary simulations of diploid populations, with several local populations in each habitat, as well as numerical analysis of evolutionary equilibria for a model with a very large population in each habitat. For simplicity, we let the sex of an individual be randomly determined (Perrin 2016). Because of the presence of genetic conflict, a complication we need to deal with is that natural selection need not in general lead to a unique outcome for plasticity loci with different linkage to a polymorphism. The alleles in the polymorphism can also evolve in ways that counteract evolutionary change at plasticity loci. These kinds of "arms races," where the outcomes are influenced by things such as supply of mutations, position in the genome, and limits to gene expression, are common for genetic conflicts Werren 2011). Our main way of dealing with this is to examine situations where there is selectively maintained genetic polymorphism at one or more loci but where we do not focus on the possible evolution of the corresponding alleles. Instead, we examine the evolution of genes that modify the phenotypic effects of the polymorphism, for instance, the intercepts and slopes of a reaction norm ( fig. 1). As an alternative, we also examine a situation where alleles at a polymorphic locus can mutate and evolve but where there are limits to the sizes of the allelic effects.
Our main finding is that for plasticity genes that are unlinked to a genetic polymorphism, the slope of a reaction phenotype environmental cue plastic specialist specialist conflict over intercept conflict over slope A plasticity locus tightly linked to polymorphic locus plasticity locus loosely linked to polymorphic locus B Figure 1: Sketch of reaction norms and genetic architectures. There are two habitats, with blue and red used to indicate reaction norms and alleles adapted to each habitat. A, At one extreme, reaction norms could be flat with intercepts adapted to one or the other habitat (blue vs. red lines), corresponding to a pure genetic polymorphism (habitat specialism); at the other extreme, there could be a single reaction norm (dashed gray line), corresponding to pure phenotypic plasticity (habitat generalism). Intercepts and slopes of reaction norms are determined by plasticity genes, influencing intercepts either by epistatically modifying the effects of a genetically polymorphic locus or by determining the slope of a reaction norm. There is genetic conflict between plasticity genes that are tightly versus loosely linked to a genetic polymorphism. B, Sketch of the placement of genes along a hypothetical chromosome. Shown is a polymorphic locus with two alleles (blue and red) having effects suited to each of the habitats. Two cases are illustrated, one with plasticity genes (green) tightly linked to the polymorphic locus and another with loose linkage.
norm will be steeper in comparison with the slope favored by plasticity genes that are tightly linked to genes for local adaptation. This holds in particular for intermediate rates of between-habitat migration. Furthermore, we do not find selection favoring either tight or loose linkage of plasticity genes to a genetic polymorphism, suggesting that this genetic architecture is set by other influences on genome organization. We discuss our results in relation to empirical work on the genomics of ecotypic variation and on the relative importance of local adaptation and plasticity for trait variation.

Methods
We first present our two-habitat metapopulation model for a single trait u, then extend it to two traits u 1 and u 2 , followed by an explanation of our individual-based simulations. We have also performed a numerical analysis of a model with a very large population in each habitat, which is described in the appendix (available online).

Single Trait
The population is divided into N p patches, each containing a local population with on average K diploid individuals with nonoverlapping generations and with survival selection operating in each patch. An individual's sex is randomly determined, with equal chances for female and male, and each offspring is formed by randomly selecting a mother and a father from the local population. There is a genotype-cuephenotype mapping, determining an individual's phenotype u as a weighted sum of a genetic effect z and an environmental cue x juv observed by juveniles, such that where z and the weights a and b are each determined by a diploid locus. This means that there is epistasis between the locus for the genetic effect z and the locus coding for a. A patch is in either of two environmental states, corresponding to two types of habitat, which could, for instance, be low and high resource availability, risk of predation, or salinity. The two habitats are denoted by i p 1, 2, with juvenile to adult survival for phenotype u in habitat i given by where s 0 is a basic survival rate, v i is the optimal phenotype in habitat i, and j is the width of the Gaussian survival function. An individual can get information about which habitat it is in through the juvenile cue, given by where v i is the mean cue in habitat i, for simplicity assumed to be the same as the optimal phenotype, and ϵ juv is a normally distributed random error with mean 0 and standard deviation j juv .
There is a probability m of juvenile dispersal to a patch randomly selected in the entire metapopulation, including the patch of origin. The local populations are regulated such that a patch produces K juveniles, each of which has a probability m to disperse. There are equal numbers of patches for the two habitats, which means that the probability for a dispersing individual to change habitat is 1/2.
The life cycle of individuals is as follows: (1) selection occurs, with survival in habitat i as a function of phenotype u, as in equation (2); (2) within-patch random mating takes place, forming K offspring in each local population, after which the adults die; (3) each juvenile (independently) observes an environmental cue, as given in equation (3), and has its phenotype determined on the basis of its genotype and the environmental cue; and (4) each juvenile has a probability m of migrating to a randomly chosen patch. The cycle then returns to phase 1.
At the locus for z there are alleles z k , which we represent as real values limited to an interval. We are interested in situations where there is adaptively maintained genetic polymorphism at this locus. In principle, the alleles z k can mutate, be selected, and evolve. But in order to aid the interpretation of our results, we first make the simplification that there are only two alleles with fixed values z 1 and z 2 . However, in the appendix we show results for a case where alleles can mutate and evolve within set limits.
We think of the effects of the alleles at the locus for z as genetic cues, in the sense that they can provide statistical information to an individual about which habitat it is in (Leimar et al. 2006;Dall et al. 2015;Leimar and McNamara 2015). The nature of the information is that the allele frequencies at the locus for z can differ between habitats, giving rise to a correlation between habitat and z. The value z then acts as a statistical predictor of the habitat in a manner similar to the environmental cue x juv . The idea helps explain how selection acts on the loci for a and b, because these are weights on z and x juv for determining the phenotype (eq. [1]). A better match between habitat and phenotype gives higher survival (eq. [2]), and selection at the loci for a and b acts toward achieving high survival. As mentioned in the introduction, this selection depends on the effective migration rate between the habitats a locus is exposed to.
The locus for the weight a in equation (1) can be seen as a modifier locus, with alleles a k , that influences gene expression at the cue locus (note also that evolutionary changes of a modifier fully linked to z has similar effects as evolutionary changes of the genes at the locus for z). We represent the alleles a k as real values in an interval. The phenotype in equation (1) is also influenced by the juvenile cue, mediated by the locus for the weight b, with alleles b k . In terms of plasticity, b is the slope of a reaction norm, and the alleles at the locus can be regarded as plasticity genes. We assume that the loci are positioned in the order z, a, b along a chromosome, with r za being the recombination rate between the cue locus and the modifier locus a, and r ab being the rate between the modifier locus and the plasticity locus b.
The alleles at a locus are additive, producing diploid values as the sum of maternal and paternal allelic values. For instance, at the genetic effect locus we have z p z mat 1 z pat . The value z is referred to as a genetic effect or genetic cue, which can be polymorphic across habitats. For the loci giving the weights in equation (1), we are interested in cases where the modifier and slope effects, a p a mat 1 a pat and b p b mat 1 b pat , display fairly little genetic variation over the metapopulation but still evolve over the longer term.

Two Traits
We extend the situation described above to two traits, u 1 and u 2 , determined as The genetic effects z 1 and z 2 are each determined by a locus with additive alleles, as in the case for a single trait above, and the juvenile environmental cue is given by equation (3). The modifiers a 1 and a 2 and slopes b 1 and b 2 are determined genetically by separate loci. The juvenile to adult survival in habitat i is given by The loci are positioned in the order z 1 , z 2 , a 1 , a 2 , b 1 , b 1 along a chromosome. In the same way as for the single trait, we make the simplification that there are only two alleles at each of the loci for z 1 and z 2 , with fixed values z 11 and z 12 for z 1 and z 21 and z 22 for z 2 , respectively. Concerning recombination rates, r zz is the recombination rate between the loci for the genetic effects z 1 and z 2 , r za is the recombination rate between the locus for z 2 and the locus for a 1 , and r ab is the recombination rate between neighboring loci for a 1 , a 2 , b 1 , and b 2 .

Simulation Models
For our individual-based simulations, we started with a dimorphism at the locus for z and kept the values of the two Migration rate Frequency of 'locally fit' allele B Figure 2: Phenotype determination for linked and unlinked genetic architectures as a function of the rate of migration. A shows how the value of the epistatic modifier a (solid lines) of the genetic effect z and the slope b (dashed lines) of the reaction norm for the environmental cue x juv depend on the migration rate m and on the genetic architecture. The mean 5 SD over 10 replicate individual-based simulations is displayed. The left-hand (green) lines correspond to the case where the loci for z, a, and b are all unlinked, and the right-hand (orange) lines correspond to the case where the three loci are tightly linked. The lines between these (gray) correspond to an intermediate case where the loci for z and a are linked but the locus for b is unlinked to these. B shows the average frequency of the locally fit allele, that is, the average of the frequency of z 1 in habitat 1 and of z 2 in habitat 2. The dashed dark gray line shows the case of pure genetic polymorphism (a p 1 and b p 0). Survival selection between habitats is given in equation (2), and the phenotype is determined as in equation (1). For the linked case, recombination rates are r za p r ab p 0:001; for the unlinked case, they are r za p r ab p 0:5; and for the intermediate case, they are r za p 0:001 and r ab p 0:5. Other parameter values: N p p 200, K p 100, s 0 p 0:1, j p 1:0, v 1 p 20:75, v 2 p 0:75, z 1 p 20:4, z 2 p 0:4, j juv p 0:5. alleles fixed, while a and b evolved. For parameter values for which a became close to zero, the dimorphism at the locus for z was sometimes not maintained, because one of the alleles was lost from the population through genetic drift. In such a case, we either ran that replicate simulation one more time or used the replicates where one of the alleles was lost. In either case, this did not influence the evolutionary outcome for plasticity loci. As described above, we used intervals for the allowed range of the values of alleles. For the simulations, we used z 1 p 20:4, z 2 p 0:4, and the range [0.0, 0.5] for alleles at the loci for a and b. Mutational increments had a Laplace (reflected exponential) distribution with a standard deviation of 0.04, but allelic values were constrained to stay within the interval. The simulations were run for 50,000 generations with a mutation rate of 0.0050, to generate enough genetic variation for adaptation to proceed, followed by 50,000 generations with a mutation rate of 0.0001, to remove excess genetic variation.
To investigate the evolution of rates of recombination between the loci for z 1 and z 2 and between these and the plasticity loci, we introduced additional loci controlling recombination. There were nine loci along a chromosome, coding for z 1 , z 2 , r zz , r za , r ab , a 1 , a 2 , b 1 , and b 2 . The loci for the recombination rates were tightly linked to the locus for z 2 in order to maximize the chances of the evolution of

Results
The effect of genetic architecture on local adaptation and phenotypic plasticity is illustrated in figures 2 and 3, with data from individual-based simulations. There is a single trait u, with optimal survival at trait value v 1 and v 2 in habitat 1 and 2 (eq. [2]). The determination of the phenotype is given by u p az 1 bx juv , where z is a genetic effect, a is an epistatic modifier of z, x juv is an environmental cue (eq. [3]), and b is a plasticity effect giving the slope of a reaction norm (eq. [1]). Each of z, a, and b is determined by a single diploid locus with additive allelic effects, and we are comparing the case where the loci are tightly linked with that where they are all unlinked (figs. 2, 3). As seen in figure 2, for in- are as follows: for habitat 1 specialists, thick and thin blue lines (slightly shifted up and down for clarity) represent individuals in habitat 1 with genotype z 1 z 1 and z 1 z 2 (with frequencies before migration of 0.76 and 0.22; line widths are proportional to frequencies); for habitat 2 specialists, thick and thin red lines represent individuals in habitat 2 with genotype z 2 z 2 and z 1 z 2 (with frequencies 0.77 and 0.21); and for phenotypically plastic generalists, the gray dashed line shows the slope and intercepts averaged over both habitats. For the generalist, the reaction norm is very similar between habitats (not shown) because a is small and b does not vary much, but the alleles z 1 and z 2 still segregate at the locus for z. The distributions of the juvenile environmental cue x juv are shown lightly shaded for adult individuals in habitat 1 (left) and habitat 2 (right; not labeled to avoid visual clutter). The figure corresponds to the cases in figure 2 for migration rate m p 0:10, with tightly linked loci for specialism and unlinked loci for plasticity.
termediate rates of migration between habitats the genetic architecture strongly influences the values of a and b and thus the contributions of genetic polymorphism and plasticity to variation in u. For tightly linked loci, the genetic contribution to the variation is larger than that for unlinked loci, and the reverse is true for the contribution from plasticity. For high enough rates of migration, the modifier a evolves to be close to 0 ( fig. 2A) so that z in equation (1) has little influence on the phenotype u. There is then little selection at the locus for z, and the allele frequencies undergo genetic drift, with an average frequency of 0.5 for the locally fit allele (fig. 2B). A similar situation, but one in which the allelic values at the locus for z can mutate and evolve, is shown in figure A2 (figs. A1-A3 are available online). The influence of genetic architecture is further exemplified by the reaction norms for migration rate m p 0:10 between local populations (corresponding to a migration rate of 0.05 between habitats), which are shown in figure 3, together with the distributions of the environmental cue that adults in the different habitats observed as juveniles. For the linked case, there are reaction norms with shallower slopes, with different mean intercepts for individuals in habitats 1 and 2 with different genotypes (red and blue lines in fig. 3 represent habitat 1 and 2 specialists, respectively; cf. fig. 1A). There is genetic variation in z in each habitat: there are two alleles, each better adapted to one of the habitats, giving rise to alternative homozygotes and heterozygotes with different frequencies in the habitats ( fig. 2B; in principle, these alleles can evolve; see fig. A2). For the unlinked case, there is a single reaction norm with a steeper slope (dashed line in fig. 3), corresponding to a phenotypically plastic generalist. Note that the only difference in model parameters between the linked and unlinked cases is the genetic architecture, which demonstrates that ecological genetic conflict can have a pronounced influence on phenotype determination. This effect of genetic architecture hinges on whether genes tightly linked to one of the alleles at the polymorphic locus for z, adapted to one of the habitats, have an appreciable chance of recombining to become associated with an allele that is locally adapted to the other habitat as well as migrating to that habitat. The way this can happen is if a modifier or slope allele occurs in a heterozygote between alleles at the locus for z, each adapted to different habitats. The strength of selection against such a heterozygote influences the chance for the modifier or slope allele to recombine to the other locally adapted allele. For the linked case shown in figure 3, this chance is small, illustrating that genes for specialism have their evolutionary future mainly in their own habitat. While studying between-habitat genetic polymorphism, Bengtsson (1985) and Barton and Bengtsson (1986) introduced the concept of an effective migration rate for a neutral locus that is linked to a selected genetically polymorphic locus. For instance, using equation (4) in Yeaman and Whitlock (2011) and ignoring the effects of plasticity, we find an effective migration rate of 0.0002 for a linkage of r p 0:001 to z ( fig. 3), so for such genes the two habitats are fairly isolated from each other.
An alternative and potentially more informative way of showing how the selective circumstances vary with the degree of linkage to a between-habitat polymorphism is to examine how the reproductive value for a modifier or slope allele of being associated (linked) with an allele adapted to one or the other habitat depends on the rate of recombination. The reason this is informative is that the reproductive value measures the long-term representation in the population of a plasticity allele in a given position (i.e., linked to the locally more fit or the locally less fit allele at the locus for z). We have performed a numerical analysis of a model that has a very large population in each habitat (see the appendix for a model description) but that is otherwise similar to the simulation model with results in figures 2 and 3. The results of the numerical analysis, which takes into account plasticity, are given in table A1 and figure A1  (table A1 is available online). The outcome of the analysis using reproductive values is less extreme but qualitatively similar to the consideration of effective migration rates. As seen in table A1, for m around 0.1 (m 12 around 0.05) and with modifier and slope loci tightly linked to z, the reproductive value of being associated with the locally adapted allele at the genetic effect locus is about four times higher than that of being associated with the other allele, whereas these values are nearly equal for loosely linked modifiers. In any case, for a migration rate above a critical value, phenotype determination for the linked case (as well as for the unlinked case) is dominated by plasticity, because the modifier a in equation (1) approaches zero. For instance, in figure 2 the critical migration rate is m p 0:14. The critical migration rate for a wider range of parameters is shown in figure 4. In general, stronger selection between habitats and less accurate juvenile environmental cues favor genetic polymorphism in z and thus a higher value of the critical migration rate ( fig. 4).
For two traits, u 1 and u 2 , each with different optima in the habitats, as given by equation (5), we again find a pro-nounced influence of genetic architecture on the relative importance of genetic polymorphism and plasticity (figs. 5, 6). For each trait, u 1 and u 2 , there is a separate genetic effect, z 1 and z 2 , coded by one locus, with modifier a 1 and a 2 and reaction norm slope b 1 and b 2 but the same juvenile environmental cue x juv for both reaction norms, as given in equation (4). Three cases are illustrated in figure 5: one in which all loci are linked; another in which the two genetic effect loci are linked and the loci for a 1 , a 2 , b 1 , and b 2 are unlinked from each other and from the genetic effect loci; and a third in which all loci are unlinked. From this figure and the example in figure 6, it appears that the influence of genetic architecture is qualitatively similar but even stronger for a two-trait syndrome compared with a single trait. The reason for this difference between figures 2 and 5 is most likely that the total selection between habitats is stronger for the two-trait syndrome.
For the two-trait syndrome, we explored the evolution of genetic architecture using individual-based simulations. Instead of specifying the recombination rates r zz , r za , and r ab , Migration rate Frequency of 'locally fit' allele B Figure 5: Phenotype determination for different genetic architectures as a function of the rate of migration. This figure is similar to figure 2, but there are two traits, u 1 and u 2 , each with optima that differ between the habitats. There are two genetic effect loci, one for each trait, and modifiers a 1 and a 2 for each of the genetic effects z 1 and z 2 , as well as slopes b 1 and b 2 for the reaction norms of u 1 and u 2 for the juvenile cue x juv , following equation (4). A shows how the mean modifier (a 1 1 a 2 )=2 and mean slope (b 1 1 b 2 )=2 depend on the migration rate m and on the genetic architecture. The solid lines show the mean modifier over 10 replicates of individual-based simulations, with the left-hand (green) line giving a case where the loci for the two genetic effects and the modifiers a 1 , a 2 , b 1 , and b 2 are all unlinked. The right-hand (orange) line shows the same thing, except that the six loci are tightly linked. For the middle (gray) line, the two genetic effect loci are tightly linked but the modifier and plasticity loci are unlinked from these and from each other. The dashed lines show the corresponding reaction norm slopes. The situation is symmetric between the traits, and the results for each trait separately are very similar to those shown here. B shows the average frequency of the locally fit allele, that is, the average of the frequencies of z 11 and z 21 in habitat 1 and the frequencies of z 12 and z 22 in habitat 2 (for every second value of m in A). The dashed dark gray line shows the case of pure genetic polymorphism (a 1 p a 2 p 1 and b 1 p b 2 p 0). Survival selection between habitats is given by equation (5). For the linked case, recombination rates are r zz p r za p r ab p 0:001, and for the unlinked case, they are r zz p r za p r ab p 0:5. Other parameter values: N p p 200, K p 100, s 0 p 0:1, j p 1:0, v 11 p v 21 p 20:75, v 12 p v 22 p 0:75, z 11 p z 21 p 20:4, z 12 p z 22 p 0:4, j juv p 0:5. we let these be coded by three loci. We found that tight linkage between the two polymorphic effect loci z 1 and z 2 promptly evolved (i.e., r zz became close to zero; table 1), so these loci emerge as a polymorphic complex. However, for a 1 , a 2 , b 1 , and b 2 we did not find notable selection for either tighter or looser linkage to the z 1 and z 2 complex. Considerable genetic variation for the recombination rates r za and r ab persisted in the population, perhaps as a result of mutation-drift balance (for illustrations of these simulations, see table 1 and figs. 7 and A3). Overall, the outcome for the modifiers a 1 and a 2 and plasticity slopes b 1 and b 2 , shown in table 1, was similar to the middle (gray) case in figure 5, with tightly linked z 1 and z 2 and unlinked loci for modifiers and slopes.

Discussion
Both local adaptation and plasticity are well-studied phenomena (van Tienderen 1991(van Tienderen , 1997West-Eberhard 2003;DeWitt and Langerhans 2004;Richards et al. 2006;Griffith and Sultan 2012). Even so, by examining ecological genetic conflict, we have identified phenomena that were not studied before. Compared with previous work, the major new aspect here  1 1 b 2 )=2) are as follows: for habitat 1 specialists, thick and thin blue lines (slightly shifted up and down for clarity) represent individuals in habitat 1 with genotype z n1 z n1 , z n1 z n2 , and z n2 z n2 at each of the two genetic effect loci, n p 1, 2 (with frequencies after migration of 0.74, 0.15, and 0.10; line widths are proportional to frequencies); for habitat 2 specialists, thick and thin red lines represent individuals in habitat 2 with genotype z n2 z n2 , z n1 z n2 , and z n1 z n1 at each of the two genetic effect loci (with frequencies 0.73, 0.16, and 0.11); and for phenotypically plastic generalists, the gray dashed line shows the slope and intercepts averaged over both habitats. For the linked case (specialists), the genotypes at the loci for z 1 and z 2 are highly correlated, both among habitats (correlation of genetic effects: 0.999) and within habitats (0.998). For the unlinked case, the reaction norm is very similar between habitats (not shown), because the a n are small and the b n do not vary much but the alleles z 21 and z 22 still segregate at the locus for z 2 , whereas in this example z 1 is fixed for z 12 . The distributions of the juvenile environmental cue x juv are shown lightly shaded for adult individuals in habitat 1 (left) and habitat 2 (right). The figure corresponds to the cases in figure 5 for migration rate m p 0:24, with tightly linked loci for specialism and unlinked loci for plasticity. Note: Simulations are similar to those in figure 5. The table gives the mean5SD of the population average of individual recombination rates and the averages of the a n and b n over 20 replicate simulations. The recombination rate r zz between z 1 and z 2 evolved toward tight linkage, but the other recombination rates reached intermediate average values, with broad distributions over replicate simulations, as illustrated in figure 7. is that we show the influence of genetic architecture on the balance between genetic polymorphism and phenotypic plasticity and that we interpret our results in terms of genetic conflict. We find that the rate of recombination between genetic effect, modifier, and plasticity loci influences the evolutionary outcome, with more plasticity and less genetic polymorphism for unlinked loci. The effect of genetic architecture is strongest for intermediate migration rates (figs. 2, 5).
As we have mentioned, one way of understanding the effect of genetic architecture is as a low effective migration rate for loci tightly linked to a genetic polymorphism (Barton and Bengtsson 1986;Charlesworth et al. 1997;Bürger and Aker-  For each replicate simulation, the allelic effects in the population were put into five bins (i.e., on average, a proportion of 0.2 per bin), and the mean and SD proportions over the replicates were computed. A and B show effects for r za and r ab for simulations with m p 0:12, B and C show the same for simulations with m p 0:18, and E and F show the same for simulations with m p 0:24. Figure A3 shows examples of the population distributions of diploid recombination values from the replicate simulations. man 2011; Yeaman and Whitlock 2011;Aeschbacher and Bürger 2014;Aeschbacher et al. 2017). Another approach is to compute reproductive values of modifier and slope alleles, as we have done (table A1). Based on our analysis, we find that a plasticity allele tightly linked to a polymorphic genetic effect locus can also leave copies of itself to future generations when linked to a genetic effect allele that is not adapted to the current habitat, because migration can transport it to the other habitat. Thus, migration makes the distinction between linked and unlinked genetic architectures a matter of degree rather than kind.
In fact, the general pattern of variation of the modifier a and plasticity slope b with the migration rate m is qualitatively similar for different genetic architectures, with a shift from mainly genetic polymorphism to mainly phenotypic plasticity as m increases (figs. 2, 5, A1, A2). One way of explaining this shift is in terms of the statistical information about the habitat that is contained in the genetic cue z in comparison with the environmental cue x juv (see "Methods"; Leimar et al. 2006;Dall et al. 2015;Leimar and McNamara 2015). Tufto (2000) provides a discussion of earlier articles dealing with this topic. For higher values of m, allele frequency differences between habitats are smaller (figs. 2B, 5B; table A1) and thus less statistically informative about the habitat compared with the environmental cue x juv . An optimal phenotype determination strategy will therefore put less emphasis on the genetic cue and more emphasis on the environmental cue for higher values of m. For high enough rates of migration and provided that environmental cues are sufficiently accurate, phenotypic plasticity dominates completely, as illustrated in figure 4. For a much simpler model with binary cues, inspired by the work of Sultan and Spencer (2002), an analytical solution is possible, leading to qualitatively similar results (see eq. [4] and fig. 5 in Leimar et al. 2006).
Our main result that reaction norm slopes can depend on the genetic architecture (figs. 2, 3, 5, 6, A1, A2) is new, and there appear to be no empirical data directly examining this question. It is known that ecotypic traits differ in how they are determined, with the variation in some traits being mainly genetic and that in other traits being mainly plastic (Lucek et al. 2014), but the possible influence of genetic architecture is unknown. There are observations showing that plasticity can decrease during the formation of an ecotype (Hasan et al. 2017), but the genomic basis of the reduction in plasticity is not known. Also, a study of so-called expression quantitative trait loci shows that distant trans-regulatory changes on average had different effects than local cis-regulatory changes and were also more responsive to the environment (Ishikawa et al. 2017), which is at least suggestive of an influence of genetic architecture on trait expression.
In our investigation of the evolution of recombination, for a two-trait situation we found that a low recombination rate between the polymorphic loci for z 1 and z 2 readily evolved (table 1), and this is in accordance with the traditional understanding of such situations (Pinho and Hey 2010;Via 2012). In contrast, we did not detect selection for either tighter or looser linkage between the polymorphic loci and epistatic modifiers and plasticity loci ( fig. 7; table 1). The question appears not to have been analyzed previously, but perhaps other factors influencing genetic architecture, such as inversions or a tendency toward cis-regulatory influences, can play a greater role in determining recombination rates between plasticity loci and polymorphic loci. Overall, we hope our work can inspire further empirical and theoretical investigation of the genomics of local adaptation and the plasticity of ecotypes.