Spatial and environmental association
Next, we used Mantel tests (Mantel, 1967; Legendre and Legendre, 2012) to test significance of correlations between genetic, geographic, environmental and connection distance matrices. For genetic distances, we used normalized pairwise genetic differentiation (F’ST/(1-F’ST) and p-distance. Geographic distance was calculated as minimum pairwise distances in meters between lakes using lake coordinates as input for thegeosphere package in R. Using averages of 1-5m measurements of the water quality, environmental distance was calculated as pairwise Euclidean distances between locations. Connection distance was calculated following the equations of Maas et al., (2018). Mantel’s tests were run with 10,000 permutations using vegan in R. We verified the absence of autocorrelation between geographic, connection and environmental distances using Mantel’s tests. Finally, Spearman correlation tests were performed for within-population diversity indices with temperature, salinity, connection and lake area. Correlations of r ≥ 0.5 were considered strong, and alpha was set to 0.05.