Data and code for "Network analysis reveals the plant and bird species underpinning Nature's Contributions to People" submitted to Oikos
收藏资源简介:
Data and code for "Network analysis reveals the plant and bird species underpinning Nature’s Contributions to People" submitted to Oikos -------------------------- In this folder you will find all the relevant data and scripts to replicate the results presented in the article. Please do not share the "NCP_supply.csv" because it contains data from a tree inventory that will be made public once all papers in progress for the research unit "Kili-SES" will be published. All other data sources are of public domain. Because of the multi-step nature of this analysis, scripts have been numbered. It is recommended to run them in sequence, because the outputs of certain scripts are used in analysis steps later on. When running a script, the most important objects for analysis are saved as .RDS files. This allows to reuse these contents without sourcing the respective scripts multiple times. Some analysis requires packages to be downloaded from GitHub, because they are not currently reposited on CRAN. Here's an outline of what each of the file in this folder does: #### CSV FILES #### fruits_dispersed.csv <- This dataset contains data on the fruit length for each of the plant species which are dispersed by birds in each ecosystem kili_frugivores_abundance.csv<- This dataset contains information on the recorded abundance of each frugivorous bird species across all ecosystem types. Data obtained from NCP_supply.csv<- This dataset contains information on the abundance of every tree species and its estimated supply of NCP across all habitat types. plant_species_newtaxonomy.csv <- This dataset contains the alternative names of all tree species to be used in the creation of the phylogenetic trees. #### NEXUS FILES ### output.nex <- this is the phylogenetic tree in nexus format for the frugivorous bird species. plant_phylo.nex <- this is the phylogenetic tree in nexus format for the tree species. ### FUNCTIONS, DATASETS AND PACKAGES ##### These scripts can be sourced or run to load the datasets, packages and functions necessary to the analysis. 0_Functions_TM.R<- This script contains the functions to calculate interaction probability between plants and frugivores. It has been adapted from the functions presented by Donoso et al. (2017). 0.3_datasets.R <- This script assembles the basic dataset needed for the analysis 0.4_packages.R <- This script loads all packages required for analysis and calls for the installation of packages from GitHub. ###### ANALYSIS ############# 1_Interactions.R<- This script uses trait data and trait matching functions to build the interaction networks between trees and frugivores for all 10 ecosystems. 2_ProviderScores.R<- This script calculates the Provider scores for every tree species in every ecosystem from the NCP supply raw data. 3_RegulatorScores.R<- This script calculates the regulator scores using the provider scores and the interaction probabilities calculated in script 2 and 1 respectively. 4_Analysis.R<- This script runs models and produces figures presented in the results shown in Figure 2. 4.2_Specialisation.R <- This script calculates the specialisation parameter H2' of the networks realised with trait-matching and proves it is close to observed specialisation recorded on Kilimanjaro. 5_SpeciesAccumulation.R <-This script calculates the species accumulation curves shown in Figure 3. 6.3_Phylogenies_ggtreeExtra <- This script generates the phylogenies for trees and birds in Figures 4 and 5. 6.5_Abouheif_C.R<- This script tests providers and regulators' scores for phylogenetic signal. 6.6_PlantPhylogeny_Phylomaker.R<- This scripts uses V.Phylomaker to generate a phylogeny of tree species with branch length. 6.8_Phylogenetic_Diversity.R <- This script calculates the phylogenetic diversity of providers and regulators.
本数据集与代码对应论文《网络分析揭示支撑自然对人类的贡献(Nature’s Contributions to People)的植物与鸟类物种》,该论文已投稿至《Oikos》期刊。 -------------------------- 本文件夹包含复现论文中所有结果所需的全部相关数据与脚本代码。 请勿分享`NCP_supply.csv`文件,该文件包含树木清查数据,待研究单元“Kili-SES”的所有在研论文发表后,此类数据将对外公开。 其余所有数据源均属于公共领域。 由于本分析流程包含多步骤,脚本均已按顺序编号。建议按序列运行脚本,因为部分脚本的输出结果将用于后续分析环节。运行脚本时,分析所需的核心对象将保存为.RDS格式文件,以便无需重复加载对应脚本即可复用这些内容。 部分分析所需的R包需从GitHub下载,因这些包目前未收录于CRAN仓库。 以下为本文件夹内各文件的功能说明: #### CSV 数据文件 #### `fruits_dispersed.csv`:本数据集包含各生态系统中鸟类传播的各类植物物种的果实长度数据。 `kili_frugivores_abundance.csv`:本数据集涵盖所有生态系统类型中各食果鸟类物种的实测丰度信息。 `NCP_supply.csv`:本数据集包含所有生境类型中各树木物种的丰度信息,以及其估算的自然对人类贡献(NCP)供给量。 `plant_species_newtaxonomy.csv`:本数据集包含所有用于构建系统发育树的树木物种的别名信息。 #### NEXUS 格式文件 #### `output.nex`:本文件为食果鸟类物种的NEXUS格式系统发育树。 `plant_phylo.nex`:本文件为树木物种的NEXUS格式系统发育树。 ### 函数、数据集与依赖包 ### 此类脚本可通过加载或直接运行,用于获取分析所需的数据集、依赖包与核心函数。 `0_Functions_TM.R`:本脚本包含计算植物与食果鸟类之间互作概率的函数,改编自Donoso等人(2017)发表的相关函数。 `0.3_datasets.R`:本脚本用于组装分析所需的基础数据集。 `0.4_packages.R`:本脚本用于加载分析所需的全部依赖包,并调用GitHub上未收录于CRAN的包的安装流程。 ###### 分析流程脚本 ######## `1_Interactions.R`:本脚本利用性状数据与性状匹配函数,构建10个生态系统中树木与食果鸟类之间的互作网络。 `2_ProviderScores.R`:本脚本基于NCP供给原始数据,计算每个生态系统中各树木物种的供给者评分(Provider scores)。 `3_RegulatorScores.R`:本脚本分别利用脚本2计算的供给者评分与脚本1计算的互作概率,计算调控者评分(Regulator scores)。 `4_Analysis.R`:本脚本用于运行统计模型,并生成论文图2中展示的结果图。 `4.2_Specialisation.R`:本脚本用于计算基于性状匹配构建的网络的特化参数H2',并验证其与乞力马扎罗山实测的网络特化程度相近。 `5_SpeciesAccumulation.R`:本脚本用于计算论文图3中展示的物种累积曲线。 `6.3_Phylogenies_ggtreeExtra`:本脚本用于生成论文图4与图5中展示的树木与鸟类系统发育树。 `6.5_Abouheif_C.R`:本脚本用于检验供给者与调控者评分的系统发育信号。 `6.6_PlantPhylogeny_Phylomaker.R`:本脚本利用V.Phylomaker工具生成带有分支长度的树木物种系统发育树。 `6.8_Phylogenetic_Diversity.R`:本脚本用于计算供给者与调控者的系统发育多样性。



