skip to main content
US FlagAn official website of the United States government
dot gov icon
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
https lock icon
Secure .gov websites use HTTPS
A lock ( lock ) or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.


Title: learnPopGen : An R package for population genetic simulation and numerical analysis
Abstract Here, I briefly present a new R package calledlearnPopGenthat has been designed primarily for the purposes of teaching evolutionary biology, population genetics, and evolutionary theory. Functions of the package can be used to conduct simulations and numerical analyses of a wide range of evolutionary phenomena that would typically be covered in advanced undergraduate through graduate‐level curricula in population genetics or evolution. For instance,learnPopGenfunctions can be used to visualize gene frequency changes through time under multiple deterministic and stochastic processes, to compute and animate the changes in phenotypic trait values or distributions under natural selection, to numerically analyze and graph the outcome of simple game theory models, and to plot coalescence within a population experiencing genetic drift, along with a number of other things. Functions have been designed to be maximally didactic and frequently employ compelling animated visualizations. Furthermore, it is straightforward to export plots and animations from R in the form of flat or animated graphics, or as videos. For maximum flexibility, students working with the package can run functions directly in R; however, instructors may choose to guide students less adept in the R environment to one of various web interfaces that I have built for a number of the functions of the package and that are already available online.  more » « less
Award ID(s):
1759940 1350474
PAR ID:
10461330
Author(s) / Creator(s):
 
