TNT_Script/guoyi.run

165 lines
5.1 KiB
Text
Raw Normal View History

2023-02-26 03:32:18 +08:00
log tnt.log;
macro=; taxname+1000; taxname=; mxram 10240; nstates 32; nstates NOGAPS;
2023-02-26 03:32:18 +08:00
2023-02-27 01:24:22 +08:00
/*Arguments*/
if ( argnumber != 1 )
silent -console;
quote - /--------------------------------------------------\;
quote - | GUOYI TNT SCRIPT 2022-2023 MIT |;
quote - | You need to give your filename |;
quote - | shell> tnt run guoyi.tnt filename, (Linux & Mac) |;
quote - | shell> tnt run guoyi.run filename; (Windows) |;
quote - \--------------------------------------------------/;
2023-02-27 01:24:22 +08:00
proc/;
end
/*Report what will be done*/
quote - /-----------------------------------------------\;
quote - | Implied weighting will be estimated. |;
quote - | TBR Mult and Xmult will be performed. |;
quote - | Strict consensus will be used. |;
quote - | Jackknifing, bootstrap and relative bremer |;
quote - | will be shown on the resample.svg. |;
quote - | Apomorphic characters mapping will be shown |;
quote - | on the apo.svg and saved to apo*.tre. |;
2023-02-27 01:24:22 +08:00
quote - | TL, CI and RI will be calculated finally. |;
quote - \------------------------------------------------/;
/*Set K*/
2023-09-11 13:57:30 +08:00
piwe=12;
2023-02-26 03:32:18 +08:00
2023-02-27 01:24:22 +08:00
/*Reopen tnt*/
2023-02-26 03:32:18 +08:00
procedure %1;
2023-07-19 01:24:49 +08:00
hold 10000;
2023-02-27 01:24:22 +08:00
/*Implied weighting settings*/
2023-02-26 03:32:18 +08:00
xpiwe(*;
piwe&;
/*Search trees*/
2023-07-19 19:47:57 +08:00
mult=replic 1000 tbr hold 1000;
bbreak=tbr fill;
2023-02-27 01:24:22 +08:00
sect: slack 1000;
2023-07-19 19:47:57 +08:00
xmult=hit 1000 noupdate replications 20 drift 10 ratchet 10 fuse 10 hold 1 keepall;
2023-02-27 01:24:22 +08:00
/*Export trees*/
2023-02-26 03:32:18 +08:00
export= trees.tre;
taxname-;
export= trees_no.tre;
taxname=;
2023-07-19 19:47:57 +08:00
tsave = trees.ctf;
tsave *= trees.tnt.tre;
2023-02-26 03:32:18 +08:00
2023-02-27 01:24:22 +08:00
/*Consensus tree*/
nelsen *;
2023-07-19 19:47:57 +08:00
/*Tree vault store*/
hold /+0;
tvault >/;
2023-07-19 19:47:57 +08:00
/*Export consensus tree*/
tchoose /;
2023-07-19 19:47:57 +08:00
export - original.tre;
taxname-;
export - original_no.tre;
tsave = original.ctf;
tsave *= original.tnt.tre;
2023-02-26 03:32:18 +08:00
/*Caulculate TL/CI/RI score*/
report-;
var-;
var =
0 themin
1 themax
2 CI
3 RI
4 TL
;
set themin minsteps;
set themax maxsteps;
set TL length[0];
set CI 'themin'/'TL'; /*CI=1 means no homoplasy*/
set RI ('themax'-'TL')/('themax'-'themin'); /*RI=1 character fits perfetcly*/
report=;
2023-07-20 20:53:29 +08:00
/*Apomorphic characters*/
export = winclada.tre;
taxname =;
ttags=;
apo >0;
quote - /----------------------------------------------\;
quote - apomorphy tags start ;
ttags/;
quote - apomorphy tags stop ;
quote - \----------------------------------------------/;
ttags & apo.svg thickness 7 italics fontsize 15;
export < apo.tre;
taxname-;
export - apo_no.tre;
ttags-;
/*Get jak/boot/relative-bremer support*/
2023-07-19 19:47:57 +08:00
tchoose/;
2023-02-26 03:32:18 +08:00
ttags=;
ttags]; /*in one line*/
resample jak replications 1000 from 0;
resample boot replications 1000 from 0;
2023-02-27 01:24:22 +08:00
sub 1; hold +1000; bbreak=fill;
sub 3; hold +3000; bbreak=fill;
sub 5; hold +5000; bbreak=fill;
sub 7; hold +7000; bbreak=fill;
bsupport[;
/*Export consensus tree with supports*/
ttags & resample.svg thickness 7 italics fontsize 15;
2023-07-19 19:47:57 +08:00
quote - /----------------------------------------------\;
quote - resample tags start ;
ttags/;
quote - resample tags stop ;
quote - \----------------------------------------------/;
export < resample.tre;
2023-02-26 03:32:18 +08:00
taxname-;
export - resample_no.tre;
ttags-;
/*Report CI/RI/TL */
2023-02-27 01:24:22 +08:00
macfloat 3;
quote Consistency Index (CI) is 'CI';
quote Retention Index (RI) is 'RI';
quote Tree Length (TL) is 'TL';
2023-02-27 01:24:22 +08:00
/*Report*/
quote - /----------------------------------------------\;
quote - | The analysis has been finished. |;
quote - | The file `tnt.log` contains |;
quote - | K, TL, CI and RI |;
quote - | The file `trees*.tre` contain |;
quote - | trees found by mult and xmult |;
2023-07-19 19:47:57 +08:00
quote - | The file `original*.tre` contain |;
quote - | strict consensus tree without label |;
quote - | The file `resample*.tre` contain |;
2023-07-19 19:47:57 +08:00
quote - | consensus tree with support |;
quote - | The file `apo*.tre` contain |;
quote - | tree with apomorphic character |;
2023-02-27 01:24:22 +08:00
quote - | The file `*_no.tre` contain |;
2023-07-20 20:53:29 +08:00
quote - | tree with `taxname-` |;
2023-07-19 19:47:57 +08:00
quote - | The file `*.ctf` tree file is |;
quote - | only readable for TNT |;
quote - | The file `*.tnt.tre` contain |;
quote - | is the ctf file with taxname |;
quote - | The file `resample.svg` contain |;
2023-02-27 01:24:22 +08:00
quote - | strict consensus tree with |;
quote - | relative jak, boot and bremer |;
2023-02-27 01:24:22 +08:00
quote - | support on the tree |;
quote - | The file `apo.svg` contain the |;
quote - | tree with apomorphy mapping |;
quote - | The file `winclada.tre` can be |;
quote - | converted by tnt2winclada |;
2023-02-27 01:24:22 +08:00
quote - \----------------------------------------------/;
/*Quit*/
zzz;