Introduction

Elucidating the mechanisms that give rise to population divergence and eventually initiate speciation is a key step for understanding the evolution of biodiversity (Mayr 1963; Orr and Smith 1998). Historically, most theories of differentiation and speciation focused on geographically isolated populations, where drift and selection interact to cause evolutionary change in the absence of homogenizing gene flow (Slatkin 1987). However, recent empirical examples and theory suggest that speciation can occur despite initially high gene flow (Rundle and Nosil 2005; Nosil 2008).

Numerous studies have focused on the patterns of genetic divergence among spatially separated populations to provide insights into the processes that drive population divergence (e.g., Richards‐Zawacki 2009; Wang and Summers 2010; Funk et al. 2016; Harvey et al. 2017; Thomé et al. 2021). At least three types of isolation have been identified so far. First, in the absence of selection, populations can become differentiated with increasing distance, which is known as isolation-by-distance (IBD; Wright 1943). Second, landscapes through which organisms disperse vary in their environmental suitability and resistance to movement; therefore, landscape resistance may predict the amount of gene flow between populations better than IBD (isolation-by-resistance, IBR; Cushman et al. 2006). Finally, aside from geographic distance and landscape resistance between populations, environmental conditions to which organisms are exposed can also play a crucial role in increasing genetic differentiation through divergent selection, a pattern known as isolation-by-environment (IBE; Wang and Summers 2010; Sexton et al. 2014). Ultimately, studying these different drivers of population divergence is fundamental for advancing our understanding of how biodiversity arises.

As opposed to genetic divergence, patterns of phenotypic divergence among populations have received less attention (Storfer et al. 2018). Examination of the roles of distance, resistance to movement, and divergent selection on patterns of phenotypic divergence in addition to genetic divergence remains scarce (but see Lowe et al. 2012; Richter-Boix et al. 2013; Ebersbach et al. 2020), yet is important for understanding the processes causing population divergence and speciation. First, if phenotypic divergence originates mainly due to drift and reduced gene flow, we expect a correlation between neutral genetic divergence and phenotypic divergence, and both should be explained by similar landscape features (Lowe et al. 2012; Sexton et al. 2014; but see McKay and Latta 2002). In contrast, if populations diverge due to different environmental conditions (i.e., divergent selection), neutral genetic divergence and phenotypic divergence will not necessarily be correlated early in the process of divergence (Leinonen et al. 2006). In this case, phenotypic divergence will be related to the environmental factors driving this divergence, while genetic divergence will be related to geographic distance, topographic features, or other environmental factors impeding gene flow (Nali et al. 2020). If divergent selection is strong enough to subsequently reduce gene flow, as in the case of ecological speciation, then a correlation between phenotypic and genetic divergence is expected later in the process of divergence (Rundle and Nosil 2005; Schluter 2009). In this case, genetic divergence is expected to be better predicted by phenotypic divergence than by landscape features (Funk and Murphy 2010; Wang and Summers 2010). Finally, a correlation between genetic and phenotypic divergence is not expected if divergent selection causes phenotypic divergence without impeding gene flow, and therefore, without causing genetic divergence at neutral loci (Nosil 2008; Pinho and Hey 2010). Thus, testing the landscape features related to neutral genetic and phenotypic divergence will help elucidate the relative roles of different evolutionary processes (restricted gene flow, divergent selection, and drift) in driving population divergence (Zamudio et al. 2016).

The evolutionary mechanisms underlying observed patterns of species richness in tropical mountains, which are global biodiversity hotspots (Myers et al. 2000), remain particularly poorly understood (Cadena et al. 2012). Recent work demonstrates that, in addition to geographic isolation, ecological differences along tropical elevational gradients can drive diversification in montane groups, leading to local adaptation and, ultimately, promoting speciation (Guarnizo et al. 2009; Polato et al. 2018). Tropical montane amphibians are exceptionally diverse, many are endemic and endangered, and they are generally thought to have poor dispersal abilities (Hutter et al. 2017). Hence, their dispersal rates and patterns may be particularly sensitive to landscape features and environmental gradients (Funk et al. 2005; Graham et al. 2004; Guarnizo et al. 2009; Richards‐Zawacki 2009). High sensitivity to climatic variables, relatively poor dispersal abilities, and high species richness and turnover make tropical amphibians an excellent and pressing group in which to study the role of environmental gradients in gene flow and selection.

