Learn R Programming

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

TreeTools (version 1.3.1)

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,384

Version

1.3.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Martin R. Smith

Last Published

October 3rd, 2020

Functions in TreeTools (1.3.1)

ApeTime

Read modification time from 'ape' Nexus file
EdgeAncestry

Ancestors of an edge
ArtificialExtinction

Artificial Extinction
DropTip

Drop tips from tree
ConsensusWithout

Consensus without taxa
DoubleFactorial

Double factorial
DescendantEdges

Identify descendant edges
CompatibleSplits

Which splits are compatible?
LabelSplits

Label splits
LeafLabelInterchange

Leaf label interchange
NJTree

Generate a neighbour joining tree
Lobo.data

Data from Zhang et al. 2016
ListAncestors

List ancestors
ExtractTaxa

Extract taxa from a matrix block
EdgeDistances

Distance between edges
N1Spr

Number of trees one SPR step away
NTip

Number of leaves in a phylogenetic tree
NDescendants

Count descendants for each node in a tree
EnforceOutgroup

Generate a tree with a specific outgroup
MSTEdges

Edges of minimum spanning tree
ReadCharacters

Read phylogenetic characters from file
StringToPhyDat

Convert between strings and phyDat objects
MRCA

Most recent common ancestor
RootTree

Root or unroot a phylogenetic tree
SingleTaxonTree

Generate a single taxon tree
NodeOrder

Order of each node in a tree
GenerateTree

Generate pectinate, balanced or random trees
MakeTreeBinary

Generate binary tree by collapsing polytomies
MatrixToPhyDat

Convert between matrices and phyDat objects
NRooted

Number of trees
NPartitionPairs

Distributions of tips consistent with a partition pair
SplitFrequency

Frequency of splits
SplitInformation

Phylogenetic information content of splitting leaves into two partitions
SortTree

Sort tree
NonDuplicateRoot

Non-duplicate root
NewickTree

Write Newick Tree
ReadTntTree

Parse TNT Tree
NSplits

Number of distinct splits
SampleOne

Quickly sample
Renumber

Renumber a tree's nodes and tips
SplitMatchProbability

Probability of matching this well
SplitsInBinaryTree

Maximum splits in an n-leaf tree
TotalCopheneticIndex

Total Cophenetic Index
Neworder

Reorder edges of a phylogenetic tree
TreeIsRooted

Is tree rooted?
.RandomParent

Random parent vector
TreeNumber

Unique integer indices for bifurcating tree topologies
as.Splits

Convert object to Splits
unrootedKeys

Integer representing shape of a tree
RenumberTips

Renumber a tree's tips
Stemwardness

'Stemwardness' of a leaf
Subsplit

Subset of a split on fewer leaves
TreesMatchingSplit

Number of trees matching a bipartition split
TreeTools-package

TreeTools
brewer

Brewer palettes
NodeDepth

Distance of each node from tree exterior
doubleFactorials

Double factorials
TipLabels

Extract tip labels
WriteTntCharacters

Write morphological character matrix to TNT file
RenumberTree

Reorder trees
Subtree

Extract a subtree
RootNode

Which node is a tree's root?
as.Newick

Write a phylogenetic tree in Newick format
RightmostCharacter

Rightmost character of string
TipsInSplits

Tips contained within splits
SupportColour

Colour for node support value
UnrootedTreesMatchingSplit

Number of trees consistent with split
UnshiftTree

Add tree to start of list
logDoubleFactorials

Natural logarithms of double factorials
TreesMatchingTree

Number of trees containing a tree
sapply64

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

Split matching
nRootedShapes

Number of rooted / unrooted tree shapes
print.TreeNumber

Print TreeNumber object
TrivialSplits

Identify and remove trivial splits
AncestorEdge

Ancestral edge
AddTip

Add a tip to a phylogenetic tree
CharacterInformation

Character information content
CladisticInfo

Cladistic information content of a tree
CladeSizes

Clade sizes
CollapseNode

Collapse nodes on a phylogenetic tree