TNT

来自MalacoKnowledge

TNT 是一个专注于 MP 的系统发育软件,其以上个世纪Hennig86的风格、交互的设计、多样的搜索策略、更多的 resample 方法以及更好的搜索速度著称。

其作者声称该软件较 PAUP* 的搜索能力强。

本网站提供详细的命令,以分开的wiki页面形式提供。

基础文件

声明部分

TNT 文件头文件,ntax 和 nchar 是与 nexus 文件相同的,在实际文件中

xread
'comments
comments'
nchar ntax
;

数据部分

但是数据本身没有END;,请参考 Hennig86 的示例

group

group 在 tnt 中有三种,tree group tgroup, character xgroup, taxa group agroup。在文件底下定义。

A_其实是 taxname 前缀

agroup
 =0 (ACANTHOGONATUS) A_
 =1 (CHACO) Cha_
 =2 (STENOTEROMMATA) St_ H_
 =4 (LYCINUS) L_
 =5 (DIPLOTHELOPSIS) D_
 =6 (PYCNOTHELE) Pyc_
 =7 (RACHIAS) Rac_
 =8 (BARYCHELIDAE) Neod_ Bar Trich Cosmo
;

也可以按照数字来定义范围

agroup

=0 (extant) 0,37 =1 (fossils) 38,49

xgroup =0 (mor) 0,195

=1 (dna) 196,39294

常用操作

可以将下列的命令写到 txt 文件,让 TNT 直接运行

准备

mxram 是记录多少 MB 内存可用;nstates 声明文件类型:32 32离散字符,con 连续字符,protein 蛋白质,dna DNA;NOGAPS是不把 gap 视作别的字符状态。

mxram 10240 ;
nstates 32 ;
nstates NOGAPS ;

操作

procedure 打开;log 产生 log 文件;taxname 是在最终的树中使用名称,- 是默认的,不用名字,= 则是使用名字

procedure filename.tnt ;
log logfile ;
taxname= ;

quit 是退出

quit;

搜索

hold 在 RAM 中保留 999 个树;mult 是传统搜索 replic 是多少次重复,tbr 是 Tree Bisection Reconnection 搜索策略,99个树被保存

hold 999 ;
mult=replic 100 tbr hold 99;

`bbreak 是搜索策略设置,可以是 TBR SPR (Subtree Pruning Regrafting),

bbreak=tbr ;

合意

consensus 的方式有几种:严格合意树 nelsen; 半合意树 comcomp;多数合意树 majority* 是把合意树作为最后一个树保存在内存里。

majority * ;

Resample

Resample 有几种,如 boostrap:boot;jackifing:jakreplications 是重复次数。

resample boot replications 1000;

导出

export是导出 nexus 树文件,= 纯 newick 文件,< 保存 tags 为树的 labels。

ttags 是 tag 相关的设置,= 是保存树的 tag,要在树发生之前。& 是输出为 svg 图片,thickness 是树的粗细,italics 是样本名称斜体,fontsize 是样品名称大小。

export= trees.tre ;

ttags= ;
resample boot replications 1000;
ttags & bt.svg thickness 7 italics fontsize 15;
export < bt.tre ;

TL, CI & RI

length记录树长(Tree Length),stats.run 是一个计算 CI RI 的脚本

length * ;
stats.run;

stats.run 内容如下

macro= ;
report- ;
var =
   0 themin
   1 themax
   + CIs [ ( ntrees + 1 ) ]
   + RIs [ ( ntrees + 1 ) ]
   + this
;
set themin minsteps ;
set themax maxsteps ;
loop 0 ntrees
   progress #1 (ntrees+1) Calculating indices... ;
   set this length[#1] ;
   set CIs[#1] 'themin'/'this' ;
   set RIs[#1] ('themax'-'this')/('themax'-'themin') ;
   stop
progress/ ;
report= ;
macfloat 3 ;
maketable CIs Consistency index ;
maketable RIs Retention index ;
proc/ ;

Weighting

piwe 确定 k 值,根据 Goloboff et al. (2018),一般 k 应该在 3 到 12 之间,数量级越大的数据,往往 k 越大越可以获得更好的结果。但是自认为 k 应该凭借连续 k 产出的 CI RI 进行判断,从而选择最佳的 k 。

piwe 应该在输入文件前定义。

xpiwe(* 则是自动对空位降低 weighting。

对于二者,& 则是输出相关 weighting 设置。

Outgroup

设置多个外群可以通过 force 以及 constrain 操作

假设现在有 26 个样本,01 是外群则这样设置

force + [2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25];
constrain=;

示例

记得修改 filename.txt,也要把 stats.run 放在同一个文件夹下。也可以使用 TNT Script guoyi.run

mxram 10240 ;
nstates 32 ;
nstates NOGAPS ;

piwe=12;

procedure filename.tnt ;
log tnt.log ;
taxname= ;

hold 9999 ;
xpiwe(*; mult=replic 100 tbr hold 1000;
xpiwe&; piwe&;

bbreak=tbr ;
majority * ;
tchoose /;
export= trees.tre ;

ttags= ;
resample boot replications 1000 from 0;
ttags & bt.svg thickness 7 italics fontsize 15;
export < bt.tre ;

length * ;
stats.run;

quit ;

trees.tre 是搜索的树;bt.tre 是有 bootstrap 支持的多数合意树,但是没有树长;bt.svg 是有树长的,但是只是图片,但是是多数合意树的;tnt.log 里有 LT CI RI 的数值。

TL 示例如下

Saved trees (Nexus format) to file bt.nex
Tree lengths

             0

      0  16677

CI 示例如下

Consistency index

             0

      0  0.095

RI 示例如下

Retention index  
 
             0 
               
      0  0.627