DistanceOracle() prepares a set of trees once, returning a function that
gives the distances from any one tree to all of them, as required by
farthest-first sampling (#229).NNIDist(): best_lower was not a lower bound, and has been removed.
lower is now calculated correctly.
NNIDist() and NNIDiameter() use theorem 3 of Fack et al. (2002) for
fack_upper and fackMax, tightening loose_upper and best_upper.
NNIDist() returns best_upper second, after lower.
Comparing all pairs of trees whose leaf sets differ could misalign leaves
when pruning each pair to its shared leaves, giving incorrect values from
TreeDistance() and other split-based measures (#123).
RobinsonFoulds() now compares each pair of trees on its shared leaves
when the trees' leaf sets differ, rather than returning incorrect values
(all pairs, or cross pairs where a tree's leaves were a subset of those of
the first tree).
When tree1 and tree2 are lists of trees with differing leaf sets,
the returned matrix now has a row for each tree in tree1 and a column
for each tree in tree2, as when leaf sets agree; previously it was
transposed.
Fix MASTSize() under-counting on some trees: the root of each tree was
never compared with the subtrees of the other, so a maximum agreement
subtree confined to one side of a root could be missed. Affects both
rooted = TRUE and rooted = FALSE, and thus MASTInfo().
C++ code no longer executes the x86 POPCNT instruction on CPUs that lack it, which crashed R with "illegal operation" on some virtual machines (ms609/TreeTools#287).
Comparing one tree with many (e.g. ClusteringInfoDistance(tree, trees))
scores all pairs in one C++ call, as comparing lists of trees already did.
Cross-pair comparisons no longer allocate a split buffer for every tree,
read each tree's information content while scoring it, and use Splits
objects that already carry the required leaf labels as they stand:
c. 6× faster from phylo objects and 20× faster from Splits
objects with 2000 trees of 183 leaves (#229).
Other one-to-many comparisons gain the same treatment.
With 2000 trees of 183 leaves, normalized MutualClusteringInfo(),
SharedPhylogeneticInfo(), MatchingSplitInfo() and
InfoRobinsonFoulds() run 3–18× faster; RobinsonFoulds() c. 2× faster
from phylo objects and 4× from Splits; TransferDist(), PathDist()
and KendallColijn() 1.3–3.6× faster.
NNIDist() on a single list of trees prepares each tree once and scores
all pairs in one C++ call, rather than renumbering and reordering both
trees for every pair: c. 8–45× faster on 40–100 trees, and 945 seven-leaf
trees take 0.2 s.
Trees with different leaf sets are pruned to their shared leaves in C++,
without constructing pruned trees in R: TreeDistance() on 150 gene trees
is c. 15× faster, with lower memory use (#123).
SPRDist(method = "Rogue") bounds each candidate's clustering information
with the optimal dual prices of the parent pair, skipping most assignment
problems and warm-starting the rest: c. 50% faster at 80 leaves and 65% at
150 leaves on unrelated trees.
SPRDist(method = "Rogue") scores most single-leaf candidates from the
overlaps between the parent trees' splits, without rebuilding, reducing or
splitting the smaller trees, and fills cost matrices with fewer operations:
a further 55–60% faster at 30–150 leaves. Scores can differ from before in
the last few bits, which can break exact ties between candidates
differently.
Improve performance when comparing many similar trees with
ClusteringInfoDistance(), MatchingSplitDistance(), InfoRobinsonFoulds()
and JaccardRobinsonFoulds().
Improve performance of PathVector(), and thus PathDist().
Improve performance of NNIMaxStep().
Improve performance of SPRDist(method = "Rogue"): candidate leaves are
scored in C++, and abandoned once they cannot beat the best candidate so far.
Improve performance of SharedPhylogeneticInfo() and
PhylogeneticInfoDistance() when comparing similar trees.
New function NNIMaxStep() computes the largest clustering information
distance attainable by a single nearest neighbour interchange on an n-leaf
tree.
Use grDevices palettes to drop colorspace dependency.
TransferConsensus() is deprecated, moving to ConsTree::Transfer().
Fixed: PhylogeneticInformationDistance() now calculates correct score for
identical 4-leaf trees.
Improve KMeansPP() performance: O(k²n) → O(kn).
TransferConsensus() constructs a consensus tree that minimizes the sum
of transfer distances to a set of input trees, using a greedy
add-and-prune heuristic.
TransferDist() computes the transfer dissimilarity between phylogenetic
trees, with scaled and unscaled variants.
LAP (Jonker–Volgenant linear assignment) and Mutual Clustering Information
C++ implementations exposed via LinkingTo: TreeDist.
RobinsonFoulds() now uses a fast C++ batch path when comparing lists of
trees, providing a ~20× speedup on typical inputs.MCITree() selects the tree from a posterior sample with the highest
total split information content — a Maximum Clade Information analogue
of the Maximum Clade Credibility tree.Pairwise distance computation has been optimized. Typical speedups over v2.12.0 for tree sets where many splits are shared:
| Metric | 100 × 50 tips | 40 × 200 tips |
|-----------------------------|--------------:|--------------:|
| ClusteringInfoDistance | ~5× | ~12× |
| MatchingSplitDistance | ~7× | ~11× |
| InfoRobinsonFoulds | ~4× | ~5× |
options(mc.cores = N), superseding StartParallel().KCVector() reimplemented in C++, giving ~220× speedup per tree.
All-pairs and cross-pairs KendallColijn() Euclidean distances now
computed in C++ (pair_diff_euclidean(), vec_diff_euclidean()).
Support larger trees in some functions by updating some functions to use 32-bit integers, per TreeTools v2.1.0.
AHMI() now returns negative values (previously zeroed in error).
Experimental support for a new method of SPR distance calculation: subject to change or removal.
SpectralEigens() tests.HierarchicalMutualInformation() calculates the information shared between
pairs of hierarchical partition structures \doi{10.1103/PhysRevE.92.062825}.
Fix bug in calculation of MutualClusteringInfo(): the matching chosen was
not always the global optimum, causing distances to be overestimated in some
circumstances (#163).
Fix crash in robinson_foulds_all_pairs() and RobinsonFoulds(list).
Support larger trees in NNI distance calculations.
Note - this release introduced a bug in the computation of the mutual clustering information / clustering information distance. The globally optimal matching between splits was not always found. This was fixed in v2.11.0.
Ntropy() computes entropy from integer counts.
C++ optimizations and reformatting:
Require R4.0; discontinue tests against R4.0.
VisualizeMatching() allows more control over output format, and returns
the matching (#124).
DistanceFromMedian(Average = median) allows calculation of MAD.
SpectralEigens() returns correct eigenvalues (smallest was overlooked).
SpectralEigens() handles values of nEig larger than the input.
Anticipate new behaviour of unlist(use.names = TRUE) in R 4.5.
Islands() allows the identification of islands of trees.
Internal implementation of path and SPR distances, removing dependency on phangorn (and thus R 4.4).
Add progress bar within .MaxValue()
Documentation improvements.
Fix KCDiameter.multiPhylo() for multiple trees.
Fix calculation error in StrainCol().
App: Display strain in 3D tree space viewer.
Support for distances between larger trees.
Support unrooted trees in VisualizeMatching()
(#103).
Fix bug when comparing a "multiPhylo" object containing a single tree.
Documentation clarification: finding non-matching leaves.
LAPJV().StopParallel() gains quietly argument to suppress unnecessary messages.
Use "PlotTools" package for spectrum legends.
Minor documentation tweaks.
Support comparison of trees with different tips.
Fix caching errors in MapDist()
(#98).
Update tests for compatibility with ape 5.7.
New functions to measure cluster sizes (see ?"cluster-statistics").
KMeansPP() conducts clustering using K-means++, replacing K-means in app.
New vignette on tree landscape analysis.
New vignette on how to compare tree sets.
PathVector() now treats trees with a root node as rooted.
Fix plot layout in treespace vignette.
Informative failure when not enough memory for consensus_info().
Replace throw with stop in C++.
Correct calculation of trustworthiness and continuity metrics.
Depict strain in minimum spanning trees with StrainCol() and helper
function MSTSegments().
Update tests for consistency with "TreeTools" v1.7.
Use lighter Rcpp headers.
Support ConsensusInfo(p > 0.5).
Address hypervolume comparison in vignettes.
Support uniform manifold approximation and projection in app.
Speed improvements, using optimizations suggested by Alexis Stamatakis' Bioinformatics group.
Support for parallel computation via StartParallel().
Progress bars.
Solaris compatibility.
Modest vignette improvements.
spic/scic abbreviation recognition.
ConsensusInfo() quickly calculates the splitwise information content of the
consensus of a set of trees, after Smith (forthcoming).
SplitwiseInfo() and ClusteringInfo() gain a p parameter to reflect the
reduced information content of splits with lower support values, and a sum
parameter to allow return of individual split information content.
KCDiameter() approximates the diameter of the Kendall-Colijn metric.
Plot3() (experimental) provides pseudo-3D plotting.
Project()/ProjectionQuality() re-named to MapTrees()/MappingQuality().
SpectralClustering() re-named to SpectralEigens().
Add self-organizing map example to treespace vignette.
Allow the specification of custom vectors in the Kendall--Colijn metric.
Faster all-to-all tree distance calculation.
Diagnose and fix memory leaks, including over-long reported matchings.
Explicitly import shiny/shinyjs functions.
Project() launches 'shiny' app for projection and analysis of tree space.
ProjectionQuality() calculates trustworthiness and continuity of tree
space mappings.
Faster calculation of Robinson–Foulds distance (using algorithm of Day (1985)) and clustering information distance.
New class ClusterTable to allow faster distance computation with Day (1985)
algorithm.
Improve error messages in CalculateTreeDist().
Improvements to vignettes.
Use package 'vdiffr' conditionally.
TreeDistance() and related functions now return a dist object when
computing all distances between all pairs of trees in a list.
Improve floating-point arithmetic in TreeDistance() functions.
TreeDistance() now returns a distance (as documented), rather than a
similarity.
Fix rounding error in NNI 'Li' upper estimate, and improve NNI performance.
Reduce precision of LAPJV so rounding errors do not result in interminable run times.
Improvements to NNIDist() in light of Fack et al. (2002).
Add NNIDiameter(): approximate diameter of NNI distance.
Remove vignette 'Interpreting tree distances': duplicates https://ms609.github.io/TreeDistData/articles/09-expected-similarity.html.
Remove redundant data object oneOverlap.
Fix an issue when installing on R 3.x (require C++11 to ensure declaration
of UINT_FAST16_MAX).
Fix memory-handling bug in lapjv().