Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
16cc9c1cf3 | |||
a5c85911d0 | |||
561f88be60 |
2 changed files with 42 additions and 40 deletions
|
@ -14,7 +14,7 @@ TNT Script for Maximum Parsimony Analysis (Phylogeny)
|
||||||
|
|
||||||
- Extended implied weighting with K value setting (default, default K=12) or implied weighting with K value setting (default K=12) or equal weighting.
|
- Extended implied weighting with K value setting (default, default K=12) or implied weighting with K value setting (default K=12) or equal weighting.
|
||||||
|
|
||||||
- Search trees via implicit enumeration (ntax<=25, but not for eiw) or TBR Mult (1000 times) with branch swapping (25<ntax<75, also for ntax<=25 with eiw) or Mult with branch swapping and Xmult (use random sectorial searches, produce 50 hits to best length and stop, 10 cycles of drifting, ratchet and fusing) (ntax>=75).
|
- Search trees via implicit enumeration (ntax<=20, but not for eiw) or TBR Mult (1000 times) with branch swapping (20<ntax<75, also for ntax<=20 with eiw) or Mult with branch swapping and Xmult (use random sectorial searches, produce 50 hits to best length and stop, 10 cycles of drifting, ratchet and fusing) (ntax>=75).
|
||||||
|
|
||||||
- Perform Strict consensus / Majority-rule consensus (without bremer support variations) / Half strict consensus (without bremer support variations).
|
- Perform Strict consensus / Majority-rule consensus (without bremer support variations) / Half strict consensus (without bremer support variations).
|
||||||
|
|
||||||
|
@ -56,7 +56,9 @@ tnt run guoyi.run filename datatype weight 0/K cons resample prefix,
|
||||||
|
|
||||||
- resample should be sum of what you want
|
- resample should be sum of what you want
|
||||||
|
|
||||||
- relative bremer support (rbrs)=0.1, bremer support (brs)=0.2, jackknifing (jak)=1, bootstrap (boot)=2, symmetric resampling (sym)=4 i.e. rbrs+jak+boot+sym=7.1 (default)
|
- relative bremer support (rbrs)=0.1, bremer support (brs)=0.2, jackknifing (jak)=1, bootstrap (boot)=2, symmetric resampling (sym)=4 i.e. jak+boot+sym=7 (default)
|
||||||
|
|
||||||
|
- Notice: Bremer related support would change the tree topology, so it should be used with caution.
|
||||||
|
|
||||||
- prefix can be empty or a string
|
- prefix can be empty or a string
|
||||||
|
|
||||||
|
@ -96,7 +98,7 @@ tnt run guoyi.run filename datatype weight 0/K cons resample prefix,
|
||||||
|
|
||||||
## Cite
|
## Cite
|
||||||
|
|
||||||
Cite this script is mandatory, list me (Guoyi Zhang) in your Acknowledgements is recommended. This script follows MIT License.
|
If you use this script, you **must** cite this script and cite [TNT](https://www.lillo.org.ar/phylogeny/tnt/). I kindly request that you acknowledge Guoyi Zhang in your Acknowledgements. This script follows MIT License.
|
||||||
|
|
||||||
# Further information
|
# Further information
|
||||||
|
|
||||||
|
|
74
guoyi.run
74
guoyi.run
|
@ -7,7 +7,7 @@ if ( (argnumber == 0) || (argnumber >7) )
|
||||||
silent -console;
|
silent -console;
|
||||||
quote
|
quote
|
||||||
/----------------------------------------------------\
|
/----------------------------------------------------\
|
||||||
| GUOYI TNT SCRIPT 2022-2023 MIT |
|
| GUOYI TNT SCRIPT 2022-2025 MIT |
|
||||||
| You need to give your filename |
|
| You need to give your filename |
|
||||||
| shell> tnt run guoyi.tnt filename, (Linux & Mac) |
|
| shell> tnt run guoyi.tnt filename, (Linux & Mac) |
|
||||||
| shell> tnt run guoyi.run filename(semicolon) (Win) |
|
| shell> tnt run guoyi.run filename(semicolon) (Win) |
|
||||||
|
@ -26,8 +26,8 @@ if ( (argnumber == 0) || (argnumber >7) )
|
||||||
| eiw=extended implied weight (default) |
|
| eiw=extended implied weight (default) |
|
||||||
| N.B. K of ew must followed 0 (=NA) |
|
| N.B. K of ew must followed 0 (=NA) |
|
||||||
| - K is 12 (default) following Goloboff |
|
| - K is 12 (default) following Goloboff |
|
||||||
| et al. 2017 (Cladistics 34: 407–437) |
|
| et al. 2017 (Cladistics 34: 407-437) |
|
||||||
| it must more than 0 |
|
| it must be more than 0 |
|
||||||
| - cons should be str, mjr, hlf |
|
| - cons should be str, mjr, hlf |
|
||||||
| mjr=majority rule, hlf=half |
|
| mjr=majority rule, hlf=half |
|
||||||
| str=strict (default) |
|
| str=strict (default) |
|
||||||
|
@ -44,8 +44,8 @@ end
|
||||||
/*Var for handling args*/
|
/*Var for handling args*/
|
||||||
var:
|
var:
|
||||||
dojak doboot dosym dobrs dorbrs rsmp dobremer
|
dojak doboot dosym dobrs dorbrs rsmp dobremer
|
||||||
dostr domjr dohlf contype
|
dostr domjr dohlf contype[5]
|
||||||
doew doiw doeiw dowt wtstring wttype
|
doew doiw doeiw dowt wtstring[5] wttype /*[5] limits the character number, avoid overwriting values in the next declared variable.*/
|
||||||
kvalue
|
kvalue
|
||||||
search
|
search
|
||||||
isfas istnt isnex input;
|
isfas istnt isnex input;
|
||||||
|
@ -63,17 +63,17 @@ goto=%0;
|
||||||
set input $%1;
|
set input $%1;
|
||||||
|
|
||||||
/*confirm input format*/
|
/*confirm input format*/
|
||||||
if ((eqstring [ $input>. fas ]) || (eqstring [ $input>. fasta ]))
|
if ((isinstring [ $input .fas ] == lenstring[ $input ] ) || (isinstring [ $input .fasta ] == lenstring[ $input ] ))
|
||||||
set isfas 1;
|
set isfas 1;
|
||||||
else
|
else
|
||||||
if ((eqstring [ $input>. tnt ]) || (eqstring [ $input>. ss ]))
|
if ((isinstring [ $input .tnt ] == lenstring[ $input ] ) || (isinstring [ $input .ss ] == lenstring[ $input ] ))
|
||||||
set istnt 1;
|
set istnt 1;
|
||||||
else
|
else
|
||||||
if ((eqstring [ $input>. nex ]) || (eqstring [ $input>. nexus ]))
|
if ((isinstring [ $input .nex ] == lenstring[ $input ] ) || (isinstring [ $input .nexus ] == lenstring[ $input ] ))
|
||||||
set isnex 1;
|
set isnex 1;
|
||||||
else
|
else
|
||||||
errmsg extension name of input file must be fas/fasta (for fas format), tnt/ss (for Hennig86/NONA/TNT format), nex/nexus (for nex format);
|
errmsg extension name of input file must be fas/fasta (for fas format), tnt/ss (for Hennig86/NONA/TNT format), nex/nexus (for nex format);
|
||||||
end end end
|
xend /*multiple end, but can't be used inside loops*/
|
||||||
|
|
||||||
/*handle weighting type*/
|
/*handle weighting type*/
|
||||||
if (argnumber>=3)
|
if (argnumber>=3)
|
||||||
|
@ -109,9 +109,9 @@ if (argnumber>=4)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
/*handle resmaple type*/
|
/*handle resample type*/
|
||||||
if (argnumber<6)
|
if (argnumber<6)
|
||||||
set dojak 1; set doboot 1; set dosym 1; set dorbrs 1;
|
set dojak 1; set doboot 1; set dosym 1; set dorbrs 0;
|
||||||
else
|
else
|
||||||
set rsmp %6;
|
set rsmp %6;
|
||||||
loop 1 5
|
loop 1 5
|
||||||
|
@ -192,7 +192,7 @@ end end
|
||||||
/*Basic settings*/
|
/*Basic settings*/
|
||||||
taxname+1000;
|
taxname+1000;
|
||||||
taxname=;
|
taxname=;
|
||||||
mxram 10240;
|
mxram[; mxram*2; /*allocate twice as much RAM as TNT thinks*/
|
||||||
if(argnumber>=2)
|
if(argnumber>=2)
|
||||||
nstates %2;
|
nstates %2;
|
||||||
else
|
else
|
||||||
|
@ -215,7 +215,7 @@ end end
|
||||||
hold 10000;
|
hold 10000;
|
||||||
|
|
||||||
/*handle search*/
|
/*handle search*/
|
||||||
if (ntax<=24) /*taxa lower than 25 (including 25)*/
|
if (ntax<=19) /*taxa lower than 20 (including 20)*/
|
||||||
if ('doeiw')
|
if ('doeiw')
|
||||||
set search 2;
|
set search 2;
|
||||||
else
|
else
|
||||||
|
@ -243,7 +243,7 @@ else
|
||||||
if ('wttype'==3)
|
if ('wttype'==3)
|
||||||
quote
|
quote
|
||||||
| Ex-implied weighting will be used, K is 'kvalue'. |;
|
| Ex-implied weighting will be used, K is 'kvalue'. |;
|
||||||
end end end
|
xend
|
||||||
|
|
||||||
if ('search'==1)
|
if ('search'==1)
|
||||||
quote
|
quote
|
||||||
|
@ -256,7 +256,7 @@ else
|
||||||
if ('search'==3)
|
if ('search'==3)
|
||||||
quote
|
quote
|
||||||
| Xmult will be performed. |;
|
| Xmult will be performed. |;
|
||||||
end end end
|
xend
|
||||||
|
|
||||||
if ('dostr')
|
if ('dostr')
|
||||||
quote
|
quote
|
||||||
|
@ -269,7 +269,7 @@ else
|
||||||
if ('dohlf')
|
if ('dohlf')
|
||||||
quote
|
quote
|
||||||
| Half strict consensus will be used. |;
|
| Half strict consensus will be used. |;
|
||||||
end end end
|
xend
|
||||||
|
|
||||||
quote
|
quote
|
||||||
| resample.svg will contain a tree with |;
|
| resample.svg will contain a tree with |;
|
||||||
|
@ -324,7 +324,7 @@ if ('search'==3)
|
||||||
sect: slack 40;
|
sect: slack 40;
|
||||||
xmult=hit 50 replications 20 drift 10 ratchet 10 fuse 10 hold 1 keepall;
|
xmult=hit 50 replications 20 drift 10 ratchet 10 fuse 10 hold 1 keepall;
|
||||||
bbreak=tbr fill;
|
bbreak=tbr fill;
|
||||||
end end end
|
xend
|
||||||
|
|
||||||
/*Export trees*/
|
/*Export trees*/
|
||||||
export= %7.trees.tre;
|
export= %7.trees.tre;
|
||||||
|
@ -347,7 +347,7 @@ if ('domjr')
|
||||||
else
|
else
|
||||||
if ('dohlf')
|
if ('dohlf')
|
||||||
comcomp * 0.'npars';
|
comcomp * 0.'npars';
|
||||||
end end end
|
xend
|
||||||
|
|
||||||
/*Get the consensus tree number*/
|
/*Get the consensus tree number*/
|
||||||
var: contree;
|
var: contree;
|
||||||
|
@ -356,7 +356,6 @@ set contree ntrees;
|
||||||
/*Store consensus tree to tree vault*/
|
/*Store consensus tree to tree vault*/
|
||||||
hold /+0;
|
hold /+0;
|
||||||
tv>/;
|
tv>/;
|
||||||
tchoose 0.'npars';
|
|
||||||
|
|
||||||
/*Get rbr/br/jak/boot/sym support and get consensus tree*/
|
/*Get rbr/br/jak/boot/sym support and get consensus tree*/
|
||||||
ttags=;
|
ttags=;
|
||||||
|
@ -372,27 +371,27 @@ ttags]; /*in one line*/
|
||||||
|
|
||||||
if ('dobremer')
|
if ('dobremer')
|
||||||
|
|
||||||
/*set value of suboptimal from most parsimony tree */
|
/*set value of suboptimal from most parsimonious tree */
|
||||||
sub: 0;
|
sub: 0;
|
||||||
|
|
||||||
/*calculate relative bremer support*/
|
/*calculate relative bremer support*/
|
||||||
if ('dorbrs')
|
if ('dorbrs')
|
||||||
bs *]!! 0.'npars';
|
bs ]!! 0.'npars';
|
||||||
end
|
end
|
||||||
|
|
||||||
/*calculate bremer support*/
|
/*calculate bremer support*/
|
||||||
if ('dobrs')
|
if ('dobrs')
|
||||||
macfloat 1; /*set the br value float*/
|
macfloat 1; /*set the br value float*/
|
||||||
bsupport *!! 0.'npars';
|
bsupport !! 0.'npars';
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
/*Choose final tree*/
|
/*Choose final tree*/
|
||||||
tv<;
|
tv<;
|
||||||
tchoose /;
|
tchoose /;
|
||||||
|
|
||||||
/*adjust to zero following Pablo Goloboff*/
|
/*Reset suboptimal to zero (resampling will do searches!)*/
|
||||||
sub 0;
|
sub 0;
|
||||||
|
|
||||||
/*jakknifing*/
|
/*jakknifing*/
|
||||||
|
@ -460,7 +459,7 @@ cscores;
|
||||||
log/;
|
log/;
|
||||||
log + %7.tnt.log;
|
log + %7.tnt.log;
|
||||||
|
|
||||||
/*Caulculate TL/CI/RI score*/
|
/*Calculate TL/CI/RI score*/
|
||||||
report-;
|
report-;
|
||||||
var: themin themax CI RI TL ;
|
var: themin themax CI RI TL ;
|
||||||
set themin minsteps;
|
set themin minsteps;
|
||||||
|
@ -468,7 +467,7 @@ set themax maxsteps;
|
||||||
set TL length[0];
|
set TL length[0];
|
||||||
set CI 'themin'/'TL'; /*CI=1 means no homoplasy*/
|
set CI 'themin'/'TL'; /*CI=1 means no homoplasy*/
|
||||||
if ('themax' != 'themin')
|
if ('themax' != 'themin')
|
||||||
set RI ('themax'-'TL')/('themax'-'themin'); /*RI=1 character fits perfetcly*/
|
set RI ('themax'-'TL')/('themax'-'themin'); /*RI=1 character fits perfectly*/
|
||||||
else
|
else
|
||||||
set RI 999;
|
set RI 999;
|
||||||
end
|
end
|
||||||
|
@ -501,17 +500,14 @@ Data saved from TNT
|
||||||
'chanum' 'taxnum';
|
'chanum' 'taxnum';
|
||||||
/*outhead body*/
|
/*outhead body*/
|
||||||
xread!;
|
xread!;
|
||||||
/*output split symnol*/
|
/* finishing semicolon */
|
||||||
runc!
|
quote .,; /* `.,` means `;` */
|
||||||
tntprintf(";\n\n");
|
|
||||||
!
|
|
||||||
/*output the tread*/
|
/*output the tread*/
|
||||||
taxname-;
|
taxname-;
|
||||||
tp*;
|
tp*;
|
||||||
/*output the end*/
|
/* finishing semicolon */
|
||||||
runc!
|
quote .,;
|
||||||
tntprintf("proc/;\n");
|
quote proc/.,;
|
||||||
!
|
|
||||||
log/;
|
log/;
|
||||||
log + %7.tnt.log;
|
log + %7.tnt.log;
|
||||||
|
|
||||||
|
@ -549,7 +545,11 @@ if ('dohlf')
|
||||||
quote
|
quote
|
||||||
| half strict consensus tree with |;
|
| half strict consensus tree with |;
|
||||||
end end end
|
end end end
|
||||||
|
if ('dobremer')
|
||||||
|
quote
|
||||||
|
| WARNING: bremer-related will |
|
||||||
|
| WARNING: change the polytomy |;
|
||||||
|
end
|
||||||
if ('dorbrs')
|
if ('dorbrs')
|
||||||
quote
|
quote
|
||||||
| relative bremer support |;
|
| relative bremer support |;
|
||||||
|
@ -578,12 +578,12 @@ else
|
||||||
if ('doiw')
|
if ('doiw')
|
||||||
quote
|
quote
|
||||||
| under implied weighting, |
|
| under implied weighting, |
|
||||||
| K value is 'kvalue' |;
|
| K value is 'kvalue' |;
|
||||||
else
|
else
|
||||||
if ('doeiw')
|
if ('doeiw')
|
||||||
quote
|
quote
|
||||||
| under extended implied weighting, |
|
| under extended implied weighting, |
|
||||||
| K value is 'kvalue' |;
|
| K value is 'kvalue' |;
|
||||||
end end end
|
end end end
|
||||||
|
|
||||||
quote
|
quote
|
||||||
|
|
Loading…
Add table
Reference in a new issue