Here, we tested the relative roles of landscape resistance vs. divergent selection (IBR vs. IBE) in generating observed patterns of genetic and phenotypic (size and color) divergence in Epipedobates anthonyi, a common poison frog distributed along the western slopes of the Andes in southern Ecuador and northern Peru from sea level to 1800 m asl. While morphological and acoustic variation have previously been documented in a limited number of populations in this species (Tarvin et al. 2017), hypotheses regarding the mechanisms driving genetic and phenotypic divergence have not yet been thoroughly and systematically evaluated. Although IBD is expected to have an underlying effect in population divergence, herein we focused on exploring the contribution of environmental variation either as resistance to gene flow (IBR) or as selective pressure on phenotypes (IBE). We tested two main hypotheses: (1) population genetic divergence is primarily caused by resistance to movement (i.e. less gene flow) among populations due to geographic distance (IBD), or to topography and/or environmental resistance between sites (IBR). Under this hypothesis, we predict that geographic distance and other barriers (e.g., mountain ridges, environmental conditions between sites) would best explain the observed patterns of genetic divergence between populations. (2) Phenotypic divergence among populations occurs mainly due to divergent selection caused by environmental variation across sites at varying elevations (IBE). Under this hypothesis, we predicted that different environmental conditions (e.g., temperature) among sites would best explain observed patterns of phenotypic divergence among populations, as selection acts on phenotypes (e.g., larger frogs selected for at lower temperatures; e.g., Funk et al. 2016; Womack and Bell 2020). Populations occurring in different environments and separated by geographic barriers should be most dissimilar in both genetic variation and phenotypic traits.

Methods

Field sampling

We sampled 535 individuals from 35 localities of E. anthonyi from 2012 to 2014 encompassing the species’ range in Ecuador, which constitutes approximately half of its entire range (Table 1; Fig. 1). A subset of these localities (n = 18) was along four transects, each one spanning a 1500 m elevational gradient. On each transect, we sampled five localities, each locality at ~400 m intervals at 200, 500, 900, 1300, and 1700 m asl, except the southernmost transect which included only three sites sampled at 500, 900, and 1300 m asl. Most remaining sample sites were in the lowlands (13–192 m asl), in addition to several mid and high elevation populations scattered throughout the species’ range (494–1570 m asl). At each locality, we collected ~20 tissue samples from adult frogs (muscle, liver, or buccal swabs; Table 1). We also completed our sampling in a few sites with juveniles or subadults (about 12% of total samples) or larvae and metamorphs (about 1.5% of total samples). We took photographs of frogs from a subset of sites for later color analyses (see details below and Table 1). Broad-scale genetic tests used data from all 35 sites and broad-scale phenotypic tests used the 18 transect points and one additional lowland site (total = 19 sites). Fine-scale comparisons only used sites on the transects (northern = 10 sites; southern = 8 sites) for both genetic and phenotypic tests. Tissue samples were stored in 96% ethanol. Every collected specimen was fixed and preserved following standard museum collection protocols and deposited in the specimen collection of the Centro Jambatu for Research and Conservation of Amphibians (CJ, Quito-Ecuador). All collections were approved by the Ministry of Environment of Ecuador (Permits N° 003-11 IC-FAU-DNB/MA and N° 001-13 IC-FAU-DNB/MA). All experimental protocols were approved by the Colorado State University Institutional Animal Care and Use Committee (Protocol 12-3676 A).

Table 1 Sampling site information for 35 localities studied.
Fig. 1: Localities of Epipedobates anthonyi showing patterns of genetic admixture with neutral microsatellite loci.
figure 1

Each color represents the percentage of genotypes assigned to a given genetic cluster identified in program STRUCTURE. Elevational transects are shown in dashed boxes (T1–T4). Lowland site used for phenotypic analysis is also shown in a dashed box. Size of pie charts corresponds to sample size. Note the mountain ridge between transects 2 and 3.

Phenotypic data

To assess phenotypic divergence, we focused on size and color from 19 sites. Body size was measured as snout-vent length (SVL) of 307 preserved adult specimens with electronic digital calipers (0–150 mm; Table 1). Sex was determined by dissection and the presence of vocal slits in adult males. Sexual maturity of females was determined by the presence of eggs or convoluted oviducts. To quantify individual color variation, photographs of 251 adults were taken with a black–white–gray standard QPcard 101 (standard color reference card) using an Olympus E-PL1 camera (Table 1). Ambient light correction was implemented using Adobe Photoshop CS version 8 (following Stevens et al. 2007). Light-corrected photographs were analyzed using ImageJ. To score color, we used the RGB Measure plug-in to obtain the average red (R), green (G), and blue (B) scores for a standard area of the background dorsal skin color (Dugas et al. 2015). Briefly, we obtained the scores of six 20 × 20 pixel quadrats: two of each side of the dorsal surface of the head, the mid-dorsum, and the posterior region of the dorsum, respectively, excluding the light-colored dorsal stripes. We also scored a standard area of the background QPcard for standardization across photographs (Dugas et al. 2015). Given that photographs were taken in the field without standard lighting conditions, we used the residuals of a regression between the frog’s dorsal skin scores and the QPcard scores for subsequent analyses (Dugas et al. 2015).

