DOI: 10.5281/zenodo.10896659
title: Data and scripts for: Airborne DNA reveals predictable spatial and seasonal dynamics of fungi

description: Fungi are among the most diverse and ecologically important kingdoms of life. However, the distributional ranges of fungi remain largely unknown, as do the ecological mechanisms that shape their distributions. To provide an integrated view of the spatial and seasonal dynamics of fungi, we implemented a globally distributed standardised aerial sampling of fungal spores. The vast majority of OTUs were detected only within one climatic zone, and the spatio-temporal patterns of species richness and community composition were mostly explained by annual mean air temperature. Tropical regions hosted the highest fungal diversity except for lichenized, ericoid mycorrhizal, and ectomycorrhizal fungi, which reached their peak diversity in temperate regions. The sensitivity in climatic responses was associated with phylogenetic relatedness, suggesting that large-scale distributions of some fungal groups are partially constrained by their ancestral niche. There was a strong phylogenetic signal in seasonal sensitivity, suggesting that some groups of fungi have retained their ancestral trait of sporulating only for a short period. Overall, our results show that the hyperdiverse kingdom of fungi follows globally highly predictable spatial and temporal dynamics, with seasonality in both species richness and community composition increasing with latitude. Our study reports patterns resembling those described for other major groups of organisms, thus making a major contribution to the long-standing debate on whether organisms with microbial lifestyles follow the global biodiversity paradigms known for macro-organisms.

The analyses presented in the paper can be reproduced with the R-script pipeline provided here. The starting point for the scripts is the datafile allData.RData that was published originally by Ovaskainen et al. Data from: Global Spore Sampling Project: A global standardized dataset of airborne fungal DNA. https://doi.org/10.5281/zenodo.10435615 (2024). The datafile allData.RData is provided also here for convenience, and it includes the following three objects: metadata, taxonomy, and otu.table (see Ovaskainen et al. for details). The script pipeline consists of the following elements (for deltails, see the Methods of the paper):



Scripts S01: data preparation



S01.1_download_clim_data.R. This script downloads daily climatic data for the entire world.

S01.2_select_and_preprocess_clim_data.R. This script selects the data relevant for the study locations and preprocesses it.

S01.3_add_climatic_data_to_metadata.R. This script adds the preprocessed climatic data to the metadata.

S01.4_otu_guild_assignment.R. This script performs the guild assignment to the OTUs. It utilizes the datafiles Fung_LifeStyle_Data.RDS and funguild_db.rds provided here, and it utilizes the taxonomy of ProtaxFungi provided by Ovaskainen et al. Data from: Global Spore Sampling Project: A global standardized dataset of airborne fungal DNA. https://doi.org/10.5281/zenodo.10435615 (2024). Note that while the paper presents analyses and results only for the trait database of Aguilar-Trugueros et al., the scipts repeat the trait analyses also for the FunGuild database. The reason for not showing the results for the FunGuild database in the paper was that the database of Aguilar-Trugueros et al. contains FunGuild as one of the data sources, and that the results were highly coherent between the two databases.

S01.5_add_trait_data_to_taxonomy_and_metadata.R. This script adds the guild data and spore size data to taxonomy (taxon-specific traits) as well as to metadata (community-weighted mean traits). It utilizes the datafile Spore_data_12Nov21.RDS provided here. This script can also be used to generated simulated contamination to the OTU table by setting contaminate=TRUE.



Scripts S02: exploratory analyses



S02.1_show_descriptive_statistics.R. This script outputs basic desriptive statistics from the data.

S02.2_make_study_design_maps.R. This script plots the study design map shown in the paper.

S02.3_compute_site_and_biome_profiles.R. This script computes site_profiles (needed in ordinations) and biome_profiles (needed to create Venn diagrams).

S02.4_make_venns.R. This script produces Venn diagrams.



Scripts S03: ordination analyses



S03.1_make_ordination_maps.R. This script makes the ordination analyses.



Scripts S04: univariate analyses



S04.1_conceptualize_univariate_models.R. This script produces a figure that illustrates conceptually the differenent model variants. 

S04.2_make_univariate_analysis.R. This script implements the univariate analyses.

S04.3_show_univariate_results.R. This script summarizes the results of the univariate analyses by producing tables of AIC and R2.

S04.4_plot_univariate_results.R. This script plots the univariate models.

S04.5_compute_temporal_turnover.R. This script computes site-specific indices of temporal turnover.

S04.6_show_temporal_turnover.R. This script generates a plot illustrating temporal turnover.



Scripts S05: Hmsc analyses



S05.1_define_Hmsc_models.R. This script defines the Hmsc models. It utilizes the R-function as.phylo.formula provided here.

S05.2_export_Hmsc_models_for_fitting.R. This script exports the unfitted Hmsc-models for fitting with Hmsc-HPC that operates on python/tensorflow.

S05.3_import_fitted_Hmsc_models.R. This script imports the fitted Hmsc-models back to Hmsc-R.

S05.4_postprocess_Hmsc_results.R. This script postprocesses the results of the fitted Hmsc model.

S05.5_show_Hmsc_results.R. This script generates a plot that illustrates the postprocessed results.