Package: TreeTools 1.12.0.9000

Martin R. Smith

TreeTools: Create, Modify and Analyse Phylogenetic Trees

Efficient implementations of functions for the creation, modification and analysis of phylogenetic trees. Applications include: generation of trees with specified shapes; tree rearrangement; analysis of tree shape; rooting of trees and extraction of subtrees; calculation and depiction of split support; plotting the position of rogue taxa (Klopfstein & Spasojevic 2019) <doi:10.1371/journal.pone.0212942>; calculation of ancestor-descendant relationships, of 'stemwardness' (Asher & Smith, 2022) <doi:10.1093/sysbio/syab072>, and of tree balance (Mir et al. 2013, Lemant et al. 2022) <doi:10.1016/j.mbs.2012.10.005>, <doi:10.1093/sysbio/syac027>; artificial extinction (Asher & Smith, 2022) <doi:10.1093/sysbio/syab072>; import and export of trees from Newick, Nexus (Maddison et al. 1997) <doi:10.1093/sysbio/46.4.590>, and TNT <https://www.lillo.org.ar/phylogeny/tnt/> formats; and analysis of splits and cladistic information.

Authors:Martin R. Smith [aut, cre, cph], Emmanuel Paradis [cph], Robert Noble [cph]

TreeTools_1.12.0.9000.tar.gz
TreeTools_1.12.0.9000.zip(r-4.5)TreeTools_1.12.0.9000.zip(r-4.4)TreeTools_1.12.0.9000.zip(r-4.3)
TreeTools_1.12.0.9000.tgz(r-4.4-x86_64)TreeTools_1.12.0.9000.tgz(r-4.4-arm64)TreeTools_1.12.0.9000.tgz(r-4.3-x86_64)TreeTools_1.12.0.9000.tgz(r-4.3-arm64)
TreeTools_1.12.0.9000.tar.gz(r-4.5-noble)TreeTools_1.12.0.9000.tar.gz(r-4.4-noble)
TreeTools_1.12.0.9000.tgz(r-4.4-emscripten)TreeTools_1.12.0.9000.tgz(r-4.3-emscripten)
TreeTools.pdf |TreeTools.html
TreeTools/json (API)
NEWS

