Rivers as barriers to gene flow: A comparative population genomic analysis using causal modeling
Data files
Aug 25, 2026 version files 3.36 MB
-
all_SEMs_organized.R
55.33 KB
-
Maag_et_al_2026_Original_Species_GPS.kmz
9.33 KB
-
making_SEM_variables.R
347.53 KB
-
README.md
4.74 KB
-
results.zip
2.94 MB
Abstract
Earth’s physiographic features shape the genetic evolution of organisms, but understanding how such features act as barriers to gene flow requires quantifying characteristics of both the barrier and the organism. Many barrier characteristics, however, are interdependent and not fully captured by traditional multivariate statistics. Here, we evaluate the use of directed acyclic (causal) graphs and structural equation modeling (SEM) to test the Riverine Barrier Hypothesis using 27 river-spanning population genomic datasets of terrestrial plants and animals associated with 24 rivers across the contiguous United States. These data were paired with seasonality, river width, and river discharge data. SEM analysis revealed patterns not captured by standard approaches. River width had a strong effect on population differentiation, with distinct direct and indirect effects for high and low dispersers. Results suggest a negative width-Fst relationship for low dispersers, which we interpret to be due to topographic context of higher elevation or bedrock-incised rivers. In contrast, high dispersers had a positive relationship, indicating wider rivers present a greater barrier to dispersal. The total effect of river discharge was negligible because its direct effects on population differentiation were canceled out by indirect effects on other river features. Overall, the best-fitting SEM explained 52% of population differentiation for low dispersers and 13% for high dispersers, consistent with the idea that high-dispersing species are less impacted from river barrier effects. This proof of concept shows the utility of causal graphs and SEM at modeling complex relationships between Earth’s physiographic features and the organisms that evolve with them.
Dataset DOI: 10.5061/dryad.s1rn8pkq5
Overview
This repository contains the data, scripts, and model result outputs associated with the analyses presented in the manuscript. The primary analyses consist of structural equation models (SEMs) implemented in R using the lavaan package, along with generalized linear models (GLMs) and bivariate plots. Input environmental and hydrological data were obtained from publicly available sources, including the United States Geological Survey (USGS) hydrology database as well as the genomic data from articles cited in the paper.
Description of the data and file structure
File: all_SEMs_organized.R
Description: Primary R script used to construct and fit all structural equation models reported in the manuscript.
Functions of this script include:
- Importing processed predictor and response variables.
- Specifying SEM structures.
- Fitting models using the lavaan package.
- Calculating model fit statistics and parameter estimates.
- Summarizing model outputs for downstream interpretation and visualization.
File: making_SEM_variables.R
Description: R script used to acquire and process and organize environmental predictor data into variables used for the SEM and GLM models.
Functions of this script include:
- Retrieving hydrological variables from the USGS hydrology database.
- Formatting and cleaning source data.
- Merging environmental datasets with biological sampling localities.
- Producing analysis-ready datasets used by the SEM and GLM workflows.
File: Maag_et_al_2026_Original_Species_GPS.kmz
Description: Google Earth KMZ file containing all geographic sampling localities used in this study.
The file includes:
- GPS coordinates for all sampling locations.
- Spatial representation of species occurrence records included in the analyses.
The KMZ file can be viewed using Google Earth or other GIS software that supports KMZ/KML formats or converted to other geospatial formats.
Archive: results.zip
Description: Compressed zip archive containing model outputs generated during analysis. Results are organized into folder by model name and most results are in .png form of table outputs.
The archive is organized hierarchically into nested folders and includes:
- Structural Equation Model results.
- Generalized Linear Model results.
- Model summaries.
- Parameter estimates.
- Fit statistics.
- Additional outputs generated during the analysis workflow.
Most SEM results were produced using the R package lavaan.
Access information
Publicly accessible Genomic data were used from:
- Myers EA, Xue AT, Gehara M, Cox CL, Davis Rabosky AR, Lemos-Espinal J, et al. Environmental heterogeneity and not vicariant biogeographic barriers generate community-wide population structure in desert-adapted snakes. Molecular Ecology, 2019;28:4535–4548. Portico. https://doi.org/10.1111/mec.15182
- Manthey JD, Tollis M, Lemmon AR, Moriarty Lemmon E, Boissinot S. Diversification in wild populations of the model organism Anolis carolinensis: a genome-wide phylogeographic investigation. Ecol Evol. 2016;6:8115–8125. https://doi.org/10.1002/ece3.2547
- Munshi-South J, Zolnik CP, Harris SE. Population genomics of the Anthropocene: urbanization is negatively associated with genome-wide variation in white-footed mouse populations. Evol Appl. 2016;9:546–564 https://doi.org/10.1111/eva.12357
- Shryock DF, Washburn LK, DeFalco LA, Esque TC. Harnessing landscape genomics to identify future climate resilient genotypes in a desert annual. Mol Ecol. 2021;30:698–717. https://doi.org/10.1111/mec.15672
- Gomez Quijano MJ, Gross BL, Etterson JR. Why do coastal seeds fail? Evidence of local adaptation of northern red oak (Quercus rubra) in Minnesota coastal forests -Genomics and Geospatial data. University of Minnesota.
- Friis G, Fandos G, Zellmer AJ, McCormack JE, Faircloth BC, Milá B. Genome-wide signals of drift and local adaptation during rapid lineage divergence in a songbird. Mol Ecol. 2018;27:5137–5153. https://doi.org/10.1111/mec.14946
Data was derived from the following sources:
- USGS National Water Information System (https://www.usgs.gov/tools/national-water-information-system-nwis-mapper)
- Google Earth and its GIS source data was used for river width measurements
