Releases: ms609/TreeTools
Releases · ms609/TreeTools
v2.2.0
New functionality
EdgeRatio()reports the ratio of external:internal edges.SplitInformation()supportsSplitsandphyloobjects.sortandordersupportSplitsobjects.SplitFrequency(reference = NULL)returns frequency of all splits.as.TreeNumber()now supports trees with up to 51 leaves (previously 19).
Trees with 20–51 leaves have more than 2^64 distinct topologies, so theirTreeNumberis stored as a decimal character string rather thaninteger64. The 19-leaf limit forinteger64-backed storage (andas.MixedBase()round-trips) is unchanged.as.TreeNumber()no longer warns for trees with 20–44 leaves.inst/include/TreeTools/tree_number.hadded to support downstream packages (e.g. TBRDist) viaLinkingTo: TreeTools. Provides 256-bit tree number encoding/decoding supporting up to 51 leaves, extended from the 44-leaf limit of the previousuint64_t-based implementation.
Performance
SplitFrequency(reference = NULL): split normalization moved to C++; internal split de-duplication uses hash map instead of ordered map.NodeDepth()for unrooted trees rewritten as O(n) two-pass C++ algorithm, replacing iterative R while-loop.duplicated.Splits()uses hash-based O(n) de-duplication, replacing O(n²) pairwise comparison.RenumberTips.multiPhylo()applies tip permutation in a single C++ call, avoiding per-tree overhead.
Fixes
PhyDatToMatrix()no longer crashes on zero-characterphyDatobjects (e.g. from a star tree); returns a 0-column matrix with correct row names.AddUnconstrained()handles zero-characterphyDatinput gracefully.
Dependencies
RCurlmoved from Imports to Suggests;ReadMrBayesTrees()usesRCurl::url.exists()when available, falling back to base Rurl()for URL checks.
v2.1.0
- Add method
RenumberTips.Splits(). FirstMatchingSplit(x)provides performant alternative tomatch(x)[[1]].- Support logical
poleinPolarizeSplits(). RenumberTree()supports numerictipOrderinput.- Support larger trees in
ClusterTableobjects.- Retires
CT_PUSHandCT_POPmacros.
- Retires
- Support larger trees in
Consensus().- Uses 32-bit integers, necessitating downstream changes to TreeDist.
- Remove hard limit on tree size in
SplitList. MatrixToPhyDat()gainstipLabelsparameter.- Document return value for
J1Index().
v2.0.0
New functionality
Cherries()counts the cherries in a binary tree.- New method
as.Splits.integer(). - Add methods for
NULLobjects.
Fixes and enhancements
- Fix
RoguePlot(sort = TRUE)(Rogue#33). - Remove R.cache dependency:
UnrootedKeys()now uses a native cache implementation.
Backward incompatible changes
- Require R 3.6.
- Remove deprecated functions
AllDescendantEdges(),.EnforceOutgroup(),ForestSplits(),in.Splits(),PhylogeneticInfo(),SpectrumLegend(),SplitNumber(),TreeSplits(). - Remove deprecated C++ macro
TREETOOLS_SPLITLIST_INIT.
v1.16.1
v1.16.0
New functionality
SplitConsistent()calculates split (dis)agreement.LongBranch()identifies long-branched taxa.Treeness()computes the treeness (=stemminess) of a tree, a proxy for its
phylogenetic signal.- Add
KeepTip()methods to correspond toDropTip(). Preorder()gainstopologyOnlyargument.
Enhancements
MakeTreeBinary()explicitly removes edge lengths.- Optimize
ClusterTableclass. - Optimize
NSplits(). - Remove exported C++ cache objects to prefer calculation with intrinsics.
- Other performance improvements.
Fixes
- Fix
as.ClusterTable()when leaf order varies. - Fix regressions in
as.ClusterTable()that caused downstream errors. - Fix regressions in
PhyToString(). - Fix handling of multiple ambiguities in
Reweight().
v1.15.0
Reweight()sets the weight of characters in a phylogenetic dataset.MatchStrings()checks for mismatched tip labels, suggesting corrections.RootTree()gainsfallbackargument to handle outgroups that do not root a tree.- Fix
MakeTreeBinary()labelling trees as in preorder. - Fix
as.Splits.matrix(tipLabels != NULL). - Modernize aspects of C++ code.
v1.14.0
v1.13.1
v1.13.0
v1.12.0
New methods and functions
TopologyOnly()removes metadata from phylo objects.J1Index()computes the robust, universal tree balance measure of
Lemant et al. 2022 doi:10.1093/sysbio/syac027, incorporating code by Rob Noble.
Enhancements
- Consistent sequence of list entries in phylo objects.
RandomTree()returns trees for < 3 leaves.root_on_node()handles trees with < 2 leaves.- Support larger trees in
TotalCopheneticIndex(), fixing #158.