CompareQuartetsMulti()
counts how many quartets in one tree are resolved
in the same way or different ways in a forest of comparison trees.
CompareQuartetsMulti(x, cf)
Object of class phylo
representing the tree of interest.
Comparison tree of class phylo
, or list thereof, each with the
same leaves as x
.
CompareQuartetsMulti()
returns a named integer vector specifying
the number of quartets whose resolution in x
matches all or any of the
resolutions in cf
.
Named elements are:
The total number of quartet statements for the given number of n-leaf trees, i.e. n_trees × Q.
The total number of quartets for n leaves.
The number of quartets that are resolved identically in all trees.
The number of quartets that are resolved in x
, and
identically in at least one of cf
.
The number of quartets that are resolved in every tree in
cf
, but never in the same way as they are resolved in in x
.
The number of quartets in x
that are resolved differently
(i.e. contradicted) in at least one tree in cf
.
The number of quartets that are resolved in x
, but not in
any of cf
.
The number of quartets that are resolved in x
, but
unresolved in at least one of cf
.
The number of quartets that are resolved in all of cf
,
but not in x
.
The number of quartets that are resolved in at least one of cf
,
but not in x
.
The number of quartets that are unresolved in all trees.
The number of quartets that are unresolved in x
and
at least one tree in cf
.
The number of quartets in x
that are not resolved the
same way in any of cf
.
CompareQuartetsMulti()
explicitly evaluates each quartet in each tree.
As such its runtime will increase hyper-exponentially with the number of
leaves in trees being compared. 30 leaves will take around 5 seconds;
40 closer to 20 s, and 50 around a minute.
Other element-by-element comparisons:
CompareQuartets()
,
CompareSplits()
,
PairSharedQuartetStatus()
,
QuartetState()
,
SharedQuartetStatus()
,
SplitStatus()
Other quartet counting functions:
AllQuartets()
,
CompareQuartets()
,
ResolvedQuartets()
library("TreeTools")
CompareQuartetsMulti(x = CollapseNode(as.phylo(42, 6), 8:9),
cf = list(BalancedTree(6), PectinateTree(6),
CollapseNode(as.phylo(1337, 6), 9:10)))
#> N Q s_all s_any d_all d_any r1_all r1_any r2_all r2_any u_all
#> 60 15 0 4 4 9 0 7 1 3 0
#> u_any x_only
#> 2 8