Individual-based simulations of genome evolution and ancestry: the GENOMEADMIXR R package
Janzen, Thijs; Diaz, Fernando (2021), Individual-based simulations of genome evolution and ancestry: the GENOMEADMIXR R package, Dryad, Dataset, https://doi.org/10.5061/dryad.sqv9s4n3q
Hybridization between populations or species results in a mosaic of the two parental genomes. This and other types of genome admixture have received increasing attention for their implications in speciation, human evolution, Evolve and Resequence (E&R) and genetic mapping. However, a thorough understanding of how local ancestry changes after admixture, and how selection affects patterns of local ancestry remains elusive. The complexity of these questions limits analytical treatment, but these scenarios are specifically suitable for simulation.
Here, we present the R package GenomeAdmixR, which uses an individual-based model to simulate genomic patterns following admixture forward in time. GenomeAdmixR provides user-friendly functions to set up and analyze simulations under evolutionary scenarios with selection, linkage and migration.
We show the flexible functionality of the GenomeAdmixR workflow by demonstrating 1) how to design an E&R simulation using GenomeAdmixR and 2) how to use GenomeAdmixR to verify analytical expectations following from the theory of junctions.
GenomeAdmixR provides a mechanistic approach to explore expected genome responses to realistic admixture scenarios. With this package, we aim to aid researchers in testing specific hypotheses based on empirical findings involving admixing populations.
Included here is the code used to create figures 2 and 3 in the main text, but also code to reproduce the two examples (E&R and junctions) in the main text. Furthermore, we have included the R package GenomeAdmixR as tar ball.
- the file Supplementary Material 2.1 includes all the supplementary analysis as referred to in the main text.
- the R scripts Figure_2_ancestry.R and Figure_2_sequence.R perform the simulations necessary for Figure 2 and generate the required plots.
- the R script code_figure_3.R re-creates figure 3.
- The R script scripts_figure_4.R re-creates the E&R scenario, and explores both models. At the end of the script, the figures used in Figure 3 in the main text are created.
- The zip file 'Junctions.zip' contains 1) code to simulate many replicates for all parameter values used (simulate_data.R) and 2) code to create Figure 4 in the main text (plot_figure.R), which uses the files created by simulate_data.R