Learn R Programming

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

TreeTools (version 1.4.2)

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.4.2

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

January 26th, 2021

Functions in TreeTools (1.4.2)

ApeTime

Read modification time from 'ape' Nexus file
LabelSplits

Label splits
ArtificialExtinction

Artificial Extinction
LeafLabelInterchange

Leaf label interchange
NSplits

Number of distinct splits
NRooted

Number of trees
CharacterInformation

Character information content
CladeSizes

Clade sizes
DropTip

Drop tips from tree
CompatibleSplits

Which splits are compatible?
ConsensusWithout

Consensus without taxa
CladisticInfo

Cladistic information content of a tree
CollapseNode

Collapse nodes on a phylogenetic tree
EdgeAncestry

Ancestors of an edge
MSTEdges

Minimum spanning tree
DescendantEdges

Identify descendant edges
MRCA

Most recent common ancestor
EdgeDistances

Distance between edges
DoubleFactorial

Double factorial
ReadCharacters

Read phylogenetic characters from file
RootNode

Which node is a tree's root?
ListAncestors

List ancestors
Lobo.data

Data from Zhang et al. 2016
NTip

Number of leaves in a phylogenetic tree
RootTree

Root or unroot a phylogenetic tree
N1Spr

Number of trees one SPR step away
GenerateTree

Generate pectinate, balanced or random trees
ExtractTaxa

Extract taxa from a matrix block
NewickTree

Write Newick Tree
NDescendants

Count descendants for each node in a tree
Subsplit

Subset of a split on fewer leaves
ReadTntTree

Parse TNT Tree
Subtree

Extract a subtree
SplitsInBinaryTree

Maximum splits in an n-leaf tree
MakeTreeBinary

Generate binary tree by collapsing polytomies
MatrixToPhyDat

Convert between matrices and phyDat objects
Stemwardness

'Stemwardness' of a leaf
TreeIsRooted

Is tree rooted?
brewer

Brewer palettes
EnforceOutgroup

Generate a tree with a specific outgroup
TreeNumber

Unique integer indices for bifurcating tree topologies
NPartitionPairs

Distributions of tips consistent with a partition pair
NJTree

Generate a neighbour joining tree
PairwiseDistances

Distances between each pair of trees
SortTree

Sort tree
RenumberTips

Renumber a tree's tips
Renumber

Renumber a tree's nodes and tips
StringToPhyDat

Convert between strings and phyDat objects
SplitFrequency

Frequency of splits
.RandomParent

Random parent vector
TreeTools-package

TreeTools
SampleOne

Quickly sample
Neworder

Reorder edges of a phylogenetic tree
NodeOrder

Order of each node in a tree
unrootedKeys

Integer representing shape of a tree
RenumberTree

Reorder trees
NonDuplicateRoot

Non-duplicate root
as.Newick

Write a phylogenetic tree in Newick format
as.Splits

Convert object to Splits
SingleTaxonTree

Generate a single taxon tree
WriteTntCharacters

Write morphological character matrix to TNT file
UnshiftTree

Add tree to start of list
NodeDepth

Distance of each node from tree exterior
TrivialSplits

Identify and remove trivial splits
RightmostCharacter

Rightmost character of string
UnrootedTreesMatchingSplit

Number of trees consistent with split
SplitMatchProbability

Probability of matching this well
SplitInformation

Phylogenetic information content of splitting leaves into two partitions
print.TreeNumber

Print TreeNumber object
match

Split matching
nRootedShapes

Number of rooted / unrooted tree shapes
sapply64

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

Number of trees matching a bipartition split
SupportColour

Colour for node support value
TreesMatchingTree

Number of trees containing a tree
doubleFactorials

Double factorials
TipLabels

Extract tip labels
TipsInSplits

Tips contained within splits
TotalCopheneticIndex

Total Cophenetic Index
logDoubleFactorials

Natural logarithms of double factorials
AddTip

Add a tip to a phylogenetic tree
AncestorEdge

Ancestral edge