Learn R Programming

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

TreeTools (version 1.1.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; rooting of trees and extraction of subtrees; calculation and depiction of node support; calculation of ancestor-descendant relationships; 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.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

July 7th, 2020

Functions in TreeTools (1.1.0)

DescendantEdges

Identify descendant edges
CompatibleSplits

Which splits are compatible?
CharacterInformation

Character information content
CladisticInfo

Cladistic information content
CladeSizes

Clade sizes
ConsensusWithout

Consensus without taxa
ApeTime

Read modification time from 'ape' Nexus file
CollapseNode

Collapse nodes on a phylogenetic tree
AddTip

Add a tip to a phylogenetic tree
AncestorEdge

Ancestral edge
LeafLabelInterchange

Leaf label interchange
NodeDepth

Distance of each node from tree exterior
Neworder

Reorder edges of a phylogenetic tree
GenerateTree

Generate pectinate, balanced or random trees
LabelSplits

Label splits
MRCA

Most recent common ancestor
EdgeAncestry

Ancestors of an edge
EdgeDistances

Distance between edges
MakeTreeBinary

Generate binary tree by collapsing polytomies
Lobo.data

Data from Zhang et al. 2016
DoubleFactorial

Double factorial
DropTip

Drop tips from tree
NonDuplicateRoot

Non-duplicate root
NDescendants

Count descendants for each node in a tree
SplitInformation

Phylogenetic information content of splitting leaves into two partitions
N1Spr

Number of trees one SPR step away
NodeOrder

Order of each node in a tree
SplitFrequency

Frequency of splits
TreeIsRooted

Is tree rooted?
EnforceOutgroup

Generate a tree with a specific outgroup
ListAncestors

List ancestors
ExtractTaxa

Extract taxa from a matrix block
NRooted

Number of trees
TreeNumber

Unique integer indices for bifurcating tree topologies
TreesMatchingTree

Number of trees containing a tree
TreesMatchingSplit

Number of trees matching a bipartition split
SortTree

Sort tree
SingleTaxonTree

Generate a single taxon tree
SupportColour

Colour for node support value
TipLabels

Extract tip labels
NJTree

Generate a neighbour joining tree
NTip

Number of leaves in a phylogenetic tree
NSplits

Number of distinct splits
.RandomParent

Random parent vector
MatrixToPhyDat

Convert between matrices and phyDat objects
doubleFactorials

Double factorials
NPartitionPairs

Distributions of tips consistent with a partition pair
ReadTntTree

Parse TNT Tree
Subsplit

Subset of a split on fewer leaves
RootNode

Which node is a tree's root?
ReadCharacters

Read phylogenetic characters from file
StringToPhyDat

Convert between strings and phyDat objects
RightmostCharacter

Rightmost character of string
RootTree

Root or unroot a phylogenetic tree
Renumber

Renumber a tree's nodes and tips
TrivialSplits

Identify and remove trivial splits
Subtree

Extract a subtree
nRootedShapes

Number of rooted / unrooted tree shapes
NewickTree

Write Newick Tree
as.Splits

Convert object to Splits
brewer

Brewer palettes
sapply64

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

Number of trees consistent with split
RenumberTips

Renumber a tree's tips
RenumberTree

Reorder trees
TotalCopheneticIndex

Total Cophenetic Index
as.Newick

Write a phylogenetic tree in Newick format
UnshiftTree

Add tree to start of list
TipsInSplits

Tips contained within splits
SplitMatchProbability

Probability of matching this well
print.TreeNumber

Print TreeNumber object
SampleOne

Quickly sample
SplitsInBinaryTree

Maximum splits in an n-leaf tree
unrootedKeys

Integer representing shape of a tree
logDoubleFactorials

Natural logarithms of double factorials
TreeTools-package

TreeTools
match

Split matching