Learn R Programming

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

TreeTools (version 1.3.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; analysis of tree shape; 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,855

Version

1.3.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

September 22nd, 2020

Functions in TreeTools (1.3.0)

AddTip

Add a tip to a phylogenetic tree
EnforceOutgroup

Generate a tree with a specific outgroup
N1Spr

Number of trees one SPR step away
NDescendants

Count descendants for each node in a tree
NodeDepth

Distance of each node from tree exterior
Neworder

Reorder edges of a phylogenetic tree
ApeTime

Read modification time from 'ape' Nexus file
Stemwardness

'Stemwardness' of a leaf
RootTree

Root or unroot a phylogenetic tree
SampleOne

Quickly sample
ArtificialExtinction

Artificial Extinction
Subsplit

Subset of a split on fewer leaves
TreeNumber

Unique integer indices for bifurcating tree topologies
unrootedKeys

Integer representing shape of a tree
DescendantEdges

Identify descendant edges
DoubleFactorial

Double factorial
ListAncestors

List ancestors
NewickTree

Write Newick Tree
NTip

Number of leaves in a phylogenetic tree
Lobo.data

Data from Zhang et al. 2016
RightmostCharacter

Rightmost character of string
CharacterInformation

Character information content
CladeSizes

Clade sizes
Subtree

Extract a subtree
RootNode

Which node is a tree's root?
SupportColour

Colour for node support value
TreeTools-package

TreeTools
TreesMatchingSplit

Number of trees matching a bipartition split
.RandomParent

Random parent vector
doubleFactorials

Double factorials
match

Split matching
logDoubleFactorials

Natural logarithms of double factorials
LabelSplits

Label splits
LeafLabelInterchange

Leaf label interchange
NJTree

Generate a neighbour joining tree
NPartitionPairs

Distributions of tips consistent with a partition pair
NodeOrder

Order of each node in a tree
RenumberTips

Renumber a tree's tips
NonDuplicateRoot

Non-duplicate root
RenumberTree

Reorder trees
SplitFrequency

Frequency of splits
DropTip

Drop tips from tree
CladisticInfo

Cladistic information content of a tree
CollapseNode

Collapse nodes on a phylogenetic tree
SplitInformation

Phylogenetic information content of splitting leaves into two partitions
UnrootedTreesMatchingSplit

Number of trees consistent with split
as.Splits

Convert object to Splits
UnshiftTree

Add tree to start of list
brewer

Brewer palettes
CompatibleSplits

Which splits are compatible?
MRCA

Most recent common ancestor
EdgeAncestry

Ancestors of an edge
MSTEdges

Edges of minimum spanning tree
NSplits

Number of distinct splits
NRooted

Number of trees
ConsensusWithout

Consensus without taxa
Renumber

Renumber a tree's nodes and tips
ReadTntTree

Parse TNT Tree
ExtractTaxa

Extract taxa from a matrix block
GenerateTree

Generate pectinate, balanced or random trees
SplitMatchProbability

Probability of matching this well
SplitsInBinaryTree

Maximum splits in an n-leaf tree
TreesMatchingTree

Number of trees containing a tree
MakeTreeBinary

Generate binary tree by collapsing polytomies
MatrixToPhyDat

Convert between matrices and phyDat objects
StringToPhyDat

Convert between strings and phyDat objects
ReadCharacters

Read phylogenetic characters from file
TrivialSplits

Identify and remove trivial splits
WriteTntCharacters

Write morphological character matrix to TNT file
SingleTaxonTree

Generate a single taxon tree
TipLabels

Extract tip labels
TipsInSplits

Tips contained within splits
SortTree

Sort tree
as.Newick

Write a phylogenetic tree in Newick format
TreeIsRooted

Is tree rooted?
TotalCopheneticIndex

Total Cophenetic Index
sapply64

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

Number of rooted / unrooted tree shapes
print.TreeNumber

Print TreeNumber object
AncestorEdge

Ancestral edge
EdgeDistances

Distance between edges