Skip to content

Releases: ms609/TreeTools

v2.4.0

02 Jun 18:54

Choose a tag to compare

New features

  • RandomTree(), YuleTree(), PectinateTree(), BalancedTree(), StarTree(), and SingleTaxonTree() allow lengths to accept a function that generates edge lengths (e.g. RandomTree(8, lengths = runif)).
  • PaintTree() assigns colours to every edge, leaf, and internal node such that sister clades occupy adjacent hue bands proportional to their tip counts, with saturation growing from zero at the root to one at every tip.
  • NexusTokensToInteger() converts character data to integers, mapping uncertain tokens to NA.
  • ReadTntCharacters() attaches an xgroup attribute (factor) when a TNT xgroup partition block is present.

Performance

  • Consensus() computes majority-rule and threshold consensus trees in time linear in the number of trees (previously quadratic), after Jansson, Shen & Sung (2016); implementation informed by their FACT package.
    SplitFrequency() inherits the same single-pass speed-up.

Fixes

  • NexusTokens() once again handles polymorphism tokens with internal whitespace (e.g. (1 2), {0 1}).

v2.3.0

23 Apr 10:38

Choose a tag to compare

Performance

  • Drop stringi dependency.
  • as.character.Splits() re-implemented in C++; ~3× faster on 200-tip trees.

Usability

  • Consensus() and SplitFrequency() now respond to user interrupts during long-running computations.
  • SL_MAX_TIPS compile-time constant increased to 32704, allowing support for larger trees.

v2.2.0

20 Mar 06:30

Choose a tag to compare

New functionality

  • EdgeRatio() reports the ratio of external:internal edges.
  • SplitInformation() supports Splits and phylo objects.
  • sort and order support Splits objects.
  • 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 their TreeNumber is stored as a decimal character string rather than integer64. The 19-leaf limit for integer64-backed storage (and as.MixedBase() round-trips) is unchanged.
  • as.TreeNumber() no longer warns for trees with 20–44 leaves.
  • inst/include/TreeTools/tree_number.h added to support downstream packages (e.g. TBRDist) via LinkingTo: TreeTools. Provides 256-bit tree number encoding/decoding supporting up to 51 leaves, extended from the 44-leaf limit of the previous uint64_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-character phyDat objects (e.g. from a star tree); returns a 0-column matrix with correct row names.
  • AddUnconstrained() handles zero-character phyDat input gracefully.

Dependencies

  • RCurl moved from Imports to Suggests; ReadMrBayesTrees() uses RCurl::url.exists() when available, falling back to base R url() for URL checks.

v2.1.0

11 Feb 12:50

Choose a tag to compare

  • Add method RenumberTips.Splits().
  • FirstMatchingSplit(x) provides performant alternative to match(x)[[1]].
  • Support logical pole in PolarizeSplits().
  • RenumberTree() supports numeric tipOrder input.
  • Support larger trees in ClusterTable objects.
    • Retires CT_PUSH and CT_POP macros.
  • Support larger trees in Consensus().
    • Uses 32-bit integers, necessitating downstream changes to TreeDist.
  • Remove hard limit on tree size in SplitList.
  • MatrixToPhyDat() gains tipLabels parameter.
  • Document return value for J1Index().

v2.0.0

23 Sep 10:33

Choose a tag to compare

New functionality

  • Cherries() counts the cherries in a binary tree.
  • New method as.Splits.integer().
  • Add methods for NULL objects.

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

25 Aug 06:59

Choose a tag to compare

  • Compiler-safe vector initialization, resolving M1-SAN warnings.

v1.16.0

22 Aug 13:10

Choose a tag to compare

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 to DropTip().
  • Preorder() gains topologyOnly argument.

Enhancements

  • MakeTreeBinary() explicitly removes edge lengths.
  • Optimize ClusterTable class.
  • 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

21 Jul 14:20

Choose a tag to compare

  • Reweight() sets the weight of characters in a phylogenetic dataset.
  • MatchStrings() checks for mismatched tip labels, suggesting corrections.
  • RootTree() gains fallback argument 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

14 May 05:53
31cc8d1

Choose a tag to compare

  • AddTip(lengthBelow = NA) adds leaf at node without adding a new edge.

  • BalancedTree() and equivalent gain a lengths parameter to specify edge lengths.

  • Fix taxa misplaced by RoguePlot(sort = TRUE).

  • Fix unexpected polytomies in Consensus() (#168).

v1.13.1

07 Apr 13:29

Choose a tag to compare

  • Support non-unique labels in DropTip() checks.