Mantel test and isolation by distance
A mantel test was performed to determine if geographic distance and genetic distance are correlated. This determines if there is isolation by distance. A distance matrix for the sampling localities was constructed by determining the distance between each set of coordinates using the online tool, Movable Type Scripts: Calculate distance, bearing and more between Latitude/Longitude points (Available at: https://www.movable-type.co.uk/scripts/latlong.html) . This tool uses the haversine formula to calculate the distance between coordinate pairs . A distance matrix was constructed from the pairwise genetic distance for the CO1 dataset (as this is the most complete dataset) using Mega 7 .
The Mantel test was conducted for two different datasets in R (R Core Team, 2017), using the packages ‘Ade4’ (Dray et al., 2018) and ‘vegan’ (Oksanen et al., 2019) and were both run for 10,000 permutations. First was to determine if there is genetic isolation for each locality, this thus included the 48 localities for which CO1 data is available and one representative sequence per locality, in their respective distance matrix. The second test was to test if there is isolation by distance across the various species, for this, localities which were at the edges of the species distribution were chosen across the various species. The specimens used are available in Table S7.