Robinson-Foulds | R Documentation |
RobinsonFoulds()
calculates the Robinson–Foulds distance
\insertCiteRobinson1981TreeDist, or the corresponding similarity measure.
InfoRobinsonFoulds()
weights splits according to their phylogenetic
information content \insertCite@§2.1 in @SmithDistTreeDist.
Optionally, the matching between identical splits may reported.
Generalized Robinson–Foulds distances (see TreeDistance()
)
are better suited to most use cases
\insertCiteSmithDist,SmithSpaceTreeDist.
InfoRobinsonFoulds(
tree1,
tree2 = NULL,
similarity = FALSE,
normalize = FALSE,
reportMatching = FALSE
)
InfoRobinsonFouldsSplits(
splits1,
splits2,
nTip = attr(splits1, "nTip"),
reportMatching = FALSE
)
RobinsonFoulds(
tree1,
tree2 = NULL,
similarity = FALSE,
normalize = FALSE,
reportMatching = FALSE
)
RobinsonFouldsMatching(
tree1,
tree2,
similarity = FALSE,
normalize = FALSE,
...
)
RobinsonFouldsSplits(
splits1,
splits2,
nTip = attr(splits1, "nTip"),
reportMatching = FALSE
)
tree1 , tree2 |
Trees of class |
similarity |
Logical specifying whether to report the result as a tree similarity, rather than a difference. |
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. |
... |
Not used. |
RobinsonFoulds()
calculates the standard Robinson–Foulds distance,
i.e. the number of splits that occur in one tree but not the other.
InfoRobinsonFoulds()
calculates the tree similarity or distance by summing
the phylogenetic information content of all splits that are (or are not)
identical in both trees. Consequently, splits that are more likely
to be identical by chance alone make a smaller contribution to overall
tree distance, because their similarity is less remarkable.
Rapid comparison between multiple pairs of trees employs the \insertCiteDay1985;textualTreeDist linear-time algorithm.
RobinsonFoulds()
and InfoRobinsonFoulds()
return an array of numerics providing the
distances between each pair of trees in tree1
and tree2
,
or splits1
and splits2
.
If reportMatching = TRUE
, the pairScores
attribute
returns a logical matrix specifying whether each pair of splits is identical.
RobinsonFouldsMatching()
: Matched splits, intended for use with
VisualizeMatching()
.
RobinsonFoulds()
is normalized against the total number of splits that
are present.
InfoRobinsonFoulds()
is normalized against the sum of the phylogenetic
information of all splits in each tree, treated independently.
Martin R. Smith (martin.smith@durham.ac.uk)
Display paired splits: VisualizeMatching()
Other tree distances:
JaccardRobinsonFoulds()
,
KendallColijn()
,
MASTSize()
,
MatchingSplitDistance()
,
NNIDist()
,
NyeSimilarity()
,
PathDist()
,
SPRDist()
,
TreeDistance()
# For BalancedTree, PectinateTree, as.phylo:
library("TreeTools", quietly = TRUE)
balanced7 <- BalancedTree(7)
pectinate7 <- PectinateTree(7)
RobinsonFoulds(balanced7, pectinate7)
RobinsonFoulds(balanced7, pectinate7, normalize = TRUE)
VisualizeMatching(RobinsonFouldsMatching, balanced7, pectinate7)
InfoRobinsonFoulds(balanced7, pectinate7)
VisualizeMatching(InfoRobinsonFoulds, balanced7, pectinate7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.