Help! Running phylogenetic analyses in TNT

August 7, 2020

I’ve got a problem. For a paper I’m working on, I need to run a phylogenetic analysis based on that of Mannion et al. (2013) — the Lusotitan paper. The most recent version of that matrix, greatly expanded from the original version, is that of Mannion et al. (2019) — the Jiangshanosaurus paper — so I am working from that matrix.

But what exactly do I do with that Matrix? The analysis protocol is described on pages 12-13 of the PDF:

Several unstable and fragmentary taxa were excluded from the analyses (Astrophocaudia, Australodocus, Brontomerus, Fukuititan, Fusuisaurus, Liubangosaurus, Malarguesaurus, Mongolosaurus). Using equal weighting of characters, this pruned data matrix was analysed using the ‘Stabilize Consensus’ option in the ‘New Technology Search’ in TNT v. 1.5. Searches employed sectorial searches, drift and tree fusing, with the consensus stabilized five times, prior to using the resultant trees as the starting topologies for a ‘Traditional Search’, using Tree Bisection-Reconstruction. We then re-ran the analysis, using the same pruned matrix and protocol, but also applying extended implied weighting in TNT.

There is no problem downloading TNT: it’s freely available thanks to subsidy by the Willi Hennig Society. But the program is tricky to use, and documentation is rather cryptic. You drive TNT with scripts that look like this (short excerpt):

ttags =;
<tag generating commands>
ttags );
tsave *tags.tre;
save * <tree number>;
tsave /;

It seems, for example that = and ) are values that the ttags command accepts. But I’ve not been able to find documentation that spells out such things. (There is a help command, but its output too is cryptic.)

So here is my problem: how do I translate the Mannion et al. (2019) protocol into a TNT script? If anyone can help me with this, I will acknowledge the heck out of them the paper that eventually emerges from this rubble.

(Why not just ask Phil Mannion, you ask? I’ve been talking with Phil and he has been super-helpful: but he’s been using a Windows-only version of TNT in which you don’t write scripts, but invoke various menu options, so he’s not able to help with this directly.)

Thank you!

References

 

4 Responses to “Help! Running phylogenetic analyses in TNT”


  1. Looks at documentation … ugh! … Have you checked if the Windows version will run under WINE?
    Honestly, after reading the warnings in the general documentation about getting it to work right, it smells of manipulating the data until it fits the result you want rather than an unbiased technical evaluation of the relationship between a set of phylogenetic trees but I’m a software QA person not a Paleontologist so … YMMV.

  2. Mike Taylor Says:

    I probably could get the Windows version running under Wine; but even if I could, I would be left with a very irreproducible way of running my analysis — I would need to write down a manual sequence of GUI operations and correctly execute them every time I wanted to re-run the analysis with a change to the matrix. As a programmer, that is anathema to me: I want to write a script once, then run it whenever I need to with a single command.

    It is true that the warnings in the general documentation do not fill one with confidence. I don’t see any signs at all of “manipulating the data until it fits the result you want”, though — just of a program hacked together rather carelessly, and documentation consisting of whatever happened to occur to someone to write down at a given moment.

  3. Ben Moon Says:

    I think I can get through, bit by bit here for others to see and correct me.

    First, `help;` will show you all the commands and `help command;` shows the options for each command.

    TLDR: these commands should do it:

    “`
    mxram 1024;
    log my_analysis.out;
    proc ;
    taxcode +;
    taxcode -N;
    taxname =;
    xmult:sect drift fuse consense 5;

    xmult;
    mult=tbr;
    export = ew_trees.tre;
    nelsen;
    nelsen*; tchoose {strict}; export = ew_strict.tre;

    keep 0;
    xpiwe=;
    xmult;
    mult=tbr;
    export = iw_trees.tre;
    nelsen;
    nelsen*; tchoose {strict}; export = iw_strict.tre;
    log/;
    “`

    # Explanation

    Load the file into TNT with:

    `proc ;`

    You can also read in simple NEXUS files or export a tnt-formatted file from Mesquite.

    > Using equal weighting of characters, this pruned data matrix was analysed

    If the taxa to be pruned are still in the data file then you can use:

    `taxcode +;`

    to show the taxa and their codes, then:

    `taxcode -N;`

    to exclude them; replace N with the list of numbers for the taxa to remove.

    Also show taxon names instead of numbers, useful in plots and exports:

    `taxname=;`

    By default TNT holds only 100 trees, so use e.g. `hold 10000;` to change that. If you don’t have enough RAM allocated then use e.g. `mxram 1024;` and read in the data again.

    > analysed using the ‘Stabilize Consensus’ option in the ‘New Technology Search’
    > Searches employed sectorial searches, drift and tree fusing, with the consensus stabilized five times

    New technology is the `xmult;` command, so this is:

    `xmult=sect drift fuse consense 5;`

    I assume all of the settings for the arguments are the default: you can change the number of sectorial searches etc with e.g. `sect 5` or access more settings with e.g. `sectsch:args`.

    You can also use `xmult:` to save the settings but not run the command. This will produce some (many?) trees.

    > resultant trees as the starting topologies for a ‘Traditional Search’, using Tree Bisection-Reconstruction

    This goes into the `mult` command, which uses the previously found trees by default:

    `mult=tbr;`

    Which will output a set of trees. Export these from TNT as a Newick file with:

    `export = ew_trees.tre;`

    Compute a strict consensus with `nelsen;`, and save this with:

    `nelsen*; tchoose {strict}; export = ew_strict.tre;`

    > We then re-ran the analysis, using the same pruned matrix and protocol, but also applying extended implied weighting in TNT.

    This uses the command `xpiwe;`, which I’m not so familiar with, but think the run is similar to above:

    `keep 0; xpiwe=; xmult=sect drift fuse consense 5; mult=tbr;`

    Keep 0 gets rid of previous trees to start with a clean slate.

    Another useful thing is to have log file output with `log output.out` then end it with `log/;`. xmult can also do multiple hits (`xmult=hits 5;`) that act as replicate analyses, so you get more goes at finding the most parsimonious tree.

    Hopefully this gets you there. Feel free to email any other Qs (glbcm@bristol.ac.uk).

    Ben

  4. Mike Taylor Says:

    Woah! Ben, this is magnificent! Thank you so much! I will try it as soon as other obligations allow!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: