QuartetState {Quartet} | R Documentation |
Quartet State(s)
Description
Report the status of the specified quartet(s) in given trees or lists of splits.
Usage
QuartetState(tips, bips, splits = bips, asRaw = FALSE)
QuartetStates(splits, asRaw = FALSE)
## S3 method for class 'Splits'
QuartetStates(splits, asRaw = FALSE)
## S3 method for class 'list'
QuartetStates(splits, asRaw = FALSE)
## S3 method for class 'multiPhylo'
QuartetStates(splits, asRaw = FALSE)
Arguments
tips |
A four-element array listing a quartet of leaves, either by their
number (if class |
bips |
Deprecated; included for compatibility with v1.0.2 and below. |
splits |
An object, such as a tree of class |
asRaw |
Logical specifying whether return format should be |
Details
One of the three possible four-leaf trees will be consistent with any set of splits generated from a fully resolved tree. If the leaves are numbered 1 to 4, this tree can be identified by naming the leaf most closely related to leaf 4. If a set of splits is generated from a tree that contains polytomies, it is possible that all three four-leaf trees are consistent with the set of splits.
Value
QuartetState()
returns 0
if the relationships of the four leaves
are not constrained by the provided splits, or the index of the closest
relative to tips[4]
, otherwise.
QuartetStates()
returns a raw vector listing the status of each
quartet of leaves (in the order listed by AllQuartets()
) in turn,
or if multiple trees are provided, a matrix in which each row corresponds
to such a vector.
Author(s)
Martin R. Smith (martin.smith@durham.ac.uk)
References
-
Estabrook GF, McMorris FR, Meacham CA (1985). “Comparison of undirected phylogenetic trees based on subtrees of four evolutionary units.” Systematic Zoology, 34(2), 193–200. doi:10.2307/2413326.
See Also
Compare quartet states between trees (slowly) using
CompareQuartets()
and CompareQuartetsMulti()
.
Other element-by-element comparisons:
CompareQuartetsMulti()
,
CompareQuartets()
,
CompareSplits()
,
PairSharedQuartetStatus()
,
SharedQuartetStatus()
,
SplitStatus()
Examples
trees <- list(TreeTools::BalancedTree(6),
TreeTools::PectinateTree(6))
trees[[3]] <- TreeTools::CollapseNode(trees[[2]], 9:10)
QuartetState(c(1, 3, 4, 6), trees[[2]])
QuartetState(1:4, trees[[1]]) == QuartetState(1:4, trees[[2]])
QuartetState(c(1, 3, 4, 6), trees[[3]])
QuartetStates(trees[[2]])
QuartetStates(trees[[3]])
CompareQuartets(QuartetStates(trees[[2]]), QuartetStates(trees[[3]]))
CompareQuartetsMulti(trees[[1]], trees[2:3])