构建系统发育树

系统发育树的构建


现有的方法

邻接法(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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容