TreeTools1.12.0 package

Create, Modify and Analyse Phylogenetic Trees

AddTip

Add a tip to a phylogenetic tree

dot-RandomParent

Random parent vector

AncestorEdge

Ancestral edge

ApeTime

Read modification time from "ape" Nexus file

ArtificialExtinction

Artificial Extinction

as.multiPhylo

Convert object to multiPhylo class

as.Newick

Write a phylogenetic tree in Newick format

CharacterInformation

Character information content

CladeSizes

Clade sizes

CladisticInfo

Cladistic information content of a tree

ClusterTable-methods

S3 methods for ClusterTable objects

ClusterTable

Convert phylogenetic tree to ClusterTable

CollapseNode

Collapse nodes on a phylogenetic tree

CompatibleSplits

Which splits are compatible?

Consensus

Construct consensus trees

ConsensusWithout

Reduced consensus, omitting specified taxa

ConstrainedNJ

Constrained neighbour-joining tree

DescendantEdges

Identify descendant edges

DoubleFactorial

Double factorial

doubleFactorials

Double factorials

DropTip

Drop leaves from tree

edge_to_splits

Efficiently convert edge matrix to splits

EdgeAncestry

Ancestors of an edge

EdgeDistances

Distance between edges

EndSentence

Add full stop to end of a sentence

EnforceOutgroup

Generate a tree with a specified outgroup

ExtractTaxa

Extract taxa from a matrix block

GenerateTree

Generate pectinate, balanced or random trees

TipsInSplits

Tips contained within splits

Hamming

Hamming distance between taxa in a phylogenetic dataset

ImposeConstraint

Force a tree to match a constraint

is.TreeNumber

Is an object a TreeNumber object?

J1Index

Robust universal tree balance index

KeptPaths

Paths present in reduced tree

KeptVerts

Identify vertices retained when leaves are dropped

LabelSplits

Label splits

LeafLabelInterchange

Leaf label interchange

ListAncestors

List ancestors

Lobo.data

Data from Zhang et al. 2016

logDoubleFactorials

Natural logarithms of double factorials

MakeTreeBinary

Generate binary tree by collapsing polytomies

match.Splits

Split matching

MatchEdges

Match nodes and edges between trees

MatrixToPhyDat

Convert between matrices and phyDat objects

MorphoBankDecode

Decode MorphoBank text

MRCA

Most recent common ancestor

MSTEdges

Minimum spanning tree

N1Spr

Number of trees one SPR step away

NDescendants

Count descendants for each node in a tree

NewickTree

Write Newick Tree

Neworder

Reorder edges of a phylogenetic tree

NJTree

Generate a neighbour joining tree

NodeDepth

Distance of each node from tree exterior

NodeNumbers

Numeric index of each node in a tree NodeNumbers() returns a sequenc...

NodeOrder

Number of edges incident to each node in a tree

NPartitionPairs

Distributions of tips consistent with a partition pair

NRooted

Number of trees

NSplits

Number of distinct splits

NTip

Number of leaves in a phylogenetic tree

PairwiseDistances

Distances between each pair of trees

PathLengths

Calculate length of paths between each pair of vertices within tree

PhyToString

Convert between strings and phyDat objects

PolarizeSplits

Polarize splits on a single taxon

print.TreeNumber

Print TreeNumber object

ReadCharacters

Read phylogenetic characters from file

ReadMrBayesTrees

Read posterior tree sample produced by MrBayes

ReadTntTree

Parse TNT Tree

Renumber

Renumber a tree's nodes and tips

RenumberTips

Renumber a tree's tips

Reorder

Reorder tree edges and nodes

RightmostCharacter

Rightmost character of string

RoguePlot

Visualize position of rogue taxa

root_on_node

Wrapper for internal C function root_on_node()

RootNode

Which node is a tree's root?

RootTree

Root or unroot a phylogenetic tree

SampleOne

Quickly sample

sapply64

Apply a function that returns 64-bit integers over a list or vector

sort.multiPhylo

Sort a list of phylogenetic trees

SortTree

Sort tree

SpectrumLegend

Produce a legend for continuous gradient scales

SplitFrequency

Frequency of splits

SplitInformation

Phylogenetic information content of splitting leaves into two partitio...

SplitMatchProbability

Probability of matching this well

Splits

Convert object to Splits

SplitsInBinaryTree

Maximum splits in an n-leaf tree

Stemwardness

"Stemwardness" of a leaf

Subsplit

Subset of a split on fewer leaves

Subtree

Extract a subtree

SupportColour

Colour for node support value

TipLabels

Extract tip labels

TipTimedTree

Display time-calibrated tree using tip information only

TopologyOnly

Remove metadata from trees

TotalCopheneticIndex

Total Cophenetic Index

TreeIsRooted

Is tree rooted?

TreeNumber

Unique integer indices for bifurcating tree topologies

TreeShape

Integer representing shape of a tree

TreesMatchingSplit

Number of trees matching a bipartition split

TreesMatchingTree

Number of trees containing a tree

TreeTools-package

TreeTools

TrivialSplits

Identify and remove trivial splits

TrivialTree

Generate trivial trees

Unquote

Remove quotation marks from a string

UnrootedTreesMatchingSplit

Number of trees consistent with split

UnshiftTree

Add tree to start of list

WriteTntCharacters

Write morphological character matrix to TNT file

xor

Exclusive OR operation

Efficient implementations of functions for the creation, modification and analysis of phylogenetic trees. Applications include: generation of trees with specified shapes; tree rearrangement; analysis of tree shape; rooting of trees and extraction of subtrees; calculation and depiction of split support; plotting the position of rogue taxa (Klopfstein & Spasojevic 2019) <doi:10.1371/journal.pone.0212942>; calculation of ancestor-descendant relationships, of 'stemwardness' (Asher & Smith, 2022) <doi:10.1093/sysbio/syab072>, and of tree balance (Mir et al. 2013, Lemant et al. 2022) <doi:10.1016/j.mbs.2012.10.005>, <doi:10.1093/sysbio/syac027>; artificial extinction (Asher & Smith, 2022) <doi:10.1093/sysbio/syab072>; import and export of trees from Newick, Nexus (Maddison et al. 1997) <doi:10.1093/sysbio/46.4.590>, and TNT <https://www.lillo.org.ar/phylogeny/tnt/> formats; and analysis of splits and cladistic information.

  • Maintainer: Martin R. Smith
  • License: GPL (>= 3)
  • Last published: 2024-07-25