Supplement 1. Fuzzy coded affinities of each taxon to the number of generations per year, body form, and degree of sclerotisation, R functions for estimating functional measures using fuzzy coded trait data and R script for studying the effect of stressors on functional measures.
收藏资源简介:
File List All_files.zip (MD5: 12a8ece890d711d13148e464ed4565fe) Fuzzy_code_traits.txt (MD5: d6a6faa36a1d0441d2af793551123646) Fuzzy_Functions.R (MD5: 97ebdc4e37a8f42bc069f12fc440ab3d) Script.R (MD5: 9cbe775d3056d0415b54891f7ccdc56c) Description All_files.zip Compressed file containing Fuzzy_code_traits.txt, Fuzzy_functions.R and Script.R Fuzzy_code_traits.txt is a tab-separated file containing fuzzy code trait information for body form and degree of sclerotization of stream insect genera. Fuzzy values for each genera and trait category go from 0 (no affinity) to 3 (maximum affinity). Column definitions are: 1. Taxon: the 212 genus names 2-6 The trait categories for body form and degree of sclerotization. Column label meaning: Body_Form_Flattened: Affinity for flattened body form Body_Form_Cylindrical: Affinity for cylindrical body form Body_Form_Elongated: Affinity for elongated body form Sclerotization_Slightly: Affinity for slightly sclerotization degree Sclerotization_Partially: Affinity for partially sclerotization degree Sclerotization_Fully: Affinity for fully sclerotization degree Fuzzy_functions.R is a file containing R functions for estimating taxon and community-level functional measures from fuzzy code trait data Input variables: ATTENTION: check that trait, taxonomic and stressor matrices have the row and column names ordered in the same way traits: matrix of traits. Must be fuzzy coded or percentages of affinity for each trait category (taxa × trait categories) taxa: taxonomic matrix of count or presence / absence data (sites × taxa) col.blocks: vector containing the number of categories of each trait. Names are the trait names. funcNiche() and funcNiche.pca() are the two functions that estimate the taxon and community functional properties. This file contains further information about the intermediate functions used to estimate each metric. Input variables to run funcNiche() and funcNiche.pca() rdt: number of randomizations to generate the taxon niche space m: number of axes Output functional variables: fpc: functional space (functional principal components) tfric.data: area and axis centroid of each taxon in the functional space overlap.mat: triangular matrix of niche overlap between taxon pairs tFRic: mean taxon functional richness for each community FSim: mean functional similarity between taxon pairs FDis: functional dispersion of each community FRic: functional richness of each community Script.R is a file containing the R code necessary to run the analyses performed in this study. This file is provided just an example of how to estimate and analyse the functional features along environmental gradients. It can be easily adapted to other data if input matrices are appropriate (see Fuzzy_functions.R description). In case of using this file, besides taxonomic and trait data, it should be provided the environmental data. The data set should be in the working directory of R when running this code. The data sets 'taxa_sal.txt', 'taxa_lu.txt', 'env_sal.txt', 'env_lu.txt', 'traits_sal.txt' and 'traits_lu.txt' are not available for release at the moment.
文件清单:All_files.zip(MD5:12a8ece890d711d13148e464ed4565fe)、Fuzzy_code_traits.txt(MD5:d6a6faa36a1d0441d2af793551123646)、Fuzzy_Functions.R(MD5:97ebdc4e37a8f42bc069f12fc440ab3d)与Script.R(MD5:9cbe775d3056d0415b54891f7ccdc56c)。 数据集说明: All_files.zip为压缩包,内含Fuzzy_code_traits.txt、Fuzzy_Functions.R与Script.R三个文件。 Fuzzy_code_traits.txt为制表符分隔文件,存储了溪流昆虫属的体型与硬化程度的模糊代码特征信息。每个属对应各特征类别的模糊值取值范围为0(无相关性)至3(最高相关性)。各列定义如下:1. 分类单元(Taxon):共212个属名;第2至6列为体型与硬化程度的特征类别。各列标签含义如下: Body_Form_Flattened:扁平体型相关性评分 Body_Form_Cylindrical:圆柱形体型相关性评分 Body_Form_Elongated:细长体型相关性评分 Sclerotization_Slightly:轻度硬化程度相关性评分 Sclerotization_Partially:部分硬化程度相关性评分 Sclerotization_Fully:完全硬化程度相关性评分 Fuzzy_Functions.R为R脚本文件,包含用于从模糊编码特征数据中估算分类单元与群落水平功能指标的R函数。 输入变量说明: 注意:请确保特征矩阵、分类矩阵与胁迫因子矩阵的行、列名称排序一致。 1. traits:特征矩阵,需为模糊编码格式或各特征类别的相关性占比(行:分类单元,列:特征类别) 2. taxa:分类矩阵,存储物种丰度或存在/缺失数据(行:采样位点,列:分类单元) 3. col.blocks:向量,存储每个特征的类别数量,向量名称为特征名。 本文件包含funcNiche()与funcNiche.pca()两个核心函数,用于估算分类单元与群落的功能属性,同时还包含用于计算各指标的中间函数的相关信息。 运行funcNiche()与funcNiche.pca()所需的输入变量: 1. rdt:用于生成分类单元生态位(niche)空间的随机置换次数 2. m:功能空间的轴数 输出的功能变量包括: 1. fpc:功能空间(功能主成分空间,functional principal components) 2. tfric.data:每个分类单元在功能空间中的面积与轴质心 3. overlap.mat:分类单元对之间的生态位重叠三角矩阵 4. tFRic:每个群落的平均分类单元功能丰富度 5. FSim:分类单元对之间的平均功能相似性 6. FDis:每个群落的功能离散度 7. FRic:每个群落的功能丰富度 Script.R为R脚本文件,包含本研究中所用分析的完整R代码。本文件仅作为示例,用于演示如何沿环境梯度估算与分析功能特征。若输入矩阵格式合规,可轻松适配其他数据集(详见Fuzzy_Functions.R的说明)。使用本文件时,除分类与特征数据外,还需提供环境数据。运行代码前,请将所需数据集置于R的工作目录中。当前暂不开放发布'taxa_sal.txt'、'taxa_lu.txt'、'env_sal.txt'、'env_lu.txt'、'traits_sal.txt'与'traits_lu.txt'数据集。



