- R 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| 01_data_preprocessing_phyloseq.R | ||
| 02_alpha_diversity_pH_correlation.R | ||
| 03_betadiv_analyses.R | ||
| 04_extract_min_pH_biooracle_projections.R | ||
| 05_extract_mean_pH_biooracle_projections.R | ||
| 06_visualization.R | ||
| 07_sensitivity_tests.R | ||
| README.md | ||
morpho_fun_trait_forams
This repo contains the R scripts used to run the analysis and figures presented in the manuscript "Ocean acidification pushes Mediterranean marine calcifiers toward a tipping point"
Scripts
01_data_preprocessing_phyloseq.R
Prepares and formats ASV community data using the phyloseq package. Steps include importing raw OTU/ASV tables, metadata integration to generate phyloseq object, and performing rarefaction. The script also calculates alpha diversity metrics and applies CLR (centered log-ratio) transformation.
02_alpha_diversity_pH_correlation.R
Assesses the Spearman correlation between alpha diversity indices and pH levels.
03_betadiv_analyses.R
Performs beta diversity analyses, including PCoA, hierarchical clustering, and BIOENV.
04_extract_min_pH_biooracle_projections.R
Extracts minimum projected pH values from Bio-ORACLE environmental datasets under future climate scenarios.
05_extract_mean_pH_biooracle_projections.R
Extracts mean projected pH values from Bio-ORACLE environmental datasets under future climate scenarios.
06_visualization.R
Generates final figures for the manuscript.
07_sensitivity_tests.R
Robustness checks raised during peer review: (1) whether the calcareous-ASV cluster pattern holds when the two lowest taxonomic-resolution stations are excluded, and (2) whether the projected pH threshold-crossing is robust to inter-model (CMIP6 ensemble) disagreement in the Bio-ORACLE v3.0 projections.
Data
Running these scripts requires the following raw input files, placed as shown relative to the repo root:
asv_table.csv— raw ASV/OTU table with taxonomy and shell-type annotations (input to script 01)data/metadata.csv— sample site metadata (coordinates, pH, transect)data/morph_data/morph_counts.csv— morphological trait counts used in script 06
All other data/*.RDS files are intermediate outputs generated by the scripts above and do not need to be supplied separately.
Raw data files are archived on Figshare: https://doi.org/10.6084/m9.figshare.29627216