Genetic data

To characterize patterns of genetic divergence, we developed nine microsatellite loci for E. anthonyi at the EG Cornell Facility as described in Páez-Vacas and Oleas (2019). Briefly, genomic DNA was extracted from tissue using a Qiagen DNA Blood and Tissue Kit and eluted with 100 microliters AE buffer and quantified with a Qubit 2.0 Fluorometer. We prioritized tetramers, long repeats, and annealing temperatures that would be amenable to multiplexing (Van Asch et al. 2010). Loci that complied with these characteristics (64 loci) were compared against each other using Geneious version 8.0 (http://www.geneious.com; Kearse et al. 2012) to avoid selecting the same loci twice. We prioritized polymorphic loci that amplified in two or three test individuals from a subset of seven individuals, each from a different population distributed throughout the study area. Loci that amplified successfully (18 loci) were then screened using the M13 protocol (Schuelke 2000) and tested in 42 individuals from two sites (EA9 and EA15; 20 and 22 individuals from each, respectively) to check for null alleles, Hardy–Weinberg proportions, and gametic (linkage) disequilibrium using GENEPOP (Raymond and Rousset 1995). Twelve loci passed these tests and were chosen for genotyping all individuals from all populations using 5' fluorescently labeled primers. Multiplex PCR was optimized using Multiplex Manager 1.0 (Holleley and Geerts 2009). Microsatellites were amplified in three 10 μL multiplex reactions with four loci per reaction, using Qiagen’s Type-it Microsatellite PCR kit. In every reaction, we included two negative controls, and two samples with known genotypes, and then we reamplified 10% of samples to assess genotyping error. PCR cycling parameters were initial denaturing (95 °C) for 5 min, 28 cycles (95 °C for 30 s to denature, 60 °C for annealing for 90 s, 72 °C extension for 60 s), and 60 °C for 60 min for final extension. PCR products were run on an Applied Biosystems 3730xl Data Analyzer using the GenScan LIZ500 (Applied Biosystems) size standard. Results were scored automatically and checked manually using the program Geneious version 8.0 (http://www.geneious.com; Kearse et al. 2012). We then discarded data from 3 of the 12 loci, 1 due to evidence of null alleles, and the remaining 2 due to missing genotypes in a subset of populations (i.e., they did not amplify consistently). This resulted in 9 final microsatellites used in the study.

Landscape variables

We downloaded environmental data from online GIS databases for 25 continuous variables hypothesized to affect E. anthonyi genetic and phenotypic differentiation across the study area (Table 2). These environmental variables included 19 temperature and precipitation variables at 1 km resolution, vegetation density (enhanced vegetation index) and percent tree canopy cover at 250 m resolution, and elevation at 30 m resolution (Farr and Kobrick 2000; Huete et al. 2002; Hansen et al. 2005; Hijmans et al. 2005; worldclim.org, modis.gsfc.nasa.gov, jpl.nasa.gov/srtm). We also calculated heat load index, topographic roughness, and compound topographic index of wetness from the digital elevation model at 30 m resolution using the Geomorphometric and Gradient Metric Toolbox v. 2.0 in ArcGIS v.10.3.1 (Moore et al. 1993; Gessler et al. 1995; Blaszczynski 1997; McCune and Keon 2002).

Table 2 Environmental variables used, description, source, calculation, and ecological justification.

Since many of these environmental variables were likely to show collinearity, we calculated Pearson’s correlation coefficients among all variables using ENMTools v. 1.3 (Warren et al. 2010) and removed variables that were strongly correlated with more than one variable (r > 0.7; Table 2). This resulted in a dataset of 12 uncorrelated environmental variables: annual mean temperature, temperature annual range, heat load index, isothermality (mean diurnal range/temperature annual range), annual precipitation, precipitation seasonality, precipitation of the warmest quarter, precipitation of the coldest quarter, enhanced vegetation index, percent tree cover, topographic roughness, and compound topographic index of wetness. Elevation was strongly correlated with many other environmental predictor variables, particularly climatic variables; therefore, we used other environmental predictors that were more mechanistically related to our hypotheses instead of elevation in our landscape genetic analyses.

To test the hypothesis of IBR, we assessed the effect of intervening environmental conditions between pairs of sites on phenotypic and genetic variation. For this, resistance surfaces were created from these environmental variables using the Raster Calculator in ArcGIS. Higher resistance to movement was assigned to habitats that were colder, drier, more seasonal, sparsely vegetated, steeply sloped, and with high heat load (i.e., solar radiation). As such, raw landscape raster values were either inverted when we hypothesized that higher values of the variable would result in higher movement and gene flow of E. anthonyi individuals, or their directionality remained the same when lower values of the resistance surface were hypothesized to result in higher movement and gene flow. We used Circuitscape v. 4.0 (McRae 2006; McRae et al. 2008) to calculate environmental resistance matrices between all sites for each environmental variable. Circuitscape resistances can often be correlated because of shared geographic distances between sites (McRae 2006, McRae et al. 2008). Therefore, we sequentially removed Circuitscape resistances with high variance inflation factor (VIF) scores until all VIF scores were less than 4 (Dormann et al. 2012; Row et al. 2017). This resulted in a final resistance dataset of five uncorrelated variables: annual mean temperature, annual precipitation, precipitation seasonality, enhanced vegetation index, and topographic roughness.

To test the hypothesis of isolation due to differences in environmental conditions (IBE), we extracted environmental values at each study site using the Spatial Analyst toolbox in ArcGIS, using the native spatial resolutions of each environmental variable (i.e., 30 m for compound topographic index of wetness, 250 m for enhanced vegetation index and tree cover, and 1 km for temperature and precipitation variables). We then generated an environmental dissimilarity matrix between all pairs of sites by calculating the absolute difference in the values between pairs of sites. For our IBD model, we calculated the geographic Euclidean (i.e., straight-line) distance between all sites, corrected for topography, using the 3D Analyst toolbox in ArcGIS.

Analyses

Phenotypic divergence

We used linear models to test whether there were differences among populations in size and each color score (R, G, and B) for populations shown in Table 1. Model predictors were ‘transect’, ‘elevation’, and ‘sex’. Including sex in the model allowed us to control for known size differences between males and females (females tend to be larger), and to assess if the patterns of phenotypic variation across populations were similar in both sexes.

Genetic divergence

Population genetic analyses were performed to assess gene flow, genetic diversity, and effective population sizes. Genotypes were checked for null alleles and scoring errors using MICROCHECKER 2.2.3 (Van Oosterhout et al. 2004). Allele and genotype frequencies, exact probabilities for Hardy–Weinberg proportions, and exact probabilities for gametic disequilibrium were calculated with GENEPOP (Raymond and Rousset 1995) and the adegenet package in R (Jombart 2008). Bonferroni corrections were applied to determine the significance of departures from Hardy–Weinberg proportions and gametic equilibrium (Rice 1989). Expected heterozygosities, number of alleles per locus, and metrics of genetic differentiation among populations (FST) were estimated with adegenet and PopGenReport packages in R (Jombart 2008; Adamack and Gruber 2014). We estimated allelic richness (Ar) using HP‐RARE 1.0 (Kalinowski 2005), which uses rarefaction to correct for differences in sample sizes. Effective population sizes (Ne) were estimated using NeEstimator 2.01, using the linkage disequilibrium method (Do et al. 2014).

To estimate the number of genetic demes (K) and to assign individuals to one or more of these demes based on multilocus genotypes, we used STRUCTURE 2.3.4 (Pritchard et al. 2000). STRUCTURE uses a Bayesian statistical approach to estimate the likelihood L(K) for deme assignment assuming Hardy–Weinberg proportions and gametic equilibrium between loci within populations, and then assigns individuals to one or more of these populations. We used the admixture model that assumes gene flow among populations and correlated allele frequencies. We used an initial burn-in of 100,000, followed by a total run length of 3,000,000. To infer the number of clusters, we used the ΔK method using STRUCTURE HARVESTER (Evanno et al. 2005; Earl and vonHoldt 2012). We tested K = 2–7, performed 10 runs for each K, and calculated the mean ln P(D) across runs for each K.

Landscape effects on phenotypic and genetic divergence

To test the effects of our explanatory variables on response variables, we used maximum likelihood of population effects (MLPE) to fit model parameters, and then performed model selection using the Bayesian Information Criterion (BIC) to rank top models (Clarke et al. 2002; Van Strien et al. 2012; Row et al. 2017). MLPE and model selection were run using the ‘lme4,’ ‘MuMIn’, and ‘usdm’ packages in R (Bates et al. 2014; Naimi et al. 2014). The explanatory variables ‘environmental resistance,’ ‘environmental dissimilarity,’ and ‘topographic distance’ were modeled as fixed effects, and population pairs were modeled as random effects (Clarke et al. 2002; Van Strien et al. 2012; Row et al. 2017). All explanatory and response variables were standardized and centered around their mean prior to the analyses (Row et al. 2017).

We tested the relationship between landscape features and genetic and phenotypic distances among sites. For genetic distances, we used FST as the response variable. As explanatory variables, we used topographically corrected distances between sites in all models, in addition to environmental resistances or environmental differences between sites. We first ran a set of models with topographically corrected distance (to test IBD). Then we ran a second set of models with environmental resistances between sites (to test IBR) and topographically corrected distances. We started with all uncorrelated environmental resistance variables, and only retained those that were included in the top models from model selection performed using the BIC. We then ran a third set of models with environmental differences between sites (to test IBE) and topographically corrected distances. As described above, we started with all uncorrelated environmental difference variables, and kept only those that were included in top models using BIC. For phenotypic distances, we ran models separately on size and color, using the same explanatory variables and procedures described above for genetic distances. Because we had different numbers of sites and individuals analyzed for each response variable and region, and thus different numbers of pairwise comparisons, we also had different sets of correlated and uncorrelated landscape variables for each model (i.e., 3–5 uncorrelated variables for genetic distance models, and 7–9 uncorrelated variables for phenotypic distance models).

Results

Phenotypic divergence

Populations of E. anthonyi show phenotypic divergence in color and size (Fig. 2; Table 3). We found evidence for two major color morphs: red or brown, in which red morphs have positive values for red scores, and brown morphs have negative values. These color morphs—red or brown—tended to be associated with elevation and latitude. For example, red morphs were found along the northern two elevational transects (transects 1 and 2), and brown morphs were found in the southern two transects and the western lowland sites closer to the coast (transects 3 and 4; Fig. 2). On average, red morphs from northern transects 1 and 2 were larger (mean SVL in adult males: 19.36 mm, SD = 1.79, n = 67; in adult females: 21.34 mm, SD = 2.12, n = 77) than brown morphs from the southern transects 3 and 4 (mean SVL in adult males: 18.42 mm, SD = 0.87, n = 64; in adult females: 19.82, SD = 0.93, n = 44; best linear model for size: F9,237 = 74.29; R2 = 0.735; p < 0.001, Table 3). Among red morphs, populations at higher elevations were larger, and exhibit brighter shades of red than populations at lower elevations (best linear model for red color: F10,240 = 43.02; R2 = 0.627; p < 0.001; Table 3; Fig. 2). There was little variation in other colors (green and blue; Table 3). Although females were larger than males (1.77 mm larger on average in the red morph; 0.92 mm larger on average in the brown morph), patterns of variation in size were the similar in both sexes within morphs (Fig. S1).

Fig. 2: Phenotypic variation across transects and elevation (n = 251).
figure 2

A Size (snout-vent length in mm) and B amount of red (average of red scores). Note in B phenotypic variation in populations of Epipedobates anthonyi in high elevation red morph (found in transects 1 and 2), low elevation red morph (found in transects 1 and 2), high elevation brown morph (found in transects 3 and 4), and low elevation brown morph (found in transects 3 and 4, and in coastal lowlands). Lowland sites with gray dots are additional sites (not used in statistical analyses) to depict size variation in the lowlands.

Table 3 Summary of the best linear models that explain phenotypic variation across transects and elevation.

Genetic divergence

Genetic results are based on 535 individuals genotyped at nine microsatellite loci. All loci were independent and there was no evidence of departure from Hardy–Weinberg proportions. Overall, we found low levels of genetic differentiation between populations (FST mean = 0.04, range = 0.01–0.12, Table S1). For the STRUCTURE analyses, the optimal number of clusters based on the ΔK method in STRUCTURE HARVERSTER was K = 3. However, high levels of admixture occurred between all the clusters, with admixture generally decreasing at higher elevations (Fig. 1 and S2). The three major population groups corresponded to (1) the northernmost populations in transects 1 and 2 (blue in Fig. 1); (2) the higher populations of transect 3 (yellow); and (3) lowland western and southernmost populations, including transect 4 (green). Genetic diversity decreased at higher elevations in the northern transects (p < 0.001, adj. R2 = 0.75 for allelic richness; p = 0.02, adj. R2 = 0.45 for heterozygosity, Fig. S3). Effective population sizes (Ne) ranged from 12 to infinite (Table 1).

Landscape effects on phenotypic and genetic divergence

Across the entire study area, MLPE results showed that both IBR and IBE models had the best fit for genetic and phenotypic divergence (Tables 4, S2 and S3). IBR had the best fit for genetic distance and color differences (R2 = 0.65 for FST; R2 = 0.51 for color; and R2 = 0.27 for SVL). This was due mainly to precipitation (i.e., annual precipitation, and precipitation of the warmest quarter) for both FST and color, and enhanced vegetation index for FST. The (IBE) model had the best fit for size differences (R2 = 0.30 for SVL), and to a slightly lesser extent for genetic distance and color differences (R2 = 0.61 for FST; and R2 = 0.27 for color; Table 4). In this case, temperature had an effect in both genetic and phenotypic divergence (e.g., annual mean temperature) along with topographically corrected distances.

Table 4 Variables selected from Maximum Likelihood of Population Effects (MLPE) analysis with standardized beta coefficients, R2, and Bayesian Information Criterion (BIC) scores of top models.

Because we found significant phenotypic and genetic divergence between the two northern and two southern transects, we also analyzed them separately (Table 4). For the northern transects, IBD solely predicted genetic distances (R2 = 0.60 in all models; Fig. S4). For phenotypic distances, IBE was the best model for variation in size and color (R2 = 0.72 for SVL; and R2 = 0.81 for color), mainly due to differences in temperature (e.g., annual mean temperature, temperature annual range, isothermality). Topographic distance (i.e., IBD) was also very important in explaining size and color variation. Compound topographic index (for SVL) and enhanced vegetation index (for both phenotypic traits) also had an effect. For the southern transects, genetic distances were mostly predicted by topographic distance and IBR due to topographic roughness and precipitation of the warmest quarter (R2 = 0.91). The IBE model best fit size variation, due to compound topographic index of wetness and tree canopy cover (R2 = 0.44). For color, no variables were selected in any model, most likely due to low variation in color and/or small sample size.

Discussion

We found that E. anthonyi diverged in color and size along different elevational gradients, despite low genetic divergence at neutral loci, suggesting phenotypic divergence in the face of gene flow. We hypothesized that patterns of genetic divergence would primarily be explained by resistance to movement between populations (i.e., IBR), whereas patterns of phenotypic variation would primarily be explained by environmental differences among sites (i.e., IBE). We also expected an underlying effect of topographic distance on genetic distance and phenotypic divergence. Overall, we found support for the two hypotheses at the smaller, but not larger, spatial scale. At the larger scale, both IBR explained genetic and color differences, and IBE along with distance explained most of the observed size differences. At a smaller scale within elevational gradients, we found that mainly topographic distance (IBD) and, to some extent, landscape resistance (IBR) predicted genetic divergence, while environmental differences (IBE) along with topographic distance predicted phenotypic divergence, as we hypothesized. These findings suggest that, at smaller scales, distance is an important driver of population divergence and that environmental variation has a two-fold effect on promoting early population divergence but affecting genetic and phenotypic divergence differently. Namely, environmental resistance between sites restricts gene flow, while environmental conditions at sites exert divergent selective pressures on phenotypes.

Phenotypic divergence with little genetic divergence

Populations along the two northern transects differed in coloration and were larger than populations along the southern transects and lowlands. Interestingly, in the two northern transects, red coloration intensified and size increased with elevation. While most studies of adaptively divergent amphibian populations have found high levels of genetic divergence among populations, we found little genetic divergence at neutral loci (FST and DPS) among phenotypically differentiated populations. Others have found similar patterns of phenotypic divergence with little or no genetic divergence (e.g., Richter-Boix et al. 2013; Muir et al. 2014; Roland et al. 2017). There are two primary ways phenotypic divergence could occur with gene flow. On one hand, divergent natural selection can cause differentiation in loci affecting ecologically important characters when populations use different habitats despite gene flow (Kawecki and Ebert 2004; Bolnick and Fitzpatrick 2007). In fact, gene flow could also facilitate adaptation by increasing genetic variation on which selection can act (Mayr 1963; Kawecki and Ebert 2004). Under some circumstances, genetically based adaptive divergence can play a crucial role in initiating divergence of incipient species. Alternatively, the same genotype can produce different phenotypes in different environments through adaptive or non-adaptive phenotypic plasticity, which also likely contributes to the observed phenotypic divergence (Pfennig et al. 2010). Size and color are known to be related to reproductive isolation in diurnal frogs (Summers et al.1999; Maan and Cummings 2009), suggesting that they could act as ‘magic traits’: traits under divergent natural selection that are also used in mate choice, thereby facilitating ecological speciation (Servedio et al. 2011). Low genetic divergence between populations, however, does not support this inference, unless these populations are in the early stages of population divergence, in which case we would not necessarily expect high genetic divergence.

Although genetic divergence was generally low throughout the study area, high elevation populations were an exception to this overall pattern. Populations at higher elevations had less genetic diversity in both allelic richness and heterozygosity, and show less admixture than populations in the lowlands, which can be explained by their greater isolation and fewer surrounding populations that can act as sources of immigrants. Genetic drift in the relatively more isolated populations could also influence the observed phenotypic variation. For example, the highest population of transect 3 (EA11: 1712 m asl) was much less genetically diverse than any other population and showed the highest FST values. This could be due to a small effective population size (Ne = 14.8; 95% CI: 9.4–26; Table 1), and subsequent genetic drift due to recurrent landslides in that area, witnessed by one of the authors (MIP) during the 4 years of fieldwork in the area.

Landscape effects on phenotypic and genetic divergence

Most of the phenotypic and genetic divergence observed in our study was due to isolation between northern and southern populations on either side of a large mountain ridge. Both IBR and IBE explained most of the genetic and size differences across the whole study region, which can be attributed to restricted gene flow across this cold, dry mountain ridge, and also by environmental differences on either side of it (Fig. S5). Color differences between the northern transects 1 and 2 (red morph) and southern transects 3 and 4 (brown morph) were mainly explained by IBR caused by this mountain ridge (Table 4). The fact that an IBR or IBE model is supported over the IBD model tells us that either landscape resistance or environmental dissimilarities contribute to the genetic or phenotypic patterns analyzed, in addition to topographically corrected distance (topodist). If ‘topodist’ is included in a selected IBR or IBE model, it suggests that even though ‘topodist’ is important, resistance or environmental differences also contribute to genetic or phenotypic variation. Some populations are relatively close to each other on either side of the ridge, but the ridge is above the elevational distribution of E. anthonyi, with temperatures and other environmental conditions likely acting as a resistance for movement (IBR; Table 4; Fig. S5). As a result, on the northern side of the ridge, red morphs are found, whereas on the southern side, brown morphs are found. The most striking example are sites EA24 (red morph) and EA11 (brown morph), which are only 8.37 km apart (corrected for topography). As E. anthonyi inhabits humid lowland and cloud forest habitats, we predicted that its movement would be impeded by cold and dry environments, as observed. These results support the hypothesis that barriers to dispersal are important drivers of diversification in tropical mountains (Lynch and Duellman 1997; Guarnizo et al. 2009; Nali et al. 2020). However, we also found that phenotypic divergence was mainly affected by environmental differences in temperature related variables throughout the study area, showing the importance of temperature as a selective force driving divergence, as shown in our IBE models (also in Graham et al. 2004). These findings support the idea that divergent ecological selection can also cause diversification along elevational gradients (Keller and Seehausen 2012; Funk et al. 2016; Polato et al. 2018). Our results add to a growing body of literature indicating that strong divergent ecological selection can cause phenotypic divergence. In some cases, population phenotypic divergence can be followed by assortative mating, a reduction in gene flow, and eventually to speciation (e.g., Caro et al. 2013; Funk et al. 2016; Polato et al. 2018).

The analyses of the northern and southern transects separately revealed the two-fold influence by which environmental variation acts on genetic distance and phenotypic traits. On the one hand, landscape resistance between sites (IBR) reduces gene flow, while on the other hand, environmental differences among sites (IBE) affect phenotypic traits, likely due to divergent selection pressures. These results suggest that, besides IBD, IBR and IBE are important mechanisms acting concomitantly on population divergence, but they affect genetic and phenotypic divergence differently. We also found that topographic distance (IBD) plays an essential role in genetic and phenotypic divergence in northern transects, with some contribution of environmental dissimilarity only for phenotypic traits. In southern transects, environmental differences in annual mean temperature and precipitation seasonality explained genetic divergence, providing evidence for restricted gene flow perhaps due to adaptive phenotypic divergence in these or in other traits than the ones studied herein (Funk and Murphy 2010; for further discussion, see ‘Evidence for incipient ecological speciation?’ section below). Given that southern transects showed less phenotypic variation than northern ones, particularly in color where no significant variables could predict low levels of variation, exploring other traits (e.g., thermal biology or reproductive traits) could provide further insights into the mechanisms of population divergence in these populations.

We found variation among the environmental variables selected for different regions and either for genetic or phenotypic divergence. Previous studies have also shown variation in environmental variables and connectivity patterns within the same region or within the same species (Funk et al. 2005; Robertson et al. 2018; García-Rodríguez et al. 2021). This suggests that specific landscape conditions might affect populations differently, probably due to local adaptation. In some cases, favorable environments might facilitate dispersal between populations, although unfavorable environments could increase dispersal too. If individuals were to move more quickly through unfavorable environments, then that variable would be significant, but have a negative beta coefficient in our models (Table 4).

Several studies in poison frogs have explored various types of selection underlying striking patterns of phenotypic variation (Wang and Summers 2010; Roland et al. 2017; Márquez et al. 2020). The best understood cause of ecologically based divergent selection involves environmental differences in climate and habitat structure. In the Oophaga clade of poison frogs, for example, variation in the climatic niche seems to act as a strong selective force underlying phenotypic variation (Posso-Terranova and Andrés 2016). Populations of E. anthonyi in the northern transects show an increase in size at higher elevations, a pattern found in many other species (Morrison and Hero 2003). Size and conspicuousness in poison frogs are positively correlated with advertising their toxicity to predators (Santos and Cannatella 2011; Márquez et al. 2020). Populations at higher elevations are more isolated, which could allow genetic drift to facilitate phenotypic divergence in these highland populations (e.g., Rojas et al. 2020). Other studies in poison frogs have shown that biotic factors such as ecological interactions with conspecifics (Wang and Summers 2010), or mimicry of related sympatric species, are also important (Twomey et al. 2016). Species community composition could also explain phenotypic differences through selective pressures due to diet or predation (e.g., Noonan and Comeault 2009; Willink et al. 2014; Dreher et al. 2015; Prates et al. 2019). Phenotypic variation in size and color observed here could also be due to sexual selection (Summers et al. 1999; Maan and Cummings 2009; Galeano and Harms 2016). Further exploration of biotic interactions in E. anthonyi could reveal their relative importance on processes of population divergence.

Correlative studies between genetic and phenotypic divergence by themselves have limited inferential power for drawing causal inferences regarding the mechanisms responsible for the observed patterns of genetic and phenotypic divergence. However, landscape genetics studies can be designed specifically to tease apart these relationships and their directionality, as genetic divergence cannot cause differences in environmental factors such as climate (Räsänen and Hendry 2008; Funk and Murphy 2010; Zamudio et al. 2016). We show here that simultaneously testing the roles of topographic distance, resistance to movement, and environmental selection on patterns of both genetic and phenotypic divergence can help us obtain a more complete picture of the factors promoting population divergence and the underlying mechanisms than studies that solely analyze genetic differentiation.

Evidence for incipient ecological speciation?

In the southern transects, we found that environmental differences in annual mean temperature and precipitation seasonality explained a large proportion of variation in genetic divergence (i.e., IBE; Table 4). This could happen if phenotypic divergence, caused by the environmental conditions, has in turn restricted gene flow, which would be consistent with the early stages of ecological speciation. We know that individuals from high and low elevations can interbreed at least in transect 1 (MIP, unpubl. data). However, we do not know yet if there is assortative mating such that frogs prefer to mate with individuals from their own population, or if there is variation in offspring viability and/or fertility. The striking differences in patterns of phenotypic variation between northern and southern transects despite similar amounts of gene flow suggest that phenotypic divergence can potentially be driven by different processes within the same species. Nonetheless, more evidence is needed before we can conclude if ecological speciation is at initial stages in this system.

The advance of genomics provides an excellent opportunity to address questions across many fields, including phenotypic evolution, ecological and landscape genomics, speciation, and conservation (Savolainen et al. 2013). One of the promises of genomics is the identification of loci that are possible targets of local (or clinal) adaptation without a priori information on the identity of such loci (Allendorf 2017; Savolainen et al. 2013). With the identification of putative loci under selection, it is now possible to make powerful inferences regarding the genetic basis of adaptive evolution, and the environmental factors affecting these processes. With the addition of genomic data in this system, we could test the role of the environmental variation in causing divergent selection at specific loci associated with phenotypic divergence in traits studied herein, in addition to other traits. Combined, detection of loci under selection, and identification of environmental variables causing selection, would allow determination of whether observed patterns of divergence are due to genetically based adaptation and/or plasticity.

Conservation implications

Effective conservation requires knowledge of dispersal and gene flow among populations, as well as knowledge of the factors to which species are most sensitive (Crandall et al. 2000; Funk et al. 2012). Our findings of phenotypic divergence due to environmental differences at varying elevations adds to growing evidence that elevational gradients are indeed engines of biodiversity and should receive high conservation priority (Keller et al. 2013; Funk et al. 2016). Greater isolation of high elevation populations compared to low elevation populations can reduce gene flow and hence increase genetic divergence and reduce genetic variation (Funk et al. 2005). As a result, high elevation populations might be more vulnerable to changing climate and habitat conditions (Crandall et al. 2000; Hoffman and Sgrò 2011). Even in cases where gene flow is known to occur among populations, caution is recommended, as adaptive divergence could be determined by loci under divergent selection that might not be reflected by patterns at neutral loci (Funk et al. 2012; Shafer et al. 2015). Although E. anthonyi is a common species of poison frog, it shows sensitivity to subtle environmental changes in temperature, precipitation, and vegetation, which raises the question of how vulnerable other rarer tropical montane frogs are to climate change and habitat transformation (e.g., Pintanel et al. 2019). It might be the case that rare species with highly restricted dispersal and gene flow might be even more susceptible to environmental variation. Interestingly, factors explaining patterns of phenotypic and genetic variation can vary at the intraspecific level, which should be considered when attempting to generalize conservation measures across species and populations (Funk et al. 2012). Further studies across taxa are necessary to understand the impact of environmental variation on evolutionary trajectories of species and their persistence.