2.5 Contemporary migration and genetic diversity
We visualized spatial patterns of gene flow and genetic diversity in each of our three data sets using EEMS (Estimated Effective Migration Surfaces), an approach that uses a population genetic model to compare effective migration rates to expected genetic dissimilarity in order to identify regions where genetic similarity decays more quickly than expected under a model of isolation-by-distance (Petkova, Novembre, & Stephens, 2016). We converted our filtered stacks output to the correct bed filetype using PLINK (Chang et al., 2015), and created a dissimilarity matrix using the BED2DIFFS program in the EEMS package (Petkova et al., 2016). The outer coordinate file was generated in QGIS v. 3.4 (QGIS Development Team, 2020). We ran the RUNEEMS_SNPS script under several deme sizes (400, 600 and 1000). For each data set, each deme was run for three independent analyses with an MCMC length of 2,000,000 generations, a burn-in of 1,000,000 generations and a thinning interval of 9999 (Petkova et al., 2016). The results were combined, checked for convergence through a visual examination of the trace files, and plotted using the REEMSPLOTS R package (Petkova et al., 2016).