Eco-evolutionary dynamics of partially migratory metapopulations in spatially and seasonally varying environments
Data files
Mar 13, 2026 version files 113.57 KB
-
eco_evo_pmmps_Dryad.R
111.90 KB
-
README.md
1.66 KB
Abstract
Predicting joint population dynamic and evolutionary responses to environmental changes requires understanding interactions among environmentally induced phenotypic variation, selection, demography and genetic variation, and thereby predicting eco-evolutionary dynamics emerging across diverse temporal and spatial scales.
Partially migratory metapopulations (PMMPs) feature seasonal coexistence of resident and migrant individuals across multiple spatially distinct subpopulations. Such PMMPs have clear potential for complex spatio-seasonal eco-evolutionary dynamics because selection on migration impacts spatial population dynamics, which in turn shape the form and magnitude of selection, causing feedbacks with ongoing micro-evolution.
However, the key genetic and environmental conditions that maintain migratory polymorphisms, and emerging eco-evolutionary dynamics of PMMPs under stochastic environmental variation and strong seasonal perturbations, have not yet been characterised.
We present a general individual-based model that tracks eco-evolutionary dynamics in PMMPs inhabiting spatially structured, seasonally varying landscapes, with migration formulated as a quantitative genetic threshold trait. Simulations show that such genetic and landscape structures, which commonly occur in nature, can readily produce a variety of stable partially migratory systems given diverse regimes of spatio-seasonal environmental variation.
Typically, partial migration is maintained whenever sites differ in non-breeding season suitability resulting from variation in density-dependence, causing ‘ideal free’ non-breeding distributions where residents and migrants occur with frequencies that generate similar survival probabilities. Yet, stable partial migration can also arise without any fixed differences in non-breeding season density-dependence among sites, and even without density-dependence at all, through risk-spreading given sufficiently large stochastic environmental fluctuations among sites and years.
Further, major local non-breeding season mortality events, such as could result from extreme climatic events, can generate eco-evolutionary dynamics that ripple out to affect breeding and non-breeding season space use of subpopulations throughout the PMMP, on both short and longer timeframes. Such effects result from spatially divergent selection on both the occurrence and destination of migration.
Our model thus shows how facultative seasonal migration can act as a key mediator of eco-evolutionary dynamics in (meta)populations occupying spatially and seasonally structured environments, providing key steps towards predicting responses of natural partially migratory populations to ongoing changes in spatio-seasonal patterns of environmental variation.
https://doi.org/10.5061/dryad.1rn8pk12n
eco_evo_pmmps_Dryad.R : Code accompanying the manuscript "Eco-evolutionary dynamics of partially migratory metapopulations in spatially and seasonally varying environments".
Simulation program
The main simulation program begins on line 1067. It requires the preamble (chunk line 1-64) to be run before executing. It includes sensible defaults and so should run smoothly immediately. A list of arguments and outputs are provided above (from line 1006).
Simulation data
Simulation output must be saved either locally or to disk - see example on line 1460 & 1461. Before being used for plotting, simulation output needs to be converted to a stats file. This is done with the popstats function. Run the chunk "Functions for wrangling and plotting results" (line 66-871) first. Then take simulation output from local environment or disk (line 1466) and save the statsfile locally or to disk (line 1467).
Plotting
Plotting occurs using popplots function - see line 171 and arguments list above. Line 1492-1826 gives examples of code for plotting publication figures.
Individual-level databases
Detailed yearly data is collated into data file using functions create.alldb (line 881) and polish.alldb (line 899). This must be saved as a separate alldb file before using for analyses - see example line 1815. Evolutionary dynamics data file are created from alldb using function create.evoldyn - line 1832. See further examples of plotting after this.
The repository contains self-produced code.
