树2gd
项目描述
树2gd
Tree2GD 提供了一个集成的管道来识别 WGD 事件,在一步或多个步骤中提供友好的命令,在自定义数据集中具有智能质量控制,多线程设计成本低,在检测 WGD 信号方面具有良好的性能,以及 GD 的高级可视化和 Ks 峰值。
Python 要求
我们目前推荐使用来自http://www.python.org的 Python 3.8 Tree2GD 目前在以下 Python 实现上得到支持和测试:
Python 3.6、3.7、3.8 – 见http://www.python.org
Pip3.6>=v19.2.3 – 见https://pypi.org/project/pip
通过sudo apt-get install python3-pip 或使用 get-pip.py安装
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py
R 要求
为了完成最终的绘制结果展示,我们目前推荐使用https://www.r-project.org的 R>=v4.0.0
安装
从 Pypi 安装
可以通过如下命令快速安装Tree2gd,通过run自动安装它所依赖的python包:
pip3 install Tree2gd [--user] #You may need the --user parameter if you do not have administrator rights
如果需要使用特定的python3路径安装和使用Tree2gd,可以将上面的pip3替换为/THE/PATH/OF/YOUR/PYTHON3 -m pip
从源安装
您可以下载并解压我们的源代码,或者使用 git 获取它。现在将目录更改为 Tree2gd 源代码文件夹并运行:
python3 setup.py build python3 setup.py test python3 setup.py install [--user] #You may need the --user parameter if you do not have administrator rights
测试
安装成功后,主程序命令Tree2gd和测试命令Tree2gd_test就会添加到你的系统中。您可以先通过运行以下命令检查 Tree2gd 是否安装成功:
$ Tree2gd -h
如果系统反馈了其对应的参数说明,恭喜您将Tree2gd正确安装到您的系统中!接下来,我们强烈建议您运行Tree2gd_test以使用我们准备的数据进行快速完整的 Tree2gd 测试,因为您可以获得以下好处:
1.检查我们默认使用的软件预编译版本是否适合您的系统,将不可用的替换为配置文件(配置见下文说明)。
2.第一次使用时,在最后的绘图部分,我们会花几分钟时间在R中安装几个依赖包,之后正式使用会更快更方便。
3.用户修改配置文件后,可以通过命令的-config参数添加自己的新设置进行测试,快速检测到新配置可以运行成功。
Tree2gd_test命令将以最快的参数设置运行完整的分析过程。它只包含两个可选参数命令:
$ Tree2gd_test [-t] [--config] -t [int] sets the number of threads for testing (default: 1) --config [str] uses the configuration given by the user File for testing (verify availability of custom configuration)
在4 cpu的情况下,完成一轮测试大约需要5分钟(第一次运行需要一些额外的时间来下载和安装R包)。运行成功后会在当前目录下生成一个文件夹``./Tree2gd_test_out``,可以查看(尤其是step6最终绘制结果Tree2GD.result.pdf),全面验证软件运行效果。
跑步
您只需使用以下最简单的命令即可完成所有WGD分析,并获得完美的图纸显示:
$ Tree2gd -i input_dir -tree phytree.nwk
其中phytree.nwk为newick格式的物种进化树。
input_dir文件夹包含 phytree.nwk 中以 fasta 格式包含的每个物种的所有相应蛋白质序列(默认后缀 .pep)和 cds 序列(默认后缀 .cds)。
此外,您可以添加以下可选参数,以使程序运行得更快更好(尤其是在使用多核运行时):
- -t t
线程数。默认值:1
- -o outputdir
输出 dir.default:./output
- --step step_num_str
您需要哪些步骤。默认:123456(从数字中选择:例如'234')
- --log logfile
日志文件名,否则日志将打印在标准输出上
- --config config_file
config.ini 配置文件,留空以默认参数和程序自己的软件版本运行。
- --debug
日志文件会包含各个软件本身的输出,方便查找错误(需要-log)
- --only_script
只生成脚本,不自动运行。
- --cds2tree
使用 cds 序列构建基因树。
详细参数配置文件:config.ini
Tree2gd 进程中有很多软件。默认情况下已使用程序的预编译版本。同时,这些软件有很多参数可以调整以达到最佳效果。
所以我们用config.ini文件来总结这些设置,通过-config参数输入到程序中,调用相应程序中的配置。
!笔记!该文件中的任何一项都是可选的,用户只需在相应的部分添加他们需要的行
[software] #The path of all software used by Tree2gd.If one is not set or set to empty,the program will use its own pre-compiled software version (location at /THE/PATH/OF/python/site-packages/software/) diamond =/THE/PATH/OF/python/site-packages/software/diamond muscle=/THE/PATH/OF/python/site-packages/software/muscle iqtree=/THE/PATH/OF/python/site-packages/software/iqtree tree2gd=/THE/PATH/OF/python/site-packages/software/Tree2GD phymcl=/THE/PATH/OF/python/site-packages/software/PhyloMCL KaKs_Calculator=/THE/PATH/OF/python/site-packages/software/KaKs_Calculator calculate_4DTV=/THE/PATH/OF/python/site-packages/software/calculate_4DTV_correction.pl Epal2nal=/THE/PATH/OF/python/site-packages/software/Epal2nal.pl dolloparsimony=/THE/PATH/OF/python/site-packages/software/dolloparsimony [postfix] #The file name postfix of each species protein and cds, the prefix must be exactly the same as in the tree file pep=.pep cds=.cds [diamond] #The parameters used by diamond, in addition to the following default parameters, the user can add any parameter that diamond can recognize -e=1e-10 -p=4 #The number of threads used by each diamond, the number of parallel diamonds in actual operation is Tree2gd thread//it [phymcl] #The parameters used by phymcl, the user can add any parameter that phymcl can recognize [mcl2fasta] min_taxa=4 #The minimum number of species contained in each gene set when doing paper mulberry, cannot be less than 4, otherwise a meaningful tree cannot be built [iqtree] #The parameters used by iqtree, in addition to the following default parameters, the user can add any parameter that iqtree can recognize -B=1000 #Ultrafast bootstrap (>=1000) If you do not set it default to 1000, you can force it to 0 so that bootstrap is not performed, but it is not recommended except for testing -m=JTT+G4 #If the -cds2tree parameter is added, it will default to HKY. Please specify DNA or Protein when defining the tree structure model [tree2gd] #The parameters used by tree2gd, in addition to the following default parameters, the user can add any parameter that tree2gd can recognize --bp=50
示例输出图显示
汇总输出图
交互式 html kaks 情节
R kaks 图
软件和引文
step1.blastp
[diamond] Buchfink B、Xie C、Huson DH,“使用 DIAMOND 进行快速和灵敏的蛋白质比对”,Nature Methods 12, 59-60 (2015)。doi:10.1038/nmeth.3176 [seqkit] W Shen, S Le, Y Li*, F Hu*. SeqKit:用于 FASTA/Q 文件操作的跨平台和超快工具包。PLOS ONE。doi:10.1371/journal.pone.0163962。
step2.MCL
[phylomcl] 周 S , Chen Y , Guo C , et al. PhyloMCL:以系统发育关系和多倍体事件推断为指导的层次正交群的准确聚类[J]. 生态与进化方法,2020。
step3.dollop
[物以稀为贵]
step4.WGD
[Tree2GD](对2.4版本做了一些修改) https://tree2gd.sourceforge.io/
[肌肉] Edgar, RC (2004)。肌肉:具有高精度和高通量的多序列比对。核酸研究,32(5),1792-1797。
[iqtree] BQ Minh, HA Schmidt, O. Chernomor, D. Schrempf, MD Woodhams, A. von Haeseler, R. Lanfear (2020) IQ-TREE 2:基因组时代系统发育推断的新模型和有效方法。摩尔。生物学。进化论,37:1530-1534。https://doi.org/10.1093/molbev/msaa015
[ pal2nal.pl ] (v14; January 6, 2012 ) Zhang Zhang ( zhangzhang@big.ac.cn )
step5.KaKs
[肌肉] Edgar, RC (2004)。肌肉:具有高精度和高通量的多序列比对。核酸研究,32(5),1792-1797。
step6.plot_summary
[ggtree](R包)G宇。使用 ggtree 可视化树状结构上的数据。当前的生物信息学协议,2020,69:e96。doi:10.1002/cpbi.96。
[pyecharts](Python 包) https://pyecharts.org/
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。