构建系统发育树

作者: 六耳弥猴 | 来源:发表于2016-08-14 20:25 被阅读1871次

系统发育树的构建


现有的方法

邻接法(NJ) phylip fasta/phy
最大似然法(ML) raxml/paml fasta/phy
最大简约法(MP) phylip/paup fasta/phy
贝叶斯法 MrBayes nexus
溯祖法 BEAST xml

系统发育树构建方法的优劣

  • link
  • 选择:一般情况下,若有合适的分子进化模型可供选择,用最大似然法构树获得的结果较好;对于近缘物种序列,通常情况下使用最大简约法;而对于远缘物种序列,一般使用邻接法或最大似然法。

其他资料


数据准备

  • vcf/genotype to phy/fasta
  • phy与fasta相互转换,最好是准备好fasta格式文件,使用工具转化成相互式的phy格式。
    • 脚本位置:
      • /lustre/project/og04/shichunwei/project/temp/Tree/fasta2phy.pl
      • /lustre/project/og04/shichunwei/project/temp/Tree/phy2fasta.pl

model test

modelgenerator

java -jar modelgenerator.jar align_file num_gamma_categories
java -jar modelgenerator.jar test.phy 4
  • 问题:采用ModelGenerator的时候,gamma categories 具体是什么意思
  • the number of discrete gamma categories ? 4,8 or bigger? maybe default if 4.
  • link

jModeltest

  • 一般只需 -AIC即可
java -jar /lustre/project/og04/shichunwei/biosoft/jmodeltest-2.1.7/jModelTest.jar -d  jmodel.fasta -s 11 -i -g 4 -f -AIC -AICc -DT -BIC -a -tr 8 > jmodel.out

fasttree

  • fasta/phy,有多个模型可选,邻接→最大简约→最大似然?我的理解是多种结合。模型采用的是Jukes-Cantor or generalized time-reversible(核酸); JTT (Jones-Taylor-Thorton) or WAG (Whelan Goldman)(蛋白)

  • 数据:核酸或蛋白(fasta/phy)

  • 网址

  • 说明书中指出其准确性优于邻接法BIONJ和FastME,弱于最大似然法RaxML和PhyML,但是速度更快。

  • 示例:

/lustre/project/og04/shichunwei/biosoft/fasttree/FastTreeMP -nt -gtr  -fastest -boot 1000 -gamma -log crab.log cds.clustalw.phy > fasttree.tree
  • 参数选择:(GTR model)

    -nt 核酸

    -boot 1000

    -n read multiple alignments

    -fastest -- speed up the neighbor joining phase & reduce memory usage(recommended for >50,000 sequences)

    -gamma

    -log log file

    -run cpus : 通过在终端中输入export OMP_NUM_THREADS=3来控制运行的线程数。fasttree -help 会告诉你程序最终会用多少个线程运行。上例中为3.


  • fasttree model choice
    • GTR+CAT ; FastTree -gtr -nt alignment_file > tree_file
    • JC+CAT ; FastTree -nt alignment_file > tree_file

fastme

  • Nearest Neighbor Interchange (NNI)、 Subtree Pruning and Regrafting (SPR) 邻接法
  • 数据:nucleotide or amino acid multiple sequences alignments (MSA)
  • 示例:
cd /lustre/project/og04/shichunwei/project/temp/Tree\
perl fasta2phy.pl test.fasta\
perl -p -i -e 's/\./\-/g' test.phy\
/lustre/project/og04/shichunwei/biosoft/fastme-2.1.5/src/fastme -i test.phy -T 8 -B -b 1000 -d F84 -o outtree
  • 参数选择:

    -T number of threads

    -i input data file

    -o output tree file

    -B output bootstrap trees file


BIONJ

  • 邻接法
  • 输入数据:distance matrix from phylip

mega

  • 图形化交互式界面,不适合集群上使用。

phylip

  • 涵盖了邻接法、最大似然法和最大简约法构建发育树。重点还是数据准备(phy格式),使用起来比较简单,交互式的命令,故可能不适合串成自动运算的脚本。
  • link
  • /lustre/project/og04/shichunwei/biosoft/phylip-3.696/exe
  • 操作步骤(bootstrap检验):

  • bootstrap:先产生多套数据,再构树,然后合并得到最优树

  • MP法
    • seqboot 产生 1000套伪序列
    • dnapars,M选项为分析multiple data sets改为yes,产生1000个树结果
    • consence,得到一致树
    • 参数选择:
      • O 选择外类群
      • I inputfile interleaved or not

  • ML法
    • seqboot 产生 1000套伪序列
    • dnaml,M选项为分析multiple data sets改为yes,产生1000个树结果
    • consence,得到一致树

  • 距离法
    • seqboot 产生 1000套伪序列
    • dnadist 计算距离,更改M选项
    • neighbour 更改M选项,产生1000个树结果
    • consence 得到一致树

