Trees2MPTsAndStrict: Converts TNT tree output to ape format

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Trees2MPTsAndStrict.R

Description

Converts combined most parsimonious and strict component consensus trees from TNT output to ape format.

Usage

1

Arguments

filename

The filename of the TNT output file to read in.

Details

This is a function I use to process TNT (Goloboff and Catalano 2016) tree output from re-analysing source matrices, i.e., the MPT(s) and SC links you will see on my site. It assumes that something like the following block of code was used in TNT:

1
2
3
bbreak=tbr;
nelsen*;
export -MYFILENAMEtntmpts_plus_strict.nex;

In other words, after a final round of tree bisection reconnection (bbreak=tbr) the full set of most parsimonious trees (mpts) will be in memory and to these a strict component consensus will be appended (nelsen*) prior to writing out (export) just the trees (-) in TNT's custom format. NB: This is not quite Newick or NEXUS tree format and hence this function exists to read the TNT format and convert this into ape (Paradis and Schliep 2019) format, whilst also separating out the mpts from the strict component consensus ready for further processing.

Value

mpts

A phylo or multi.phylo object containing the most parsimoniou tree(s).

strict

A phylo object containing the strict component consensus tree.

Author(s)

Graeme T. Lloyd graemetlloyd@gmail.com

References

Goloboff, P. A. and Catalano, S. A., 2016. TNT version 1.5, including a full implementation of phylogenetic morphometrics. Cladistics, 32, 221-238.

Lloyd, G. T., Bapst, D. W., Friedman, M. and Davis, K. E., 2016. Probabilistic divergence time estimation without branch lengths: dating the origins of dinosaurs, avian flight, and crown birds. Biology Letters, 12, 20160609.

Paradis, E. and Schliep, K., 2019. ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R. Bioinformatics, 35, 526–528.

Examples

1
2
3
4
5
6
7
8
# An example line may look something like this:
#x <- Trees2MPTsAndStrict("tntoutput.tre")

# The mpts can be accessed with:
#x$mpts

# And the strict component consensus with:
#x$strict

graemetlloyd/metatree documentation built on April 29, 2021, 2:32 a.m.