Generating continuous maps of genetic diversity using moving windows - Anusha P. Bishop; E. Anne Chambers; Ian J. Wang (Methods in Ecology and Evolution, 2023)
Abstract Genetic diversity plays a key role in maintaining population viability by preventing inbreeding depression and providing the building blocks for adaptation. Understanding how genetic diversity varies across space is, therefore, of key interest in conservation and population genetics. Here, we introduce wingen, an r package for calculating continuous maps of genetic diversity, including nucleotide diversity, allelic richness, and heterozygosity, from standard genotypic and spatial data using a spatial moving window approach. We provide functions to account for variation in sample size across space using rarefaction, to create kriging‐interpolated maps of genetic diversity, and to mask any areas that are outside the area of interest. Tests with simulated and empirical datasets demonstrate that wingen can successfully capture variation in genetic diversity across landscapes from both reduced‐representation and whole genome sequencing datasets. For reduced‐representation datasets, wingen's functions can be run easily on a standard laptop computer, and we provide options for parallelization to increase the efficiency of running larger whole genome datasets. wingen provides novel and computationally tractable tools for creating informative maps of genetic diversity with applications for conservation prioritization as well as population and landscape genetic analyses.