| CompareQuartetsMulti {Quartet} | R Documentation |
Compare one tree's quartets against others'
Description
CompareQuartetsMulti() counts how many quartets in one tree are resolved
in the same way or different ways in a forest of comparison trees.
Usage
CompareQuartetsMulti(x, cf)
Arguments
x |
Object of class |
cf |
Comparison tree of class |
Details
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.
Value
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:
- N
The total number of quartet statements for the given number of n-leaf trees, i.e. n_trees × Q.
- Q
The total number of quartets for n leaves.
- s_all
The number of quartets that are resolved identically in all trees.
- s_any
The number of quartets that are resolved in
x, and identically in at least one ofcf.- d_all
The number of quartets that are resolved in every tree in
cf, but never in the same way as they are resolved in inx.- d_any
The number of quartets in
xthat are resolved differently (i.e. contradicted) in at least one tree incf.- r1_all
The number of quartets that are resolved in
x, but not in any ofcf.- r1_any
The number of quartets that are resolved in
x, but unresolved in at least one ofcf.- r2_all
The number of quartets that are resolved in all of
cf, but not inx.- r2_any
The number of quartets that are resolved in at least one of
cf, but not inx.- u_all
The number of quartets that are unresolved in all trees.
- u_any
The number of quartets that are unresolved in
xand at least one tree incf.- x_only
The number of quartets in
xthat are not resolved the same way in any ofcf.
Author(s)
Martin R. Smith (martin.smith@durham.ac.uk)
See Also
Other element-by-element comparisons:
CompareQuartets(),
CompareSplits(),
PairSharedQuartetStatus(),
QuartetState(),
SharedQuartetStatus(),
SplitStatus()
Other quartet counting functions:
AllQuartets(),
CompareQuartets(),
ResolvedQuartets()
Examples
library("TreeTools")
CompareQuartetsMulti(x = CollapseNode(as.phylo(42, 6), 8:9),
cf = list(BalancedTree(6), PectinateTree(6),
CollapseNode(as.phylo(1337, 6), 9:10)))