Using ttags to save bootstrap and branch lengths in the same newick file

83 views
Skip to first unread message

Daniel Nakamura

unread,
Oct 4, 2024, 11:15:24 AM10/4/24
to TNT-Tree Analysis using New Technology
Hi

In the example below, I am only able to export the bootstrap values in the output.nwk. What exactly should I do in the script below to save branch lengths from one of the MPTs and bootstrap in the same file?

proc example.tnt;
outgroup sp1;
mult= tbr replic 200 hold 1;
ttag-; ttag=; resample boot freq nogc replications 1000;
keep 1;
ttags );
ttags ;
export < output.nwk ;
log/ ;
quit ;

asher...@gmail.com

unread,
Apr 11, 2025, 9:30:36 AMApr 11
to TNT-Tree Analysis using New Technology
I've not been able to get TNT to write branch lengths that will be scaleable in, say, figtree, but I did manage at least to use a combination of ttag=; and blength*; to get TNT branch lengths written in parenthetical format, like this:

p file.tnt;
xmult=hits 10; bbreak=tbr;
taxname=;
ttags=;
blength*;
export - file.nex;

So blength values appear above branches as numbers, corresponding to what you get from the TNT command line with "blength*"; (without a ttags command writing them elsewhere). However they're not drawn proportionally.

Anyone know how to use TNT to write blength values in newick format so that figtree, mesquite etc. can draw them proportionally?

asher...@gmail.com

unread,
Apr 11, 2025, 9:30:36 AMApr 11
to TNT-Tree Analysis using New Technology
I've not been able to get TNT to write branch lengths that will be scaleable in, say, figtree, but I did manage at least to use a combination of ttag=; and blength*; to get TNT branch lengths written in parenthetical format, like this:

p file.tnt;
xmult=hits 10; bbreak=tbr;
taxname=;
ttags=;
blength*;
export - file.nex;

So blength values appear above branches as numbers, corresponding to what you get from the TNT command line with "blength*"; (without a ttags command writing them elsewhere). However they're not drawn proportionally.

Anyone know how to use TNT to write blength values in newick format so that R, figtree, mesquite etc. can draw them proportionally?

Robert Asher

On Friday, 4 October 2024 at 17:15:24 UTC+2 dani...@usp.br wrote:

Martín Ramírez

unread,
Apr 11, 2025, 2:06:27 PMApr 11
to TNT-Tree Analysis using New Technology
Hi Rob and all, 

I got a recipe from a colleague, that works very well: 

To convert optimal TNT trees into the Newick format, you need to do the following:
Once you have the optimal TNT trees, enter these commands in the TNT command line:
taxname=; tsave *phylogram.tree; ttags=; blen *0; save *; tsave/;
Then, open the file phylogram.tree in a text editor and replace the following:
- Replace all whitespace with ,
- Replace ,= with =
- Replace ,) with )
- Replace = with :

The resulting file is a Newick tree!

asher...@gmail.com

unread,
Apr 13, 2025, 9:42:54 AMApr 13
to TNT-Tree Analysis using New Technology
Thanks Martin!  It works.
FYI others should remember to delete in "phylogram.tree" the first line starting "tread..." and last one "proc...", so there's only one line showing the topology in parenthetical format. Then you can open in R, figtree, etc.

Is it possible to get branch lengths using PAUP-like optimizations, e.g., assuming >0 if any optimization is possible (as in collapse 1)?
Reply all
Reply to author
Forward
0 new messages