# A spatially explicit trait-based approach uncovers changes in assembly processes under warming --- Given data and code are to reproduce the results of the paper "A spatially explicit trait-based approach uncovers changes in assembly processes under warming". The dataset involves species abundances and functional traits. The code is provided to calculate standardized functional distances between focal individuals and their neighborhoods at different spatial distances. This allows us to detect signals of community assembly mechanisms that act jointly. By coupling this novel approach with a transplant experiment, we reveal changes in assembly mechanisms in alpine grasslands under climate warming. ## Description of the data and file structure ##### DATA ##### # abundances.csv - pinpoint counts ## [1] "plot" - plot id ## [2] "lb_nom" - species names ## [3] "pinobs_point_num" - pinpoint number given the plot and repetition plot ## [4] "nb_of_observations" - number of pinpoint touches ## [5] "pinobs_comment" - observer comments ## [6] "climate" - Alpine or subalpine site ## [7] "treatment" - warming or cooling ## [8] "combi_fac" - treatment group (climate x treatment) ## [9] "rep"- repetition plot (1-10) ## [10] "subplotI" - subplots in repetition plot ## [11] "subplotII" - subplots in repetition subplot I ## [12] "pingrid_year_obs" - observation year (only 2018) ## [13] "group_id" - pinpoint id ## [14] "Correspondance" - Sp. name correspondances with trait database ## [15] "nbobs" - number of pinpoint touches # traits.csv - functional traits from the trait database ## [1] "refNameAnd" - Species names as in trait database ## [2] "refNamePin" - Species names as in abundances.csv ## [3] "SLA" - Specific leaf area ## [4] "LCCp" - Leaf carbon content ## [5] "LDMC" - Leaf dry matter content ## [6] "LNC" - Leaf nitrogen content ## [7] "PL_VEG_H"- Vegetative height ## [8] "SEEDM" - Seed mass ## [9] "CN"- Leaf carbon nitrogen ratio ## Please note that this data contains "NA" values because some of the species in the regional pool do not have the neccessary trait information. The percentages of the missing data is elaborated under the Methods-Interspecific functional trait data section of the associated paper. Along the calculations of the functional distance between focal individual and its neighborhood, we only include focal-neighborhood combinations for which more that 80% of neighbors have functional trait information (see Methods-Defining focal and neighbor species section of the associated paper). # wilcox.csv - ## Once the functional distances (in standardized effect sizes (SES)) between the species are computed we use two-sided Wilcoxon signed-rank test to test if the focal individuals' SES values are significantly different from zero (See Methods-Statistical analyses section of the associated paper). This blank data.frame serves just to better organize the results in the script and thus, it does not include any necessary data to reproduce the results. ##### SCRIPTS ##### # MAIN_SCRIPT_A_ELE-00170-2022_BEKTAS_040123.R - main script to calculate the functional distances for each focal indvidual # MAIN_SCRIPT_B_ELE-00170-2022_BEKTAS_040123.R - main script to retrieve the results, build linear models, and produce the figures. # MAIN_SCRIPT_A_ELE-00170-2022_BEKTAS_040123.cluster.R - main script to calculate the functional distances for each focal indvidual (TO RUN ONLY ON A CLUSTER) # functions_1_prepareData.R - functions to prepare the data for calculations # functions_2a_runAnalysis.R - functions to calculate the functional distances, get random communities and sub-neigborhoods # functions_2b_workflow.R - functions to direct the workflow #functions_3_postTreatment - functions to build linear models and calculate overlapping neighborhoods # PARAMS_file[...].txt - parameter files to paralelize the calculations if the user wishes to run it on cluster. # RUN_COMM_AlpV_Parallel.oar - an example .oar file to run the script on cluster. ##### OUTPUTS ##### # AlpineWarmed - Folder where the calculations for each focal individual in AlpineWarmed plots will be saved when the scripts are executed. # AlpineControl -Folder where the calculations for each focal individual in AlpineControl plots will be saved when the scripts are executed. # SubalpineControl - Folder where the calculations for each focal individual in SubalpineControl plots will be saved when the scripts are executed. # list.comrand.RData - randomized species list for test and null communities # OUTPUT_[...]_rep1.RData - calculations for each treatment group and repetition plot # [...]_TABLE_MEDIAN_obsFALSE.RData - calculations for test communities as in median values for each focal individuals' subnieghborhoods. # [...]_TABLE_MEDIAN_obsTRUE.RData - calculations for observed communities as in median values for each focal individuals' subnieghborhoods. # [...]_TABLE_MODEL_obsFALSE.RData - linear model parameters for test communities. # [...]_TABLE_MODEL_obsTRUE.RData - linear model parameters for observed communities. ##### PLOT ##### This folder contains main figures (Fig.2 & Fig.3) of the manuscript. It also contains figures for the appendix that are related to functional distance calculations. The figures are produced via "MAIN_SCRIPT_B_ELE-00170-2022_BEKTAS_040123" script. ## Sharing/Access information This is a section for linking to other ways to access the data, and for linking to sources the data is derived from, if any. Links to other publicly accessible locations of the data: * Androsace database (https://originalps.osug.fr/) Data was derived from the following sources: * Kattge, J., Bönisch, G., Díaz, S., Lavorel, S., Prentice, I.C., Leadley, P., et al. (2020). TRY plant trait database - enhanced coverage and open access. Glob. Chang. Biol., 26, 119–188. * Bjorkman, A.D., Myers-Smith, I.H., Elmendorf, S.C., Normand, S., Thomas, H.J.D., Alatalo, J.M., et al. (2018b). Tundra Trait Team: A database of plant traits spanning the tundra biome. Global Ecol Biogeogr, 27, 1402– 1411.