Data and code from: Not just a matter of space: Integrating ecological niche modeling with genotype-environment associations suggests high maladaptation risks under climate change for a microendemic Malagasy frog
Data files
Jun 17, 2026 version files 679.42 MB
-
Dryad_Mbourgati.zip
679.40 MB
-
README.md
18.49 KB
Abstract
This dataset accompanies the manuscript submitted to Molecular Ecology and includes supporting files and scripts associated to the performed analyses. Specifically, the repository provides metadata related to raw RAD-seq sequencing reads (adapter and barcode files), SNP and occurrence datasets formatted as input files in isolation-by-distance tests and genotype–environment association (GEA) analyses. In addition, it contains R scripts for ecological niche models, dispersal simulations, Mantel test, and GEA analyses, as well as ancillary R functions used for figure generation and spatial projections. Together, and in combination with publicly available scripts and pipelines cited in the manuscript, these resources allow full reproducibility of the analyses described in the study.
This repository accompanies the raw RAD-seq data deposited in GenBank/SRA and provides the set of supporting input files and R scripts used in ecological niche modelling, dispersal simulations, isolation-by-distance tests, and genotype–environment association analyses.
Main folder: Dryad_Mbourgati.zip
ADAPTERS AND BARCODES (folder 01_Adapters_barcodes)
File: Adapters_barcodes.xlsx
- Contains the full list of adapters and barcode sequences used during library preparation.
- Barcoding scheme: Inline barcodes were used, present at the beginning of single-end reads.
- Processing note: In Stacks (process_radtags), these data correspond to the option --inline_null.
-The file is organized to allow unambiguous association of each barcode with its corresponding sample ID.
- Column explanation: Adapters (Adapter: adapter name; Sequence: adapter sequence). Barcodes (Barcode sequence: individual barcode sequence; Sample: individual sample names).
R CODE SCRIPTS FOR ECOLOGICAL NICHE MODELS, ISOLATION-BY-DISTANCE TEST, AND GENOMIC AND GENOTYPE–ENVIRONMENT ASSOCIATION ANALYSES (folder 03_R_scripts)
-Genomic input files are provided in folder 02_R_script_inputs/01_SNPs
-Occurrence and environmental datasets are provided in folder 02_R_script_inputs/02_Occurrence_environmental_data
-Other input files are provided in folder 02_R_script_inputs/03_Other_files
Ecological Niche Models
R code for niche modelling, dispersal simulation, and genetic-environment association analyses are provided in the following scripts.
1. Preparation of occurrence data and environmental variables for ENMs and GEA
File: 1_DATA_PREPARATION.R
- Imports and filters occurrence data
- Finds watershed boundaries for background point placement
- Generates spatially-weighted background points
- Prepares current and future environmental variables
- Checks predictor multicollinearity via Pearson's correlation coefficient
- Exports selected variables as GeoTIFF files
INPUT
File: Occurrences_M_bourgati_literature_plus_2018_expedition03.xlsx
- Input file containing occurrence records for Mantidactylus bourgati from literature data and the 2018 field expedition.
- Column explanation: Lat (latitude coordinates). Long (longitude coordinates).
File: dem_final.tif
- Digital elevation model used to correct coastal occurrence points, define watershed boundaries, and derive topographic predictors.
File: CHELSA*.tif files
- Raster files containing current bioclimatic variables used for ecological niche modelling are provided in the folder 02_R_script_inputs/05_Current_rasters
File: future*.tif files
- Raster files containing future bioclimatic variables used to generate ecological niche model projections.
- Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
2. Calibration of ENMs and spatial projections over current and future environmental variables
File: 2_MODEL_CALIBRATION.R
- Calibrates ENMs via the Ensemble of Small Models approach
- Assesses ENM predictive performance
- Calculates environmental variable contribution
- Projects ENM's suitability and binary predictions over current and future environmental variables
INPUT
File: ecospat.ESM.EnsembleModeling_fixed.R
- Modified R function used to replace the default ecospat ESM ensemble modelling function.
File: ecospat.ESM.Projection_fixed.R
- Modified R function used to replace the default ecospat ESM projection function.
File: ecospat.ESM.EnsembleProjection_fixed.R
- Modified R function used to replace the default ecospat ESM ensemble projection function.
File: OCC_DATA_FOR_CALIBRATION.gpkg
- Occurrence and background point dataset with associated climate predictors used to calibrate ecological niche models.
File: maxent.jarA A
- Java executable is required to run MAXENT models within the biomod2 ecological niche modelling workflow.
File: vars.tif
- Raster stack of current climate predictors used to project ecological niche models under current climatic conditions.
File: future*.tif files
- Raster files containing future bioclimatic variables used to generate ecological niche model projections.
- Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
3. Run of MigClim dispersal simulation tool
File: 3_MigClim.R
- Executes MigClim considering three alternative dispersal scenarios
INPUT
File: vars.tif
- Raster stack of current climate predictors used as a spatial mask for MigClim dispersal simulations.
File: current.tif
- Binary raster file containing current ecological niche model projections used to define initial habitat suitability.
File: OCC_DATA_FOR_CALIBRATION.gpkg
- Occurrence and background point dataset used to define the initial occupied area for dispersal simulations.
File: future*.tif
- Binary raster files containing 2070 ecological niche model projections were used as habitat suitability maps in MigClim dispersal simulations.
- Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
Testing for Isolation-By-Distance
4. Mantel test
File: 4_IBD.R
- Computes genetic and geographic distances among individuals and performs the Mantel test
- Outputs Kernel density plot
INPUT
File: Mantidactylus_bourgati.gen
· The file contains the SNP dataset generated after read processing, genotype calling, and filtering.
· Column explanation: Column 1 (individual sample names divided by predefined population). Column 2- (individual genotypes for each locus; each genotype expressed in one column). Missing data (0000).
· Row explanation: Row 1 (list of loci names); Row 2 (individual sample names and genotypes).
File: Mantidactylus_bourgati_occurrences.csv
· Input file with individual sampling coordinates in decimal degrees (WGS84).
· Column explanation: Sample (individual sample names). LONG (longitude coordinates). LAT (latitude coordinates).
Genotype–Environment Associations
5. Identification of adaptive units via cluster analysis and spatial projection over current and future environmental variables
File: 5_ADAPTIVE_UNITS_CREATION.R
- Identifies adaptive units from RDA
- Quantifies the relationship between adaptive units and environmental variables via Random Forest machine learning model
- Produces spatial projections of the relationship between adaptive units and environmental variables over current and future time
INPUT
Files: ancillary_create_adaptive_units.R
· R function to identify adaptive units
File: RDA_overlap.RData
· RDA model object calculated with vegan on the 58 SNP loci putatively under selection, used for adaptive unit clustering analyses
File: Mantidactylus_bourgati_full_env_data.csv
· The file contains extracted bioclimatic variable values for each sample used to identify adaptive units
· Column explanation: Sample (individual sample name). LONG (longitude coordinate expressed in decimal degrees (WGS84)). LAT (latitude coordinate expressed in decimal degrees (WGS84)). aspect (slope aspect, expressed in degrees clockwise from north). bio3 (Isothermality (°C)). bio4 (Temperature seasonality (°C/100)). bio7 (Temperature annual range (°C)). bio9 (Mean temperature of driest quarter (°C)). bio13 (Precipitation of wettest month (kg m-2 month-1)). bio14 (Precipitation of driest month (kg m-2 month-1)). flowdir (flow direction, unitless categorical variable encoded as powers of 2 according to the D8 neighborhood convention). slope (terrain slope, expressed in degrees)
File: vars.tif
· Raster stack of current climate predictors used to project ecological niche models under current climatic conditions.
Folder: PROJECTION_FUTURE/
· Folder containing raster files with future bioclimatic variables used to generate ecological niche model projections
- Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
6. Calculation of genetic offset between current and future environmental variables
File: 6_CALCULATE_GENETIC_OFFSET_RDA.R
- Calculates RDA-based genetic offset values and produces spatial projections under current and future time
INPUT
Files: ancillary_genetic_offset.R
· R function to calculate genetic offset
File: Params.tsv
· Parameter file containing the species name used to calculate RDA-based genetic offset.
File: Mantidactylus_bourgati_full_env_data.csv
· The file contains extracted bioclimatic variable values for each sample used to calculate RDA-based genetic offset
· Column explanation: Sample (individual sample name). LONG (longitude coordinate expressed in decimal degrees (WGS84)). LAT (latitude coordinate expressed in decimal degrees (WGS84)). aspect (slope aspect, expressed in degrees clockwise from north). bio3 (Isothermality (°C)). bio4 (Temperature seasonality (°C/100)). bio7 (Temperature annual range (°C)). bio9 (Mean temperature of driest quarter (°C)). bio13 (Precipitation of wettest month (kg m-2 month-1)). bio14 (Precipitation of driest month (kg m-2 month-1)). flowdir (flow direction, unitless categorical variable encoded as powers of 2 according to the D8 neighborhood convention). slope (terrain slope, expressed in degrees)
Files: Mantidactylus_bourgati.map Mantidactylus_bourgati.ped and Mantidactylus_bourgati.map
· The files contain the SNP dataset generated after read processing, genotype calling, and filtering.
· Column explanation for Mantidactylus_bourgati.map: Column 1 (population name code). Column 2 (individual sample names). Column 3-6 (metadata; no information included). Column 7- (individual genotypes for each locus; each genotype expressed on two columns). Missing data (0).
· Column explanation for Mantidactylus_bourgati.ped: Column 1 (locus genomic location code). Column 2 (locus name). Column 3 (genetic distance; unexpressed). Column 4 (physical position of SNP on locus).
File: Mantidactylus_bourgati_imp.geno
· Imputed genotype matrix used to calculate RDA-based genetic offset
· Rows represent individual samples and columns represent SNP loci
File: Mantidactylus_bourgati_adaptive_loci_validated_SHARED_LFMM_RDA_NO_SIM.txt
· List of SNPs putatively under selection, used to calculate RDA-based genetic offset
File: vars.tif
· Raster stack of current climate predictors used to project ecological niche models under current climatic conditions.
Folder: PROJECTION_FUTURE/
· Folder containing raster files with future bioclimatic variables used to generate ecological niche model projections
- Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
File: 7_GF_fitting.R
- Fits a Gradient Forest model to the set of 58 candidate SNPs using allele frequencies aggregated at the level of sampling units.
INPUT
File: gf_input_selected_snps.csv
· The file contains allele frequencies for the 58 candidate SNPs, aggregated across the 13 sampling units used for Gradient Forest analyses.
· Column explanation: Column 1 (names of SNPs putatively under selection). Column 2 (allele frequencies for the 13 sampling units). Abbreviation used (NA, Not available).
File: Mbourgati_envdata_GF_sep_pops.csv
· The file contains extracted bioclimatic variable values for the 13 sampling units
· Column explanation: pop_code_new (sampling unit codes). x (longitude coordinate expressed in decimal degrees (WGS84)). y (latitude coordinate expressed in decimal degrees (WGS84)). aspect (slope aspect, expressed in degrees clockwise from north). bio3 (Isothermality (°C)). bio4 (Temperature seasonality (°C/100)). bio7 (Temperature annual range (°C)). bio9 (Mean temperature of driest quarter (°C)). bio13 (Precipitation of wettest month (kg m-2 month-1)). bio14 (Precipitation of driest month (kg m-2 month-1)). slope (terrain slope, expressed in degrees).
File: 8_CALCULATE_GENETIC_OFFSET_GF.R
- Calculates Gradient Forest–based genetic offset values and produces spatial projections under current and future climate scenarios.
INPUT
File: gfMod_58SNPs_FULL_IMPUTED.rds
· Fitted Gradient Forest model generated by 7_GF_fitting.R and used to calculate Gradient Forest-based genetic offset
File: vars.tif
· Raster stack of current climate predictors used to project ecological niche models under current climatic conditions.
Folder: PROJECTION_FUTURE/
· Folder containing raster files with future bioclimatic variables used to generate ecological niche model projections
- Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
7. Merge of ENM, dispersal, adaptive unit, and genetic offset spatial projections. Calculation of summary statistics, MESS surface,s and manuscript figure creation
File: 9_SPATIAL_PROJECTION_MERGE.R
- Merges and intersects spatial projections of ENMs, dispersal, adaptive uni, ts and genetic offset
- Calculates summary statistics (e.g., total area) derived from spatial projections
- Calculates MESS surfaces to assess ENM extrapolation degree
- Creates figures for the manuscript
INPUT
File: vars.tif
- Raster stack of current climate predictors used as spatial mask and reference layer for projection summaries and MESS analyses.
File: PA_boundaries.gpkg
· Geopackage file containing the boundaries of the protected areas covering the study area extent.
File: dem_final.tif
- Digital elevation model used to generate topographic background layers and hillshade for map figures.
File: PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map.tif
- Copernicus land cover raster used as a background layer for map figure creation.
File: copernicus_land_cover_classes.xlsx
- Legend file containing land cover class codes, names, and colours used to classify and plot the Copernicus land cover raster.
- Column explanation: Map code (The numerical code identifying each land cover class). Land cover class (The full descriptive name of the land cover category, including canopy density and leaf type for forests). Short name (The abbreviated name used for simplified classification or mapping labels). color (The HEX color code associated with the class for visualization purposes).
File: OCC_DATA_FOR_CALIBRATION.gpkg
- Occurrence and background point dataset used to extract species presences and define the initial occupied area.
File: current.tif
- Binary raster file containing current ecological niche model projections used to define the present suitable habitat.
File: future*.tif
- Binary raster files containing 2070 ecological niche model projections were used to calculate range dynamics through time.
· Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
File: final.tif
- MigClim dispersal simulation output raster used to combine dispersal constraints with current and future habitat suitability.
- Due to its extensive spatial resolution and multi-layer format, the file size exceeds standard repository limits and cannot be provided.
File: GE*.tif
- Raster files containing RDA-based genomic offset projections are used to summarize genetic offset under future scenarios.
- Because they encompass high-density, pixel-by-pixel genomic predictions across multiple time horizons, these files exceed standard repository limits and cannot be provided.
File: AU*.tif
- Raster files containing current and future adaptive unit projections are used to summarize adaptive unit dynamics through time.
- The sheer volume of spatio-temporal data within these rasters results in heavy files that cannot be provided.
File: var_abbr.xlsx
- Table containing bioclimatic variable numbers and abbreviations used to label environmental predictors in RDA and variable-importance figures.
- Column explanation: Variable (Variable: the full name of the environmental or land cover variable). Abbreviation (Abbreviation: the short acronym or code used in the dataset files). Description (Description: a brief explanation of what the variable measures or represents). Unit (Unit: the measurement unit or percentage scale applied to the variable data).
File: RDA_total.Rdata
- RData file containing the RDA model fitted on the full SNP dataset and used for RDA ordination plotting.
File: species_full.Rdata
- RData file containing individual sample information and cluster assignments used to plot the full-data RDA ordination.
File: RDA_58_loci.RData
- RData file containing the RDA model fitted on the selected loci and used for RDA ordination plotting.
File: Adaptive_units.RData
- RData file containing adaptive unit clustering results and Random Forest variable-importance outputs used for figures and summaries.
File: vrs_current.tif
- Raster stacks of current environmental predictors are used to calculate MESS values for current projection scenarios.
File: future0*.tif
- Raster stacks of 2070 environmental predictors were used to calculate MESS values for future projection scenarios.
- Example files are provided in the folder 02_R_script_inputs/04_Example_future_tifs, corresponding to the 2071–2100 projection period, the GFDL-ESM4 global climate model, and the SSP5-8.5 climate scenario.