Publisher / Repository:
Wiley Blackwell (John Wiley & Sons)
Date Published:
Journal Name:
Ecology and Evolution
Volume:
9
Issue:
14
ISSN:
2045-7758
Page Range / eLocation ID:
p. 7896-7902
Format(s):
Medium: X
Sponsoring Org:
National Science Foundation
More Like this
  1. Abstract “Evolve and resequence” (E&R) studies combine experimental evolution and whole‐genome sequencing to interrogate the genetics underlying adaptation. Due to ease of handling, E&R work with asexual organisms such as bacteria can employ optimized experimental design, with large experiments and many generations of selection. By contrast, E&R experiments with sexually reproducing organisms are more difficult to implement, and design parameters vary dramatically among studies. Thus, efforts have been made to assess how these differences, such as number of independent replicates, or size of experimental populations, impact inference. We add to this work by investigating the role of time sampling—the number of discrete time points sequence data are collected from evolving populations. Using data from an E&R experiment with outcrossingSaccharomyces cerevisiaein which populations were sequenced 17 times over ~540 generations, we address the following questions: (a) Do more time points improve the ability to identify candidate regions underlying selection? And (b) does high‐resolution sampling provide unique insight into evolutionary processes driving adaptation? We find that while time sampling does not improve the ability to identify candidate regions, high‐resolution sampling does provide valuable opportunities to characterize evolutionary dynamics. Increased time sampling reveals three distinct trajectories for adaptive alleles: one consistent with classic population genetic theory (i.e., models assuming constant selection coefficients), and two where trajectories suggest more context‐dependent responses (i.e., models involving dynamic selection coefficients). We conclude that while time sampling has limited impact on candidate region identification, sampling eight or more time points has clear benefits for studying complex evolutionary dynamics. 
    more » « less
  2. Abstract Earth's biosphere is undergoing drastic reorganization due to the sixth mass extinction brought on by the Anthropocene. Impacts of local and regional extirpation of species have been demonstrated to propagate through the complex interaction networks they are part of, leading to secondary extinctions and exacerbating biodiversity loss. Contemporary ecological theory has developed several measures to analyse the structure and robustness of ecological networks under biodiversity loss. However, a toolbox for directly simulating and quantifying extinction cascades and creating novel interactions (i.e. rewiring) remains absent.Here, we presentNetworkExtinction—a novel R package which we have developed to explore the propagation of species extinction sequences through ecological networks and quantify the effects of rewiring potential in response to primary species extinctions. WithNetworkExtinction, we integrate ecological theory and computational simulations to develop functionality with which users may analyse and visualize the structure and robustness of ecological networks. The core functions introduced withNetworkExtinctionfocus on simulations of sequential primary extinctions and associated secondary extinctions, allowing user‐specified secondary extinction thresholds and realization of rewiring potential.With the packageNetworkExtinction, users can estimate the robustness of ecological networks after performing species extinction routines based on several algorithms. Moreover, users can compare the number of simulated secondary extinctions against a null model of random extinctions. In‐built visualizations enable graphing topological indices calculated by the deletion sequence functions after each simulation step. Finally, the user can estimate the network's degree distribution by fitting different common distributions. Here, we illustrate the use of the package and its outputs by analysing a Chilean coastal marine food web.NetworkExtinctionis a compact and easy‐to‐use R package with which users can quantify changes in ecological network structure in response to different patterns of species loss, thresholds and rewiring potential. Therefore, this package is particularly useful for evaluating ecosystem responses to anthropogenic and environmental perturbations that produce nonrandom and sometimes targeted, species extinctions. 
    more » « less
  3. Abstract Plant trait data are used to quantify how plants respond to environmental factors and can act as indicators of ecosystem function. Measured trait values are influenced by genetics, trade‐offs, competition, environmental conditions, and phenology. These interacting effects on traits are poorly characterized across taxa, and for many traits, measurement protocols are not standardized. As a result, ancillary information about growth and measurement conditions can be highly variable, requiring a flexible data structure. In 2007, the TRY initiative was founded as an integrated database of plant trait data, including ancillary attributes relevant to understanding and interpreting the trait values. The TRY database now integrates around 700 original and collective datasets and has become a central resource of plant trait data. These data are provided in a generic long‐table format, where a unique identifier links different trait records and ancillary data measured on the same entity. Due to the high number of trait records, plant taxa, and types of traits and ancillary data released from the TRY database, data preprocessing is necessary but not straightforward. Here, we present the ‘rtry’ R package, specifically designed to support plant trait data exploration and filtering. By integrating a subset of existing R functions essential for preprocessing, ‘rtry’ avoids the need for users to navigate the extensive R ecosystem and provides the functions under a consistent syntax. ‘rtry’ is therefore easy to use even for beginners in R. Notably, ‘rtry’ does not support data retrieval or analysis; rather, it focuses on the preprocessing tasks to optimize data quality. While ‘rtry’ primarily targets TRY data, its utility extends to data from other sources, such as the National Ecological Observatory Network (NEON). The ‘rtry’ package is available on the Comprehensive R Archive Network (CRAN;https://cran.r‐project.org/package=rtry) and the GitHub Wiki (https://github.com/MPI‐BGC‐Functional‐Biogeography/rtry/wiki) along with comprehensive documentation and vignettes describing detailed data preprocessing workflows. 
    more » « less
  4. Grueber, Catherine E (Ed.)
    Abstract Landscape genomics can harness environmental and genetic data to inform conservation decisions by providing essential insights into how landscapes shape biodiversity. The massive increase in genetic data afforded by the genomic era provides exceptional resolution for answering critical conservation genetics questions. The accessibility of genomic data for non‐model systems has also enabled a shift away from population‐based sampling to individual‐based sampling, which now provides accurate and robust estimates of genetic variation that can be used to examine the spatial structure of genomic diversity, population connectivity and the nature of environmental adaptation. Nevertheless, the adoption of individual‐based sampling in conservation genetics has been slowed due, in large part, to concerns over how to apply methods developed for population‐based sampling to individual‐based sampling schemes. Here, we discuss the benefits of individual‐based sampling for conservation and describe how landscape genomic methods, paired with individual‐based sampling, can answer fundamental conservation questions. We have curated key landscape genomic methods into a user‐friendly, open‐source workflow, which we provide as a new R package, A Landscape Genomics Analysis Toolkit in R (algatr). Thealgatrpackage includes novel added functionality for all of the included methods and extensive vignettes designed with the primary goal of making landscape genomic approaches more accessible and explicitly applicable to conservation biology. 
    more » « less
  5. Abstract Invasive predatory species are frequently observed to cause evolutionary responses in prey phenotypes, which in turn may lead to evolutionary shifts in the population dynamics of prey. Research has provided a link between rates of predation and the evolution of prey population growth in the lab, but studies from natural populations are rare. Here, we tested for evolutionary changes in population dynamics parameters of zooplanktonDaphnia pulicariafollowing invasion by the predatorBythotrephes longimanusinto Lake Kegonsa, Wisconsin, US. We used a resurrection ecological approach, whereby clones from pre‐ and post‐invasive periods were hatched from eggs obtained in sediment cores and were used in a 3‐month growth experiment. Based on these data, we estimated intrinsic population growth rates (r), the shape of density dependence (θ) and carrying capacities (K) using theta‐logistic models. We found that post‐invasionDaphniamaintained a higherrandKunder these controlled, predation‐free laboratory conditions. Evidence for changes inθwas weaker. Whereas previous experimental evolution studies of predator–prey interactions have demonstrated that genotypes that have evolved under predation have inferior competitive ability when the predator is absent, this was not the case for theDaphnia. Given that our study was conducted in a laboratory environment and the possibility for genotype‐by‐environment interactions, extrapolating these apparent counterintuitive results to the wild should be done with caution. However, barring such complications, we discuss how selection for reduced predator exposure, either temporally or spatially, may have led to the observed changes. This scenario suggests that complexities in ecological interactions represents a challenge when predicting the evolutionary responses of population dynamics to changes in predation pressure in natural systems. 
    more » « less