View source: R/tree_distance_msd.R
MatchingSplitDistance | R Documentation |
Calculate the Matching Split Distance \insertCiteBogdanowicz2012,Lin2012TreeDist for unrooted binary trees.
MatchingSplitDistance(
tree1,
tree2 = NULL,
normalize = FALSE,
reportMatching = FALSE
)
MatchingSplitDistanceSplits(
splits1,
splits2,
nTip = attr(splits1, "nTip"),
normalize = TRUE,
reportMatching = FALSE
)
tree1 , tree2 |
Trees of class |
normalize |
If a numeric value is provided, this will be used as a
maximum value against which to rescale results.
If |
reportMatching |
Logical specifying whether to return the clade matchings as an attribute of the score. |
splits1 , splits2 |
Logical matrices where each row corresponds to a leaf,
either listed in the same order or bearing identical names (in any sequence),
and each column corresponds to a split, such that each leaf is identified as
a member of the ingroup ( |
nTip |
(Optional) Integer specifying the number of leaves in each split. |
Trees need not contain identical leaves; scores are based on the leaves that
trees hold in common. Check for unexpected differences in tip labelling
with setdiff(TipLabels(tree1), TipLabels(tree2))
.
MatchingSplitDistance()
returns an array of numerics providing the
distances between each pair of trees in tree1
and tree2
,
or splits1
and splits2
.
A normalization value or function must be provided in order to return a normalized value. If you are aware of a generalised formula, please let me know by creating a GitHub issue so that it can be implemented.
Martin R. Smith (martin.smith@durham.ac.uk)
Other tree distances:
JaccardRobinsonFoulds()
,
KendallColijn()
,
MASTSize()
,
NNIDist()
,
NyeSimilarity()
,
PathDist()
,
Robinson-Foulds
,
SPRDist()
,
TreeDistance()
MatchingSplitDistance(lapply(rep(8, 5), ape::rtree), normalize = 16)
MatchingSplitDistance(TreeTools::BalancedTree(6),
TreeTools::PectinateTree(6),
reportMatching = TRUE)
VisualizeMatching(MatchingSplitDistance, TreeTools::BalancedTree(6),
TreeTools::PectinateTree(6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.