RaxML

  • 最大似然,起初来源于phylip的dnaml link
  • 示例:
cd /lustre/project/og04/shichunwei/project/temp/Tree/RAxML
/lustre/project/og04/shichunwei/biosoft/standard-RAxML-master/raxmlHPC -x 12345 -p 12345 -# 1000 -m GTRGAMMA -s test.phy -n out -f a -o EL -T 8
  • 1000次 bootstrap,得到最优树;-m 选择模型;-f a : fast bootstrap;-o 设置外类群;-T 线程数

phyml

  • 最大似然法,
/lustre/project/og04/shichunwei/biosoft/mpich-3.2/install_dir/bin/mpirun -n 4 /lustre/project/og04/shichunwei/biosoft/PhyML-3.1/PhyML-3.1_linux64 -i test.phy  -d nt -b 1000 -m GTR -c 4 -a e -s BEST
  • -m 选择模型;

    -b bootstrap;

    -i 默认DNA interleaved sequence;

    -d type,nt核酸,aa氨基酸;

    -q 更改 -i 为sequential format;

    -n dataset num

    -m model:HKY85 (default) | JC69 | K80 | F81 | F84 |TN93 | GTR | custom

    -a gamma:e

    -c number of relative substitution rate categories,default = 4

    -s BEST

    -多线程 mpirun -n 4

    -外类群设置:add “ * ” at the end of sequence name


LVB

/lustre/project/og04/shichunwei/biosoft/lvb_3.4_source/lvb/lvb -b 1000 -c l -i infile -o outtree -p 4 -s 12345 -t 1
  • -b bootstrap ; -p thread ; -t tree number ; -c cooling schedule,g is faster & l is more accurate ; -s random seed ;
  • the max sites : 500,0000.
  • bootstrap 之后,调用phylip consence ,指定 outgroup 得到最大简约有根树;也可以用 phylip retree 得到有根树
  • tree length ? shortest tree?

存在问题:

  • 不同软件得出的modeltest结果不一致;基于多种标准有不同的结果,该选择哪种标准,AIC?是否需要自定义氨基酸模型?
  • 取交集,或任选一个;标准基于AIC;倾向于选择而不是自定义
  • 有的软件输入文件是基于sequence的,不能用SNP简单连接成fasta或phy,故需标明只能用sequence的软件
  • 注意输入文件的格式,phy有两种格式

测试数据

  • 测试地址:/lustre/project/og04/project/KF-JL-B1-20150203-01_soybean/version3/02.pop_structure/tree/ML

  • 测试地址2: /lustre/project/og04/yuewei/project/KF-QD-A-20150512-01_crab/version2/06.analysis/paml/cds_sequences/cds_sequence/crab_cds_sequence.phy
    /lustre/project/og04/yuewei/project/KF-QD-A-20150512-01_crab/version2/06.analysis/paml/cds_sequences/cds_snp/crab_snp.phy

相关文章

  • 构建系统发育树

    系统发育树的构建 现有的方法 系统发育树构建方法的优劣 link 选择:一般情况下,若有合适的分子进化模型可供选择...

  • GWAS理论 1-3 群体结构与亲缘关系评估

    一. 群体结构评估 1.群体结构 群体结构评估内容构建系统发育树群体结构分析PCA(主成分分析) a.系统发育树 ...

  • 2022-05-31

    利用单拷贝基因构树利用orthofinder寻找单拷贝基因构建系统发育树 - Zhz Blog (zhouxiao...

  • 利用VCF文件构建系统发育树

    导读 本文将介绍三种使用VCF文件,构建系统发育树的方法,包括程序的安装,使用,已及系统发育树的可视化与美化。 1...

  • 代码积累

    计算机知识 $ vim ~/.bashrc 序列处理 构建系统发育树 本地比对 基因家族代码

  • 新一代建树工具IQ-Tree介绍

    原创:montreal生信人2018-06-20 系统发育树(phylogenetic tree)构建的软件可谓五...

  • 系统发育树构建简明教程

    1. 前言 构建一棵系统发育树是研究系统学和进化的基础。然而,发育树的构建是对分类单元进化历史的推测,因此对发育树...

  • 构建SNPs系统发育树

    如果根据SNP或者Indel构建其系统进化树,可以展示群体中不同个体的相互关系,基因变异相似的往往会在同一个树的c...

  • ZT:系统发育树的构建

    转自:宏基因组 ,舟行天下 相信有很多读者都会用MEGA软件进行系统发育树的构建,Mega是一款简单易用的系统发育...

  • 构建多基因的系统发育树

    参考:构建多基因的系统发育树 - 知乎(侵删致歉)[https://zhuanlan.zhihu.com/p/10...

网友评论

    本文标题:构建系统发育树

    本文链接:https://www.haomeiwen.com/subject/fxoysttx.html