Data and code from: Extremely fine-scale soil heterogeneity in a rare serpentine endemic plant shapes patterns of genetic diversity
Data files
Mar 27, 2026 version files 5.15 MB
-
CATI__PCA_Code.R
5.47 KB
-
cati_rda.R
10.82 KB
-
CATIgind.RData
5.09 MB
-
GDM_script.R
6.26 KB
-
lat_long_r.csv
753 B
-
mantel_tests.R
4.37 KB
-
README.md
5.88 KB
-
Sample_map.qmd
12.12 KB
-
soil_covariance.qmd
4.64 KB
-
Soil_NMDS.R
2.96 KB
-
soils_r.csv
5.57 KB
-
Spatial_Distances_Histogram.R
1.06 KB
Abstract
Studies of population genetic structure are typically conducted at the scale of species distributions and encompass large distances and substantial environmental variation. However, population genetic structure could also be present in species with highly restricted global distributions, such as habitat specialists with threatened or vulnerable conservation status. For these organisms, low dispersal distances coupled with fine-scale environmental heterogeneity could influence population genetic composition, potentially creating spatial genetic structure and genotype by environment associations. Here we use the serpentine endemic plant Calochortus tiburonensis, with a global distribution of 160 ha, to evaluate whether fine-scale structure in soil composition and low seed dispersal distances result in the development of population genetic structure. We paired soil elemental analysis with a RAD-seq SNP dataset for 24 C. tiburonensis individuals. Although no population structure was detected between C. tiburonensis sampling locations, multiple analyses identified associations between soil composition and genetic distance between individuals. This included associations with nickel and magnesium, two elements that were expected a priori to impact plant fitness in serpentine landscapes. However, redundancy analyses and a generalized dissimilarity model both suggest that total soil variation better explains differences in genetic composition between individuals, implying that selection from the holistic soil environment has a role in matching plant genotypes to the microenvironment. Our results indicate that fine-scale environmental heterogeneity could influence genetic differences between individuals in plant populations, even in the absence of population genetic structure. Additionally, these associations between genetic composition and fine-scale environmental heterogeneity implicate extremely fine-scale environmental heterogeneity as an essential mechanism for preserving genetic variation, particularly within range-limited species.
Dataset DOI: 10.5061/dryad.t4b8gtjgs
Description of the data and file structure
Code and data for "Extremely fine-scale soil heterogeneity in a rare serpentine endemic plant shapes patterns of genetic diversity"
This repository contains scripts and input files used in the analysis for the manuscript titled, "Extremely fine-scale soil heterogeneity in a rare serpentine endemic plant shapes patterns of genetic diversity", which is on biorxiv here and will be submitted to Ecology and Evolution shortly.
Contents:
code:
GDM_script.r - code for the Generalized Dissimilarity Model analysis
CATI_PCA_Code.r - code for the performing PCA on C. tiburonensis SNP data with visualization
cati_rda.r - code for the performing Redundancy Analysis on C. tiburonensis SNP dataset with soil variation, with output visualization
Sample_map.qmd - code for generating Figure 1, the sample map with example soil chemistry plots. This file can be opened in R studio.
mantel_tests.R - code for running the Mantel tests
soil_covariance.qmd - code for generating soil covariances and covariance matrix plots. This file can be opened in R studio.
Soil_NMDS.R - code for generating soil NMDS plot
Spatial Distances Histogram.R - code for generating a histogram of pairwise intra-plant distances
data:
CATIgind.Rdata - genind file with RADseq data for the analyses saved as a .Rdata file
lat_long_r.csv - coordinates of the sample collection locations for generating the sample map
soils_r.csv - soil chemistry data for all sample collection locations
soils_complete.csv - soil chemistry data for all sample collection locations
Files and variables
File: GDM_script.R
Description: code for the Generalized Dissimilarity Model analysis
File: CATI__PCA_Code.R
Description: code for the performing PCA on C. tiburonensis SNP data with visualization
File: Spatial_Distances_Histogram.R
Description: code for generating a histogram of intra-plant distances
File: soil_covariance.qmd
Description: code for generating soil covariances and covariance matrix plots. This file can be opened in R studio.
File: cati_rda.R
Description: code for the performing Redundancy Analysis on C. tiburonensis SNP dataset with soil variation, with output visualization
File: Sample_map.qmd
Description: code for generating Figure 1, the sample map with example soil chemistry plots. This file can be opened in R studio.
File: Soil_NMDS.R
Description: code for generating soil NMDS plot
File: soils_r.csv
Description: soil chemistry data for all sample collection locations
Variables
- plantID: Number given to differentiate plant samples
- population: Area that the individual plant was sampled from
- plotID: The corresponding demography plot (not presented with this study) that the plant was sampled from
- moisture: Measured percent soil moisture (note, we do not expect that the moisture values here represent the soil moisture in the field)
- pH: Measured soil pH
- organic_matter: Total soil organic matter content (mg/Kg)
- aluminum: Total soil aluminum content (mg/Kg)
- Arsenic: Total soil arsenic content (mg/Kg)
- Boron: Total soil boron content (mg/Kg)
- Barium: Total soil barium content (mg/Kg)
- Calcium: Total soil calcium content (mg/Kg)
- Cadmium: Total soil cadmium content (mg/Kg)
- Cobalt: Total soil cobalt content (mg/Kg)
- Chromium: Total soil chromium content (mg/Kg)
- Copper: Total soil copper content (mg/Kg)
- Iron: Total soil iron content (mg/Kg)
- Potassium: Total soil potassium content (mg/Kg)
- Magnesium: Total soil magnesium content (mg/Kg)
- Manganese: Total soil manganese content (mg/Kg)
- Sodium: Total soil sodium content (mg/Kg)
- Nickel: Total soil nickel content (mg/Kg)
- Phosphorus: Total soil phosphorus content (mg/Kg)
- Lead: Total soil lead content (mg/Kg)
- Sulfur: Total soil sulfur content (mg/Kg)
- Selenium: Total soil selenium content (mg/Kg)
- Silicon: Total soil silicon content (mg/Kg)
- Strontium: Total soil strontium content (mg/Kg)
- Zinc: Total soil zinc content (mg/Kg)
- NH4-N: Total soil ammonium content (mg/Kg)
- NO3_NO2: Total soil nitrate content (mg/Kg)
- Ca_Mg_Ratio: The ratio of calcium to magnesium in the sample (ppm ratio)
File: mantel_tests.R
Description: code for running the Mantel tests
File: lat_long_r.csv
Description: coordinates of the sample collection locations for generating the sample map
Variables
- ID: Number given to differentiate plant samples
- Patch: Area that the individual plant was sampled from. FG: Fern Gulch, SQ: San Quentin, PR: Petroglyph Rock, Ca: Granada, WR: Westward Ridge, Ta: Taylor.
- Lat_dd: GPS latitude of the sampled plant, in decimal degrees
- Long_dd: GPS longitude of the sampled plant, in decimal degrees
File: CATIgind.RData
Description: genind file with RADseq data for the analyses saved as a .Rdata file
Code/software
This code is written for R.
The packages required for individual analyses are included in the code.
The following packages are required to run the full set of analyses:
vegan
adegenet
poppr
distances
geosphere
readr
factoextra
gdm
viridis
ggplot2
ggfortify
ggnewscale
dplyr
patchwork
sf
rnaturalearth
elevatr
raster
cowplot
ggspatial
Access information
Other publicly accessible locations of the data:
Data was derived from the following sources:
- n/a
