Loading...
Loading...
Contributors:
Dataset URI:
10.5281/zenodo.23920328Diversity-Plankton.R README: Functional Diversity Analyses in Synechococcus Communities Under Environmental Stress Overview This repository contains the final analyses used in the manuscript examining how functional diversity influences the growth, recovery, and temporal dynamics of experimental Synechococcus communities exposed to environmental stressors. The script quantifies relationships between both initial functional diversity (before stress exposure) and assembled functional diversity (after community assembly) with ecological responses including community growth, recovery, and changes in functional diversity through time. All analyses presented in the main text and supplementary materials are generated from this workflow. Study Objective The analyses test whether variation in functional diversity predicts the performance and resilience of microbial communities under four environmental treatments: Control Atrazine Heating Heating + Atrazine Specifically, the script evaluates whether: Initial functional diversity promotes community growth during the disturbance phase. Assembled functional diversity promotes recovery following disturbance. Functional diversity changes in response to environmental stress. The strength and direction of functional diversity effects depend on species richness and treatment context. Input Data Required files File Description all-data-with-diversity.rds Full experimental dataset containing strain composition, species composition, trait information, and functional diversity metrics across all sampling days (0–20). all-data-with-diversity-normalised.rds Normalized functional diversity dataset (Hill diversity, q = 2) restricted to experimental sampling days used for analyses. trait-summary.rds Trait-space boundaries and summary statistics used for trait visualizations. Data Processing Analyses focus on sampling days: Day 0 (pre-disturbance) Day 10 (end of disturbance phase) Day 20 (post-disturbance recovery phase) The script derives: Response variables Community growth Log-response ratio between Day 0 and Day 10 abundance: Growth = log(N10 / N0) Community recovery Log-response ratio between Day 10 and Day 20 abundance: Recovery = log(N20 / N10) Functional diversity change Change in functional diversity during disturbance: FD change = log(FD10 / FD0) Functional diversity recovery Change in functional diversity during recovery: FD recovery = log(FD20 / FD10) Community composition variables species_richness — number of species in each community strain_richness — number of strains in each community Both variables are parsed directly from species and strain composition identifiers. Statistical Analyses Four generalized least-squares (GLS) models are fitted using the nlme package. To account for treatment-specific heteroscedasticity, all models include a varIdent variance structure. Model 1: Community Growth Response: Growth Primary predictor: Initial functional diversity (diversity_0) Model 2: Community Recovery Response: Recovery Primary predictor: Assembled functional diversity (diversity_10) Model 3: Functional Diversity Change Response: FD change Primary predictor: Initial functional diversity (diversity_0) Model 4: Functional Diversity Recovery Response: FD recovery Primary predictor: Post-stress functional diversity (diversity_10) Model Structure All models include: diversity * species_richness * treatment + strain_richness where: Functional diversity is the focal predictor. Species richness modifies diversity effects. Treatment represents environmental stress context. Strain richness is included as an additive covariate. Outputs Main Text Output Description figures/fig1_trait_medians.png Median trait values for all strains and species. figures/fig2_fd_slopes.png Treatment-specific functional diversity effect sizes and confidence intervals. figures/fig3_fd_trajectories.png Functional diversity trajectories through time across treatments and diversity levels. tables/table2.xlsx Treatment and diversity effect summaries. Appendix C Output Description final_results.xlsx Full coefficient tables for GLS Models 1–4. slope_results.xlsx Estimated marginal slope comparisons and treatment contrasts. Supplementary Material Output Description figures/figS* Supplementary figures. tables/tableS* Supplementary statistical summaries and supporting analyses. Additional outputs include: Scatterplots relating functional diversity to growth and recovery metrics. Treatment-specific slope plots with 95% confidence intervals. Temporal dynamics of functional diversity. Model diagnostic panels including: residuals vs fitted values, Q-Q plots, residual histograms. Software Requirements R Packages tidyverse nlme emmeans broom.mixed ggpubr patchwork writexl scales Additional packages used in some analyses and plotting routines may include: broom openxlsx ggstats Reproducibility All analyses were conducted in R. Running the script requires the three input .rds files described above. The workflow reproduces all statistical analyses, figures, and tables reported in the manuscript and supplementary materials, except for Table 1 (experimental replication statement), which was compiled manually
Keyword(s):
community ecology; functional diversity; global change.
MeSH Term(s):
Grants and Funding:
No Grants or Funding Data Available
Associated Publication(s):
No Associated Publication Data Available
Supplementary Data:
No Supplementary Data Available
Related Dataset(s):
No Related Dataset Data Available
The National Library of Medicine (NLM) provides information about biomedical datasets. Inclusion on an NLM Web page does not imply endorsement of, or agreement with, the contents by NLM or the National Institutes of Health. Learn more: NLM Web Policies (nih.gov)