Learn R Programming

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

TreeTools (version 1.2.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,738

Version

1.2.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

August 3rd, 2020

Functions in TreeTools (1.2.0)

ApeTime

Read modification time from 'ape' Nexus file
CharacterInformation

Character information content
AddTip

Add a tip to a phylogenetic tree
CladeSizes

Clade sizes
ConsensusWithout

Consensus without taxa
ArtificialExtinction

Artificial Extinction
CladisticInfo

Cladistic information content of a tree
CollapseNode

Collapse nodes on a phylogenetic tree
CompatibleSplits

Which splits are compatible?
AncestorEdge

Ancestral edge
LabelSplits

Label splits
StringToPhyDat

Convert between strings and phyDat objects
Lobo.data

Data from Zhang et al. 2016
LeafLabelInterchange

Leaf label interchange
ListAncestors

List ancestors
DescendantEdges

Identify descendant edges
DropTip

Drop tips from tree
SingleTaxonTree

Generate a single taxon tree
NonDuplicateRoot

Non-duplicate root
SampleOne

Quickly sample
EdgeDistances

Distance between edges
EdgeAncestry

Ancestors of an edge
NPartitionPairs

Distributions of tips consistent with a partition pair
EnforceOutgroup

Generate a tree with a specific outgroup
NRooted

Number of trees
DoubleFactorial

Double factorial
NTip

Number of leaves in a phylogenetic tree
NSplits

Number of distinct splits
SplitInformation

Phylogenetic information content of splitting leaves into two partitions
SplitMatchProbability

Probability of matching this well
SortTree

Sort tree
ExtractTaxa

Extract taxa from a matrix block
NDescendants

Count descendants for each node in a tree
ReadCharacters

Read phylogenetic characters from file
TreeTools-package

TreeTools
TreesMatchingSplit

Number of trees matching a bipartition split
ReadTntTree

Parse TNT Tree
NJTree

Generate a neighbour joining tree
RenumberTree

Reorder trees
SplitFrequency

Frequency of splits
RightmostCharacter

Rightmost character of string
Subtree

Extract a subtree
logDoubleFactorials

Natural logarithms of double factorials
TrivialSplits

Identify and remove trivial splits
NodeOrder

Order of each node in a tree
GenerateTree

Generate pectinate, balanced or random trees
sapply64

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

Maximum splits in an n-leaf tree
MRCA

Most recent common ancestor
RootNode

Which node is a tree's root?
MakeTreeBinary

Generate binary tree by collapsing polytomies
RootTree

Root or unroot a phylogenetic tree
TreesMatchingTree

Number of trees containing a tree
Subsplit

Subset of a split on fewer leaves
print.TreeNumber

Print TreeNumber object
nRootedShapes

Number of rooted / unrooted tree shapes
NewickTree

Write Newick Tree
MatrixToPhyDat

Convert between matrices and phyDat objects
TotalCopheneticIndex

Total Cophenetic Index
TreeIsRooted

Is tree rooted?
TipLabels

Extract tip labels
N1Spr

Number of trees one SPR step away
Neworder

Reorder edges of a phylogenetic tree
SupportColour

Colour for node support value
TreeNumber

Unique integer indices for bifurcating tree topologies
NodeDepth

Distance of each node from tree exterior
as.Splits

Convert object to Splits
WriteTntCharacters

Write morphological character matrix to TNT file
as.Newick

Write a phylogenetic tree in Newick format
brewer

Brewer palettes
Renumber

Renumber a tree's nodes and tips
RenumberTips

Renumber a tree's tips
UnrootedTreesMatchingSplit

Number of trees consistent with split
.RandomParent

Random parent vector
TipsInSplits

Tips contained within splits
UnshiftTree

Add tree to start of list
doubleFactorials

Double factorials
unrootedKeys

Integer representing shape of a tree
match

Split matching