DOI: 10.5061/dryad.d2547d7zp
title: Data from: Modeling multilocus selection in an individual-based, spatially-explicit landscape genetics framework

description: We implemented multilocus selection in a spatially-explicit,
 individual-based framework that enables multivariate environmental
 gradients to drive selection in many loci as a new module for the
 landscape genetics programs, CDPOP and CDMetaPOP. Our module simulates
 multilocus selection using a linear additive model, providing a flexible
 platform to evaluate a wide range of genotype-environment associations.
 Importantly, the module allows simulation of selection in any number of
 loci under the influence of any number of environmental variables. We
 validated the module with individual-based selection simulations under
 Wright-Fisher assumptions (Figure 3 and data provided here). We
 then evaluated results for simulations under a simple landscape selection
 model (Figure 4 and data provided here). Next, we simulated
 individual-based multilocus selection across a complex selection landscape
 with three loci linked to three different environmental variables (Figure
 5 and data provided here). Finally, we demonstrated how the program can be
 used to simulate multilocus selection under varying selection strengths
 across different levels of gene flow in a landscape genetics framework
 (Figure 6 and data provided here). This new module provides a valuable
 addition to the study of landscape genetics, allowing for explicit
 evaluation of the contributions and interactions between gene flow and
 selection-driven processes across complex, multivariate environmental and
 landscape conditions.
