I (Nick Matzke) am currently working on an R package I am calling TNTR. It will include basic functions for reading/writing data and trees from R to TNT, and parsing the TNT outputs.
Although I am really a Bayesian, when working with morphology datasets and their various coding issues, it can be extremely useful to quickly estimate parsimony trees. Examples include: finding coding mistakes, finding starting trees, and finding parts of the tree with no morphological support at all.
Previously, getting trees and data into and out of TNT format was a huge pain. This should be easy with TNTR.
See also: TNTwiki, an archive page for the now-dead TNT help wiki; and tnt.htm, the help file from the TNT program.
Basic scripts
Basic functions for reading TNT trees, parsing the node numbers, etc., are available in "Files", below. Some of these will also require that you run the TNT script auto.run (which you may have to edit; attached in "Files"), a streamlined version of the aquickie script, which also runs stats.run (available at on the TNTwiki page, specifically TNT scripts) and some other TNT functions to get basic outputs (node numbers, etc.).
How to use
- Get your data into TNT format and save in a working directory
- Open TNT and load data (command "proc")
- Run auto.run
- Close TNT and open R
- Edit the R script to refer to your working directory and source "tnt_R_utils_v1.R" and other necessary source code listed in the script.
- Run the "_read_autorun_v1.R" script (or copy/paste the commands, etc.)
- You should get a series of PDF graphics show the strict consensus tree with various statistics etc. plotted on it.
How to cite
Until this is an official R package on CRAN (which will take some time), cite as:
Matzke, Nicholas J. (2015). TNTR: R functions to aid analyses in the cladistics program TNT. Available online at PhyloWiki: http://phylo.wikidot.com/tntr
File name | File type | Size | |
---|---|---|---|
auto.run | ASCII C program text | 24.74 kB | Info |
_read_autorun_v1.R | ASCII English text | 8.03 kB | Info |
tnt_R_utils_v1.R | ASCII English text | 99.36 kB | Info |