rQuartetI {treebalance} | R Documentation |
Calculation of the rooted quartet index for rooted trees
Description
This function calculates the rooted quartet index for a given
rooted tree
. The tree must not necessarily be binary.
Let be a rooted tree, whose leaves are
. Let
denote the set of all subsets of
that have
cardinality 4. Let
denote the rooted quartet on
that is obtained by taking the subgraph of
that is induced by
and supressing its outdegree-1 vertices.
can have one of
the five following shapes:
- : This is the caterpillar tree shape on 4 leaves, i.e.
"(,(,(,)));"
in Newick format. It has 2 automorphisms.
- : This is the tree shape on 4 leaves that has three pending
subtrees rooted at the children of the root of
, one of them being
a cherry and the other two
being single vertices, i.e.
"((,),,);"
in Newick format. It has 4
automorphisms.
- : This is the tree shape on 4 leaves that has two pending
subtrees rooted at the children of the root of
, one of them being
a star tree shape on 3 leaves
and the other one being a single vertex, i.e.
"((,,),);"
in Newick
format. It has 6 automorphisms.
- : This is the fully balanced binary tree shape on 4 leaves,
i.e.
"((,),(,));"
in Newick format. It has 8 automorphisms.
- : This is the star tree shape on 4 leaves, i.e.
"(,,,);"
in Newick format. It has 24 automorphisms.
is assigned an rQI-value based on its shape, i.e.
if
has the shape
. The values
are
chosen in such a way that they increase with the symmetry of the shape as
measured by means of its number of automorphisms. Coronado et al. (2019)
suggested the values
and
or
for
.
The rooted quartet index of the tree
is then defined as
the sum of the rQI-values of its rooted quartets:
The rooted quartet index is a balance index.
For details on the rooted quartet index, see
also Chapter 20 in "Tree balance indices: a comprehensive survey" (https://doi.org/10.1007/978-3-031-39800-1_20).
Usage
rQuartetI(tree, shapeVal = c(0, 1, 2, 3, 4))
Arguments
tree |
A rooted tree in phylo format. |
shapeVal |
A vector of length 5 containing the shape values |
Value
rQuartetI
returns the rooted quartet index of the given tree based on the chosen shape values (see description for details).
Author(s)
Sophie Kersting
References
T. M. Coronado, A. Mir, F. Rossello, and G. Valiente. A balance index for phylogenetic trees based on rooted quartets. Journal of Mathematical Biology, 79(3):1105-1148, 2019. doi: 10.1007/s00285-019-01377-w. URL https://doi.org/10.1007/s00285-019-01377-w.
Examples
tree <- ape::read.tree(text="((((,),),(,)),(((,),),(,)));")
rQuartetI(tree)