description: Simulated datasets are provided for Figures 3-6 of the
 manuscript.  <strong>Figure 3</strong>: The
 simulations for the single (A) and double (B) diallelic locus selection
 models. For the single diallelic locus selection model, we used
 <i>F = </i> <i>X</i>
 <sub><i><sub>1</sub></i></sub>
 <i>([b</i>
 <sub><i><sub>111</sub></i></sub>
 <i>A</i>
 <sub><i><sub>111</sub></i></sub>
 <i>+</i> <i>b</i>
 <sub><i><sub>112</sub></i></sub>
 <i>A</i>
 <sub><i><sub>112</sub></i></sub>
 <i>])</i>, and set the average effects,
 <i>b<sub>111</sub></i> = 10 and
 <i>b<sub>112</sub></i> = -10. For the double
 diallelic locus selection model, we used <i>F = </i>
 <i>X</i>
 <sub><i><sub>1</sub></i></sub>
 <i>([b</i>
 <sub><i><sub>111</sub></i></sub>
 <i>A</i>
 <sub><i><sub>111</sub></i></sub>
 <i>+</i> <i>b</i>
 <sub><i><sub>112</sub></i></sub>
 <i>A</i>
 <sub><i><sub>112</sub></i></sub>
 <i>]+[</i> <i>b</i>
 <sub><i><sub>121</sub></i></sub>
 <i>A</i>
 <sub><i><sub>121</sub></i></sub>
 <i>+</i> <i>b</i>
 <sub><i><sub>122</sub></i></sub>
 <i>A</i>
 <sub><i><sub>122</sub></i></sub>
 <i>])</i>, and set set
 <i>b<sub>111</sub></i> = 10,
 <i>b<sub>112</sub></i> = -10,
 <i>b<sub>121</sub></i> = 10, and
 <i>b<sub>122</sub></i> = -10.
 <i>X<sub>1</sub></i> was a uniform spatial
 selection surface with all values of 1. Each simulated dataset contains 50
 replicates. For both the single and double diallelic locus selection model
 simulations, the Wright-Fisher model was assumed (i.e., random mating,
 sexual reproduction with both female and male with replacement, offspring
 randomly disperse until a constant population is reached that has an equal
 sex ratio, no mutation, and non-overlapping generations) with one
 exception: each mated pair produced 2 offspring to ensure a constant
 population size. We simulated individual genetic exchange across 100
 non-overlapping generations among 1000 randomly spatially located
 individuals in a 1024 x 1024 gridded landscape for each selection model.
 All simulated populations contained an additional 50 diallelic neutral
 loci. <strong>Figure 4</strong>: Three
 simulation datasets of a single spatially-variable selection landscape and
 single diallelic locus. These datasets were produced with the same
 simulation parameters as in Figure 3's datasets, but replacing the
 uniform spatial seelction surface with a spatially-variable seelction
 surface. Using a 1024 x 1024 gridded raster, we created a categorical
 landscape that included an upper triangle with values of 1, a lower
 triangle with values of -1, and diagonal cells with a value of 0. The
 three simulated datasets varied how the genotypes are initialized by
 starting the simulations with (i) only <i>AA</i>, (ii) only
 <i>aa</i>, and (iii) random assignment. 50 replicates are
 included in each dataset. <strong>Figure
 5</strong>: Simulation dataset of a complex landscape and three
 loci. These data considered three environmental variables that affect
 fitness as shown in Figure 1 of the manuscrip, with three loci and two
 alleles per locus operating in the selection process. The first
 environmental variable was the previously described categorical landscape
 used for datasets in Figure 4.. The second environmental variable was a
 gradient landscape with continuous values ranging from 1 to -1 from the
 North-South. The third environmental variable represented a fragmented
 landscape with equal proportion of values for 1 (e.g., favored habitat)
 and -1 (e.g., non-favored habitat) created in the program QRULE. For
 simplicity, we set <i>b<sub>111</sub></i> = 10 and
 <i>b<sub>112</sub></i> = -10 for the first locus
 and environmental variable, X<sub>1</sub>,
 <i>b<sub>221 </sub></i>= 10 and
 <i>b<sub>222</sub></i> = -10 for the second locus
 and environmental variable, X<sub>2</sub>, and
 <i>b<sub>331 </sub></i>= 10 and
 <i>b<sub>332</sub></i> = -10 for the third locus
 and environmental variable, X<sub>3</sub>, where
 X<sub>1</sub>, X<sub>2</sub>, and
 X<sub>3</sub> are the diagonal, gradient, and habitat
 variables shown in Figure 1, respectively. The remaining betas were set to
 0. Unlike the previous panmictic movement simulations, we restricted
 movement of the individuals in these simulations to follow an
 inverse-square probability function constrained to a 25% maximum threshold
 of the entire landscape. We initialized all genotypes randomly at the
 start of the simulations. 3 replicates are included.
 <strong>Figure 6</strong>: Multilocus selection
 simulations under three selection strengths (strong, moderate, and weak)
 and three dispersal scenarios (5%, 10%, and 15% of the landscape). These
 simulations include 1000 loci with two alleles per locus: 100 loci under
 selection in response to a single environmental variable and 900 neutral
 loci. We used a gradient landscape with continuous values ranging from 1
 to -1 from the North-South. We set the first <i>l = </i>1, 2,
 …, 20 loci effect sizes to <i>b<sub>1l1</sub></i>
 = 0.15 and <i>b<sub>1l2</sub></i> = -0.15, the
 following <i>l = </i>21, 22, …, 50 loci effect sizes to
 <i>b<sub>1l1</sub></i> = 0.10 and
 <i>b<sub>1l2</sub></i> = -0.10, and the last
 <i>l </i>= 51, 52, …, 100 loci effect sizes to
 <i>b<sub>1l1</sub></i> = 0.05 and
 <i>b<sub>1l2</sub></i> = -0.05 (reflecting
 “strong” [n=20], “moderate” [n=30], and “weak” [n=50] selection,
 respectively). We increased the population size to 5000 for these
 simulations within the same previous 1024 x1024 simulation landscape. We
 restricted movement of the individuals in these final simulations to
 follow an inverse-square probability function constrained to 5%, 10%, and
 15% maximum threshold of the entire landscape. We initialized all
 genotypes randomly at the start of the simulations and ran the simulations
 for 200 generations, using the first 100 generations as a ‘burn-in’ period
 where no selection was operating.
description: CDPOP individual files are included in folders (e.g.,
 batchrun0mcrun0), and labeled grid0.csv,..., grid{final time}.csv. Within
 each grid{time}.csv file, includes many field identifies (X,Y, age, sex,
 and genotypes, etc.). For more information on the format of these files,
 please refer to the CDPOP usermanual found at
 github.com/ComputationalEcologyLab/CDPOP/docs.