Data and codes for manuscript: Environmental and functional niches complement phylogeny
收藏DataCite Commons2025-12-02 更新2026-04-25 收录
下载链接:
https://figshare.com/articles/dataset/Data_and_codes_for_manuscript_Functional_niche_and_trait_plasticity_complement_phylogeny_in_explaining_the_variance_of_intraspecific_trait-environment_response_in_woody_plants/28921001/2
下载链接
链接失效反馈官方服务:
资源简介:
<pre># scripts for Chapter 2<br><br># Environmental and functional niches complement phylogeny in explaining intraspecific <br># trait-environment response of woody plants<br><br>## =========================================================================#<br># 0. Data preprocess and analyzing ------------------------------------------<br>## =========================================================================#<br><br>## 0.1 Trait environmental data preprocess ------------------------------------<br>source('./src/0_Preparing/Species_name.R')<br>source('./src/0_Preparing/Trait_data_cleaning.R')<br>source('./src/0_Preparing/Trait_env_data_merge.R')<br><br>## 0.2 phylogenetic tree, trait plasticity and functional data calculation --------------<br>source('./src/0_Preparing/Download_phylogenetic_tree.R')<br>source('./src/0_Preparing/functional_niches.R')<br>source('./src/0_Preparing/habitat_niches.R')<br>source('./src/0_Preparing/spatial_distance.R')<br><br>## 0.3 Trait environment response estimates --------------<br>source('./src/0_Estimate_trait_environment_response/ITER_estimation_with_all_data.R')<br>source('./src/0_Preparing/combined_trait_response_with_drivers.R')<br>source('./src/0_Estimate_trait_environment_response/ITER_comparison_CHELSA_and_worldclimate.R')<br><br><br>## =========================================================================#<br># 1. Data overview ---------------------------------------------<br>## =========================================================================#<br><br>#* Global map of trait measurements<br>source('./src/1_global_map_and_trait_response/Global_map_data_preprocess.R')<br>source('./src/1_global_map_and_trait_response/Trait_response_along_gradients.R')<br>source('./src/1_global_map_and_trait_response/Trait_response_at_Order_and_family_level.R')<br><br>## =========================================================================#<br># 2. Phylogenetic constraints on ITERs across lineage scales --------------<br>## =========================================================================#<br># source('./src/2_phylgenetic_signal_along_linages/Lambda_at_different_level.R') # run once<br>source('./src/2_phylgenetic_signal_along_linages/Figure_brm_lambda_and_tree_plot.R')<br>source('./src/2_phylgenetic_signal_along_linages/Figure_of_all_lambda_in_sub_clades.R')<br><br>## =========================================================================#<br># 3. The effects of potential drivers on ITERs -------------------<br>## =========================================================================#<br>#* the effects of trait plasticity and functional niche under phylogenetic controls. <br>source('./src/3_Combined_analysis/Figure_main_driver_effects_brm.R')<br>source('./src/3_Combined_analysis/Relative_contribution_brm.R')<br>source('./src/3_Combined_analysis/summary_brm.R')<br><br><br>## =========================================================================#<br># 4. Supplementary: -------------------<br>## =========================================================================#<br>#* the effects of trait plasticity and functional niche under phylogenetic controls. <br># check the rhat and show the trace plot<br>source('./src/4_supplementary/rhat_and_trace_plot.R')<br>source('./src/4_supplementary/morans_I.R')<br>source('./src/4_supplementary/correlation_of_matrix.R')</pre>
# 第二章配套脚本
# 环境生态位与功能生态位互补于系统发育,解释木本植物种内性状-环境响应
## =========================================================================#
# 0. 数据预处理与分析流程 ------------------------------------------
## =========================================================================#
## 0.1 性状-环境数据预处理 ------------------------------------
source('./src/0_Preparing/Species_name.R')
source('./src/0_Preparing/Trait_data_cleaning.R')
source('./src/0_Preparing/Trait_env_data_merge.R')
## 0.2 系统发育树(phylogenetic tree)、性状可塑性(trait plasticity)与功能数据计算 --------------
source('./src/0_Preparing/Download_phylogenetic_tree.R')
source('./src/0_Preparing/functional_niches.R')
source('./src/0_Preparing/habitat_niches.R')
source('./src/0_Preparing/spatial_distance.R')
## 0.3 性状-环境响应估计 --------------
source('./src/0_Estimate_trait_environment_response/ITER_estimation_with_all_data.R')
source('./src/0_Preparing/combined_trait_response_with_drivers.R')
source('./src/0_Estimate_trait_environment_response/ITER_comparison_CHELSA_and_worldclimate.R')
## =========================================================================#
# 1. 数据概览 ---------------------------------------------
## =========================================================================#
#* 性状测定点位全球分布图
source('./src/1_global_map_and_trait_response/Global_map_data_preprocess.R')
source('./src/1_global_map_and_trait_response/Trait_response_along_gradients.R')
source('./src/1_global_map_and_trait_response/Trait_response_at_Order_and_family_level.R')
## =========================================================================#
# 2. 不同谱系尺度下系统发育对ITER的约束作用 --------------
## =========================================================================#
# source('./src/2_phylgenetic_signal_along_linages/Lambda_at_different_level.R') # 仅需运行一次
source('./src/2_phylgenetic_signal_along_linages/Figure_brm_lambda_and_tree_plot.R')
source('./src/2_phylgenetic_signal_along_linages/Figure_of_all_lambda_in_sub_clades.R')
## =========================================================================#
# 3. 潜在驱动因子对ITER的影响 -------------------
## =========================================================================#
#* 系统发育控制下的性状可塑性与功能生态位效应分析
source('./src/3_Combined_analysis/Figure_main_driver_effects_brm.R')
source('./src/3_Combined_analysis/Relative_contribution_brm.R')
source('./src/3_Combined_analysis/summary_brm.R')
## =========================================================================#
# 4. 补充分析 -------------------
## =========================================================================#
#* 系统发育控制下的性状可塑性与功能生态位效应分析
# 检查收敛诊断Rhat值并绘制轨迹图(trace plot)
source('./src/4_supplementary/rhat_and_trace_plot.R')
source('./src/4_supplementary/morans_I.R')
source('./src/4_supplementary/correlation_of_matrix.R')
提供机构:
figshare
创建时间:
2025-12-02



