Learn R Programming

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

TreeTools (version 1.5.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; 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,996

Version

1.5.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

September 8th, 2021

Functions in TreeTools (1.5.0)

CharacterInformation

Character information content
ApeTime

Read modification time from 'ape' Nexus file
Consensus

Consensus trees
ArtificialExtinction

Artificial Extinction
CladeSizes

Clade sizes
CompatibleSplits

Which splits are compatible?
CladisticInfo

Cladistic information content of a tree
ConsensusWithout

Reduced consensus, omitting specified taxa
AddTip

Add a tip to a phylogenetic tree
AncestorEdge

Ancestral edge
CollapseNode

Collapse nodes on a phylogenetic tree
EndSentence

Add full stop to end of a sentence
MSTEdges

Minimum spanning tree
MRCA

Most recent common ancestor
EdgeDistances

Distance between edges
ExtractTaxa

Extract taxa from a matrix block
NRooted

Number of trees
NPartitionPairs

Distributions of tips consistent with a partition pair
EnforceOutgroup

Generate a tree with a specific outgroup
Renumber

Renumber a tree's nodes and tips
RenumberTips

Renumber a tree's tips
MakeTreeBinary

Generate binary tree by collapsing polytomies
ListAncestors

List ancestors
DropTip

Drop tips from tree
EdgeAncestry

Ancestors of an edge
DescendantEdges

Identify descendant edges
Lobo.data

Data from Zhang et al. 2016
NewickTree

Write Newick Tree
ConstrainedNJ

Constrained neighbour-joining tree
Neworder

Reorder edges of a phylogenetic tree
GenerateTree

Generate pectinate, balanced or random trees
DoubleFactorial

Double factorial
ImposeConstraint

Force a tree to match a constraint
MatrixToPhyDat

Convert between matrices and phyDat objects
NonDuplicateRoot

Non-duplicate root
SortTree

Sort tree
SplitFrequency

Frequency of splits
MorphoBankDecode

Decode MorphoBank text
TreeTools-package

TreeTools
TreesMatchingSplit

Number of trees matching a bipartition split
LabelSplits

Label splits
NDescendants

Count descendants for each node in a tree
LeafLabelInterchange

Leaf label interchange
PairwiseDistances

Distances between each pair of trees
NJTree

Generate a neighbour joining tree
TreeIsRooted

Is tree rooted?
TotalCopheneticIndex

Total Cophenetic Index
TreeNumber

Unique integer indices for bifurcating tree topologies
NSplits

Number of distinct splits
unrootedKeys

Integer representing shape of a tree
match

Split matching
print.TreeNumber

Print TreeNumber object
sapply64

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

Number of rooted / unrooted tree shapes
SplitInformation

Phylogenetic information content of splitting leaves into two partitions
N1Spr

Number of trees one SPR step away
NodeDepth

Distance of each node from tree exterior
Subtree

Extract a subtree
SplitMatchProbability

Probability of matching this well
StringToPhyDat

Convert between strings and phyDat objects
UnshiftTree

Add tree to start of list
SupportColour

Colour for node support value
WriteTntCharacters

Write morphological character matrix to TNT file
NodeOrder

Order of each node in a tree
PolarizeSplits

Polarize splits on a single taxon
ReadCharacters

Read phylogenetic characters from file
NTip

Number of leaves in a phylogenetic tree
ReadTntTree

Parse TNT Tree
RenumberTree

Reorder tree edges and nodes
RootNode

Which node is a tree's root?
SampleOne

Quickly sample
Splits

Convert object to Splits
RightmostCharacter

Rightmost character of string
SingleTaxonTree

Generate a single taxon tree
TipLabels

Extract tip labels
TipsInSplits

Tips contained within splits
RootTree

Root or unroot a phylogenetic tree
SplitsInBinaryTree

Maximum splits in an n-leaf tree
as.Newick

Write a phylogenetic tree in Newick format
TreesMatchingTree

Number of trees containing a tree
brewer

Brewer palettes
TrivialSplits

Identify and remove trivial splits
as.multiPhylo

Convert object to multiPhylo class
.RandomParent

Random parent vector
logDoubleFactorials

Natural logarithms of double factorials
doubleFactorials

Double factorials
Stemwardness

'Stemwardness' of a leaf
Subsplit

Subset of a split on fewer leaves
UnrootedTreesMatchingSplit

Number of trees consistent with split
Unquote

Remove quotation marks from a string