Learn R Programming

⚠️There's a newer version (1.14.0) of this package.Take me there.

TreeTools (version 1.6.0)

Create, Modify and Analyse Phylogenetic Trees

Description

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) ; calculation of ancestor-descendant relationships, of 'stemwardness' (Asher & Smith, 2021) , and of tree balance (Mir et al. 2013) ; artificial extinction (Asher & Smith, 2021) ; import and export of trees from Newick, Nexus (Maddison et al. 1997) , and TNT formats; and analysis of splits and cladistic information.

Copy Link

Version

Install

install.packages('TreeTools')

Monthly Downloads

1,855

Version

1.6.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

January 12th, 2022

Functions in TreeTools (1.6.0)

CollapseNode

Collapse nodes on a phylogenetic tree
CladeSizes

Clade sizes
CompatibleSplits

Which splits are compatible?
ApeTime

Read modification time from 'ape' Nexus file
Consensus

Construct consensus trees
CharacterInformation

Character information content
ArtificialExtinction

Artificial Extinction
CladisticInfo

Cladistic information content of a tree
AddTip

Add a tip to a phylogenetic tree
AncestorEdge

Ancestral edge
EnforceOutgroup

Generate a tree with a specific outgroup
EdgeAncestry

Ancestors of an edge
LabelSplits

Label splits
ImposeConstraint

Force a tree to match a constraint
DropTip

Drop tips from tree
EdgeDistances

Distance between edges
GenerateTree

Generate pectinate, balanced or random trees
EndSentence

Add full stop to end of a sentence
Hamming

Hamming distance between taxa in a phylogenetic dataset
ConsensusWithout

Reduced consensus, omitting specified taxa
ConstrainedNJ

Constrained neighbour-joining tree
N1Spr

Number of trees one SPR step away
LeafLabelInterchange

Leaf label interchange
ListAncestors

List ancestors
NRooted

Number of trees
ReadTntTree

Parse TNT Tree
RenumberTips

Renumber a tree's tips
NSplits

Number of distinct splits
Renumber

Renumber a tree's nodes and tips
RenumberTree

Reorder tree edges and nodes
DoubleFactorial

Double factorial
MRCA

Most recent common ancestor
DescendantEdges

Identify descendant edges
Lobo.data

Data from Zhang et al. 2016
MatrixToPhyDat

Convert between matrices and phyDat objects
PolarizeSplits

Polarize splits on a single taxon
NDescendants

Count descendants for each node in a tree
MSTEdges

Minimum spanning tree
ExtractTaxa

Extract taxa from a matrix block
MakeTreeBinary

Generate binary tree by collapsing polytomies
TipLabels

Extract tip labels
SplitInformation

Phylogenetic information content of splitting leaves into two partitions
SplitMatchProbability

Probability of matching this well
ReadCharacters

Read phylogenetic characters from file
NewickTree

Write Newick Tree
NodeOrder

Order of each node in a tree
NTip

Number of leaves in a phylogenetic tree
TipsInSplits

Tips contained within splits
NJTree

Generate a neighbour joining tree
match

Split matching
Neworder

Reorder edges of a phylogenetic tree
NodeDepth

Distance of each node from tree exterior
Splits

Convert object to Splits
SampleOne

Quickly sample
TotalCopheneticIndex

Total Cophenetic Index
SplitsInBinaryTree

Maximum splits in an n-leaf tree
SortTree

Sort tree
SingleTaxonTree

Generate a single taxon tree
NonDuplicateRoot

Non-duplicate root
Unquote

Remove quotation marks from a string
as.Newick

Write a phylogenetic tree in Newick format
TreeIsRooted

Is tree rooted?
RightmostCharacter

Rightmost character of string
MorphoBankDecode

Decode MorphoBank text
PairwiseDistances

Distances between each pair of trees
NPartitionPairs

Distributions of tips consistent with a partition pair
StringToPhyDat

Convert between strings and phyDat objects
RootNode

Which node is a tree's root?
SplitFrequency

Frequency of splits
RootTree

Root or unroot a phylogenetic tree
nRootedShapes

Number of rooted / unrooted tree shapes
RoguePlot

Visualize position of rogue taxa
UnrootedTreesMatchingSplit

Number of trees consistent with split
UnshiftTree

Add tree to start of list
Stemwardness

'Stemwardness' of a leaf
SupportColour

Colour for node support value
TreeNumber

Unique integer indices for bifurcating tree topologies
Subtree

Extract a subtree
unrootedKeys

Integer representing shape of a tree
.RandomParent

Random parent vector
brewer

Brewer palettes
as.multiPhylo

Convert object to multiPhylo class
logDoubleFactorials

Natural logarithms of double factorials
TreesMatchingSplit

Number of trees matching a bipartition split
TreeTools-package

TreeTools
doubleFactorials

Double factorials
WriteTntCharacters

Write morphological character matrix to TNT file
TreesMatchingTree

Number of trees containing a tree
TrivialSplits

Identify and remove trivial splits
Subsplit

Subset of a split on fewer leaves
print.TreeNumber

Print TreeNumber object
sapply64

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