Data from: Towards an Effective Sample Size of tree topologies from Bayesian phylogenetic analyses.
收藏资源简介:
This repository contains all of the scripts and data necessary to reproduce the analyses and figures in Lanfear, Hua, and Warren (2016): Assessing tree topologies from Bayesian phylogenetic analyses: autocorrelation plots and the approximate Effective Sample Size.QuickStart----------1. Unzip the tree_ESS.zip file2. Run the /R/analysis.r script (you will need to change the setwd, number of processors, and various calls to specific directories in the script first)Note that this will run a lot of simulations and may take many hours.Contents of tree_ESS.zip------------------------# /R folderThis contains the scripts to do the simulations and data analyses. To reproduce our analyses in full. To run an R script, the easiest thing is to open the script in R, and then on the "Edit" menu, click "Execute". ## functions.rContains functions used in analysis.r. You should not need to change anything in this file, and you do not need to run it (analysis.r just looks here for the functions).## analyses.rPerforms the simulations of trees, calculates the ESS values and data for the autocorrelation plots from the simulated and empirical datasets, and draws all the figures (which are saved to /Figures). Data from all of these analyses is written to the /output folder. Note that this folder contains the data we generated from running this script. Your data may not be identical (because the simulations are stochastic), but they should be comparable. You will need to set a couple of things at the top of this script, as well as changing some calls to specific directories within the script itself. Please check all 'read' and 'write' commands and edit directories appropriately for your machine.# /output folderThis cotains .csv files with the output from the /analysis.r script. It also contains nexus files of simulated datasets from analysis 1, but not from analysis 3, because that would be too many nexus files. Of note in here are the fig5.csv and fig7.csv files, which contain the approximate and pseudo-ESS values calculated on all of the simulated datasets. These data form figures 5-7. I didn't store the simulated tree files, because they are big and numerous. Thus, you may not get identical results if you re-simulate the trees using the analyses.r script, but your results should certainly be qualitatively very similar. # /empirical_datasets folderThis contains the trees from the DataDryad repo here: http://datadryad.org/resource/doi:10.5061/dryad.r1hk5Specifically, this folder contains a single folder (/Scantlebury_2013), in which there is a subfolder of tree files from BEAST. This subfolder can be obtained directly from dryad, by unzipping the file from this link: http://datadryad.org/bitstream/handle/10255/dryad.50848/rawtrees.zip?sequence=1. The files in this folder are used in the analysis.r script. # /Figures folderThis contains all of our edited figures for the manuscript. If you run the analysis.r script, it will recreate the figures in R and save them in this folder with '_raw' appended to the filename.
本仓库包含复现Lanfear、Hua与Warren(2016)论文《Assessing tree topologies from Bayesian phylogenetic analyses: autocorrelation plots and the approximate Effective Sample Size》(贝叶斯系统发育分析中的树拓扑评估:自相关图与近似有效样本量)所需的全部脚本与数据。 快速入门---------- 1. 解压tree_ESS.zip文件 2. 运行/R/analysis.r脚本(需先修改脚本中的工作目录、处理器数量以及各类特定目录调用参数) 请注意,该操作将运行大量模拟任务,耗时可能长达数小时。 tree_ESS.zip文件内容------------------------ # /R 文件夹 包含用于执行模拟与数据分析的脚本,可完整复现本文的分析结果。运行R脚本的最简方式是在R中打开该脚本,随后在"Edit"菜单中点击"Execute"。 ## functions.r 包含analysis.r中使用的函数。您无需修改此文件中的任何内容,也无需单独运行它(analysis.r会自动在此路径下查找所需函数)。 ## analyses.r 执行树拓扑模拟,计算有效样本量(Effective Sample Size, ESS)值,并基于模拟与实证数据集生成自相关图所需的数据,同时绘制全部图表(图表将保存至/Figures文件夹)。所有分析结果均会写入/output文件夹。请注意,该文件夹已包含我们运行此脚本生成的原始数据。由于模拟过程具有随机性,您生成的数据可能与我们的不完全一致,但二者应具有可比性。您需要在该脚本顶部设置若干参数,并修改脚本内各类特定目录的调用路径。请检查所有'read'与'write'命令,并根据您的设备适配目录路径。 # /output 文件夹 包含analysis.r脚本运行生成的.csv格式输出文件。此外还包含分析1中模拟数据集的nexus格式文件,但未包含分析3的对应文件(因nexus文件数量过多)。其中值得关注的是fig5.csv与fig7.csv文件,二者包含了所有模拟数据集上计算得到的近似有效样本量与伪有效样本量(pseudo-ESS)值,这些数据对应论文中的图5至图7。由于模拟得到的树文件体积庞大且数量众多,我们未对其进行存储。因此,若您通过analyses.r脚本重新模拟树结构,得到的结果可能与我们的不完全一致,但在定性层面应高度相似。 # /empirical_datasets 文件夹 包含来自DataDryad仓库的树文件,仓库链接为:http://datadryad.org/resource/doi:10.5061/dryad.r1hk5。具体而言,该文件夹包含一个子文件夹/Scantlebury_2013,其中存放了来自BEAST软件的树文件子目录。该子目录可通过以下链接获取:http://datadryad.org/bitstream/handle/10255/dryad.50848/rawtrees.zip?sequence=1,解压该压缩包即可得到对应文件。此文件夹中的文件将在analyses.r脚本中被调用。 # /Figures 文件夹 包含我们为论文编辑完成的全部图表。若您运行analyses.r脚本,R将重新生成图表并保存至该文件夹,文件名会追加'_raw'后缀。



