Partitioning genetic variation between population structure and climate
The percentage of variation explained by the joint effect of climate and population structure was calculated by subtracting their independent effects from the total variation explained. We performed a partial redundancy analysis (pRDA) to separate the effect of climate from that of population structure, calculating the genetic variation explained by each climate variable by conditioning its effect on the other variables. The significance of the models was tested using ANOVA with 1,000 permutations. To identify the climate variables that contributed most to adaptive variation, we performed pRDA on the set of loci identified as outliers. Finally, to identify the climate variable that was most strongly associated with variation at each outlier locus, we extracted loci scores from the separate pRDA for each climate variable and normalized these scores to a mean of zero and a unit variance. We then considered the climate variable with the highest absolute value to be the one with the strongest influence on that locus.