# Install 'TreeTools' in R:
install.packages('TreeTools', repos = c('https://phylotastic.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/ms609/treetools/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

evolutionary-biologyphylogenetic-treesphylogenetics

211 exports 16 stars 3.46 score 22 dependencies 9 dependents 1 mentions 87 scripts 1.5k downloads

Last updated 3 days agofrom:543afa7469. Checks:OK: 9. Indexed: no.

TargetResultDate
Doc / VignettesOKSep 05 2024
R-4.5-win-x86_64OKSep 05 2024
R-4.5-linux-x86_64OKSep 05 2024
R-4.4-win-x86_64OKSep 05 2024
R-4.4-mac-x86_64OKSep 05 2024
R-4.4-mac-aarch64OKSep 05 2024
R-4.3-win-x86_64OKSep 05 2024
R-4.3-mac-x86_64OKSep 05 2024
R-4.3-mac-aarch64OKSep 05 2024

Exports:.CompatibleRaws.CompatibleSplit.RandomParent.UnrootedKeys%in%AddTipAddTipEverywhereAddUnconstrainedAllAncestorsAllDescendantEdgesAllTipLabelsAncestorEdgeApePostorderApeTimeArtExArtificialExtinctionas.ClusterTableas.MixedBaseas.multiPhyloas.Newickas.Splitsas.TreeNumberBalancedTreeCharacterInformationCladeSizesCladewiseCladisticInfoCladisticInformationCollapseEdgeCollapseNodeCompatibleSplitsConsensusConsensusWithoutConstrainedNJDecomposeDescendantEdgesDescendantTipsDoubleFactorialDoubleFactorial64doubleFactorialsDropTipDropTipPhyloedge_to_splitsEdgeAncestryEdgeDistancesEndSentenceEnforceOutgroupExtractTaxaForestSplitsHammingIC1SprImposeConstraintis.TreeNumberJ1IndexJQIndexKeepTipKeepTipPostorderKeepTipPreorderKeptPathsKeptVertsLabelSplitsLeafLabelInterchangeListAncestorsLnDoubleFactorialLnDoubleFactorial.intLnRootedLnRooted.intLnSplitMatchProbabilityLnTreesMatchingSplitLnTreesMatchingTreeLnUnrootedLnUnrooted.intLnUnrootedMultLnUnrootedSplitsLnUnrootedTreesMatchingSplitLog2DoubleFactorialLog2RootedLog2Rooted.intLog2TreesMatchingSplitLog2TreesMatchingTreeLog2UnrootedLog2Unrooted.intLog2UnrootedMultLog2UnrootedSplitsLog2UnrootedTreesMatchingSplitLogDoubleFactorialLogDoubleFactorial.intlogDoubleFactorialsMakeTreeBinaryMarkMissingmatchMatchEdgesMatchNodesMatrixToPhyDatMorphoBankDecodeMrBayesTreesMRCAMSTEdgesMSTLengthMultiSplitInformationN1SprNDescendantsNewickTreeNeworderPhyloNeworderPruningwiseNexusTokensNJTreeNodeDepthNodeNumbersNodeOrderNPartitionPairsNPartitionsNRootedNRooted64NRootedShapesNSplitsNTipNUnrootedNUnrooted64NUnrootedMultNUnrootedShapesNUnrootedSplitsPairwiseDistancesPathLengthsPectinateTreePhyDatPhyDatToMatrixPhydatToStringPhyDatToStringPhylogeneticInfoPhylogeneticInformationPhyToStringPolarizeSplitsPostorderPostorderOrderPreorderPruningwiseRandomTreeReadAsPhyDatReadCharactersReadMrBayesReadMrBayesTreesReadNotesReadTntAsPhyDatReadTNTAsPhyDatReadTntCharactersReadTNTCharactersReadTntTreeRenumberRenumberEdgesRenumberTipsRenumberTreereplicate64RightmostCharacterRoguePlotroot_on_nodeRootedTreeShapeRootedTreeWithShapeRootNodeRootNodeDistRootNodeDistanceRootOnNodeRootTreeSampleOnesapply64SingleTaxonTreeSisterSizeSortTreeSpectrumLegendSplitFrequencySplitImbalanceSplitInformationSplitMatchProbabilitySplitNumberSplitsInBinaryTreeStarTreeStringToPhyDatSubsplitSubtreeSupportColorSupportColourTCIContextTipLabelsTipsInSplitsTipTimedTreeTntOrderTNTOrderTntText2TreeTNTText2TreeTopologyOnlyTotalCopheneticIndexTreeIsRootedTreesMatchingSplitTreesMatchingTreeTreeSplitsTrivialSplitsUnquoteUnrootedKeysUnrootedTreeKeyUnrootedTreeShapeUnrootedTreesMatchingSplitUnrootedTreeWithKeyUnrootedTreeWithShapeUnrootTreeUnshiftTreevapply64WithoutTrivialSplitsWriteTntCharactersxorYuleTreeZeroTaxonTree

Dependencies:apebitbit64bitopsclicolorspacedigestfastmatchgluelatticelifecyclenlmePlotToolsR.cacheR.methodsS3R.ooR.utilsrbibutilsRcppRCurlRdpackrlang

File system navigation in R

Rendered fromfilesystem-navigation.Rmdusingknitr::rmarkdownon Sep 05 2024.

Last update: 2021-09-16
Started: 2019-10-18

Loading phylogenetic data into R

Rendered fromload-data.Rmdusingknitr::rmarkdownon Sep 05 2024.

Last update: 2023-07-03
Started: 2019-10-18

Loading phylogenetic trees into R

Rendered fromload-trees.Rmdusingknitr::rmarkdownon Sep 05 2024.

Last update: 2023-07-03
Started: 2019-10-18

Readme and manuals

Help Manual

Help pageTopics
Add a tip to a phylogenetic treeAddTip AddTipEverywhere
Read modification time from "ape" Nexus fileApeTime
Artificial ExtinctionArtEx ArtificialExtinction ArtificialExtinction.matrix ArtificialExtinction.phyDat
Convert object to 'multiPhylo' classas.multiPhylo as.multiPhylo.list as.multiPhylo.phyDat as.multiPhylo.phylo as.multiPhylo.Splits
Write a phylogenetic tree in Newick formatas.Newick as.Newick.list as.Newick.multiPhylo as.Newick.phylo
Brewer palettesbrewer
Character information contentCharacterInformation
Clade sizesCladeSizes
Cladistic information content of a treeCladisticInfo CladisticInfo.list CladisticInfo.multiPhylo CladisticInfo.phylo CladisticInfo.Splits CladisticInformation PhylogeneticInfo PhylogeneticInformation
Convert phylogenetic tree to 'ClusterTable'as.ClusterTable as.ClusterTable.list as.ClusterTable.multiPhylo as.ClusterTable.phylo ClusterTable
S3 methods for 'ClusterTable' objectsas.matrix.ClusterTable ClusterTable-methods print.ClusterTable summary.ClusterTable
Collapse nodes on a phylogenetic treeCollapseEdge CollapseNode CollapseNode.phylo
Construct consensus treesConsensus
Reduced consensus, omitting specified taxaConsensusWithout ConsensusWithout.list ConsensusWithout.multiPhylo ConsensusWithout.phylo MarkMissing
Constrained neighbour-joining treeConstrainedNJ
Decompose additive (ordered) phylogenetic charactersDecompose
Identify descendant edgesAllDescendantEdges DescendantEdges DescendantTips
Double factorialDoubleFactorial DoubleFactorial64 LnDoubleFactorial LnDoubleFactorial.int Log2DoubleFactorial LogDoubleFactorial LogDoubleFactorial.int
Double factorialsdoubleFactorials
Drop leaves from treeDropTip DropTip.list DropTip.multiPhylo DropTip.NULL DropTip.phylo DropTip.Splits DropTipPhylo KeepTip KeepTipPostorder KeepTipPreorder
Efficiently convert edge matrix to splitsedge_to_splits
Ancestors of an edgeEdgeAncestry
Distance between edgesEdgeDistances
Add full stop to end of a sentenceEndSentence
Generate a tree with a specified outgroupEnforceOutgroup EnforceOutgroup.character EnforceOutgroup.phylo
Generate pectinate, balanced or random treesBalancedTree GenerateTree PectinateTree RandomTree StarTree YuleTree
Hamming distance between taxa in a phylogenetic datasetHamming
Force a tree to match a constraintAddUnconstrained ImposeConstraint
Is an object a 'TreeNumber' object?is.TreeNumber
Robust universal tree balance indexJ1Index JQIndex
Paths present in reduced treeKeptPaths KeptPaths.data.frame KeptPaths.matrix
Identify vertices retained when leaves are droppedKeptVerts KeptVerts.numeric KeptVerts.phylo
Label splitsLabelSplits
Leaf label interchangeLeafLabelInterchange
List ancestorsAllAncestors ListAncestors
Data from Zhang et al. 2016Lobo.data Lobo.phy
Natural logarithms of double factorialslogDoubleFactorials
Generate binary tree by collapsing polytomiesMakeTreeBinary
Split matching%in%,Splits,Splits-method in.Splits match match,Splits,Splits-method match.Splits
Match nodes and edges between treesMatchEdges MatchNodes
Convert between matrices and 'phyDat' objectsMatrixToPhyDat PhyDatToMatrix
Decode MorphoBank textMorphoBankDecode
Most recent common ancestorMRCA
Minimum spanning treeMSTEdges MSTLength
Number of trees one SPR step awayIC1Spr N1Spr
Count descendants for each node in a treeNDescendants
Write Newick TreeNewickTree
Generate a neighbour joining treeNJTree
Distance of each node from tree exteriorNodeDepth
Numeric index of each node in a tree 'NodeNumbers()' returns a sequence corresponding to the nodes in a treeNodeNumbers
Number of edges incident to each node in a treeNodeOrder
Distributions of tips consistent with a partition pairNPartitionPairs
Number of treesLnRooted LnRooted.int LnUnrooted LnUnrooted.int LnUnrootedMult LnUnrootedSplits Log2Rooted Log2Rooted.int Log2Unrooted Log2Unrooted.int Log2UnrootedMult Log2UnrootedSplits NRooted NRooted64 NUnrooted NUnrooted64 NUnrootedMult NUnrootedSplits
Number of rooted / unrooted tree shapesnRootedShapes nUnrootedShapes
Number of distinct splitsNPartitions NSplits NSplits.character NSplits.ClusterTable NSplits.list NSplits.multiPhylo NSplits.NULL NSplits.numeric NSplits.phylo NSplits.Splits
Number of leaves in a phylogenetic treeNTip NTip.default NTip.list NTip.matrix NTip.multiPhylo NTip.phyDat NTip.phylo NTip.Splits
Distances between each pair of treesPairwiseDistances
Calculate length of paths between each pair of vertices within treePathLengths
Polarize splits on a single taxonPolarizeSplits
Print 'TreeNumber' objectprint.TreeNumber
Read phylogenetic characters from filePhyDat ReadAsPhyDat ReadCharacters ReadNotes ReadTNTAsPhyDat ReadTntAsPhyDat ReadTNTCharacters ReadTntCharacters
Read posterior tree sample produced by MrBayesMrBayesTrees ReadMrBayes ReadMrBayesTrees
Parse TNT TreeReadTntTree TNTText2Tree TntText2Tree
Renumber a tree's nodes and tipsRenumber
Renumber a tree's tipsRenumberTips RenumberTips.list RenumberTips.multiPhylo RenumberTips.NULL RenumberTips.phylo
Rightmost character of stringRightmostCharacter
Visualize position of rogue taxaRoguePlot
Which node is a tree's root?RootNode
Root or unroot a phylogenetic treeRootOnNode RootTree UnrootTree
Apply a function that returns 64-bit integers over a list or vectorreplicate64 sapply64 vapply64
Sort a list of phylogenetic trees<.MixedBase <.phylo ==.MixedBase ==.phylo >.MixedBase >.phylo sort.multiPhylo
Sort treeSortTree SortTree.list SortTree.multiPhylo SortTree.phylo
Frequency of splitsForestSplits SplitFrequency SplitNumber TreeSplits
Phylogenetic information content of splitting leaves into two partitionsMultiSplitInformation SplitInformation
Probability of matching this wellLnSplitMatchProbability SplitMatchProbability
Convert object to 'Splits'as.logical.Splits as.Splits as.Splits.character as.Splits.list as.Splits.logical as.Splits.matrix as.Splits.multiPhylo as.Splits.phylo as.Splits.Splits Splits
Maximum splits in an _n_-leaf treeSplitsInBinaryTree SplitsInBinaryTree.default SplitsInBinaryTree.list SplitsInBinaryTree.multiPhylo SplitsInBinaryTree.NULL SplitsInBinaryTree.numeric SplitsInBinaryTree.phylo SplitsInBinaryTree.Splits
"Stemwardness" of a leafRootNodeDist RootNodeDistance RootNodeDistance.character RootNodeDistance.numeric SisterSize SisterSize.character SisterSize.numeric Stemwardness
Convert between strings and 'phyDat' objectsPhyDatToString PhydatToString PhyToString StringToPhyDat StringToPhydat
Subset of a split on fewer leavesSubsplit
Extract a subtreeSubtree
Colour for node support valueSupportColor SupportColour
Extract tip labelsAllTipLabels AllTipLabels.list AllTipLabels.matrix AllTipLabels.multiPhylo AllTipLabels.phylo AllTipLabels.Splits AllTipLabels.TreeNumber TipLabels TipLabels.character TipLabels.default TipLabels.list TipLabels.logical TipLabels.matrix TipLabels.MixedBase TipLabels.multiPhylo TipLabels.numeric TipLabels.phyDat TipLabels.phylo TipLabels.Splits TipLabels.TreeNumber
Tips contained within splitsSplitImbalance SplitImbalance.phylo SplitImbalance.Splits TipsInSplits TipsInSplits.phylo TipsInSplits.Splits
Display time-calibrated tree using tip information onlyTipTimedTree
Remove metadata from treesTopologyOnly
Total Cophenetic IndexTCIContext TCIContext.numeric TotalCopheneticIndex
Is tree rooted?TreeIsRooted
Unique integer indices for bifurcating tree topologiesas.MixedBase as.MixedBase.integer64 as.MixedBase.MixedBase as.MixedBase.multiPhylo as.MixedBase.numeric as.MixedBase.phylo as.MixedBase.TreeNumber as.phylo.MixedBase as.phylo.numeric as.phylo.TreeNumber as.TreeNumber as.TreeNumber.character as.TreeNumber.MixedBase as.TreeNumber.multiPhylo as.TreeNumber.phylo as.TreeNumber.TreeNumber TreeNumber
Number of trees matching a bipartition splitLnTreesMatchingSplit Log2TreesMatchingSplit TreesMatchingSplit
Number of trees containing a treeLnTreesMatchingTree Log2TreesMatchingTree TreesMatchingTree
Identify and remove trivial splitsTrivialSplits WithoutTrivialSplits
Generate trivial treesSingleTaxonTree TrivialTree ZeroTaxonTree
Remove quotation marks from a stringUnquote
Number of trees consistent with splitLnUnrootedTreesMatchingSplit Log2UnrootedTreesMatchingSplit UnrootedTreesMatchingSplit
Add tree to start of listUnshiftTree
Write morphological character matrix to TNT fileWriteTntCharacters WriteTntCharacters.matrix WriteTntCharacters.phyDat
Exclusive OR operationxor xor,Splits,Splits-method