WQDCrecursive {MSCquartets} | R Documentation |
Compute the Recursive Weighted Quartet Distance Consensus tree from gene tree data
Description
Infer a metric species tree from counts of quartets displayed on a collection of gene trees, as described by Yourdkhani and Rhodes (2020). Edge lengths are in coalescent units.
Usage
WQDCrecursive(rqt, method = fastme.bal, stopAt = 2, terminal = 1)
Arguments
rqt |
a resolved quartet table as produced by |
method |
a distance-based tree building function, such as |
stopAt |
a non-negative branch length in coalescent units; recursive calls stop when the longest branch in a recursively examined subtree is smaller than this value |
terminal |
non-negative branch length to supply for terminal branches,
whose lengths cannot be inferred by |
Details
The algorithm counts quartets displayed on the gene trees, builds a tree using WQDS
,
determines the split corresponding to the longest edge in that tree,
and then recursively builds trees
on the taxa in each split set together with a ‘composite taxon’ formed by all
taxa in the other split set.
This approach is slower than non-recursive WQDC
, but increases topological accuracy. Shorter branch
lengths tend to be more accurately estimated.
This function must be called with its argument a resolved quartet table of size (n choose 4)x(n+3). Its recursive nature requires building smaller resolved quartet tables on split sets with an additional composite taxon.
Value
an unrooted metric tree, of type phylo
References
Yourdkhani S, Rhodes JA (2020). “Inferring metric trees from weighted quartets via an intertaxon distance.” Bul. Math. Biol., 82(97). doi:10.1007/s11538-020-00773-4.
See Also
quartetTableResolved
,quartetTable
,
QDC
, QDS
, quartetTableCollapse
Examples
gtrees=read.tree(file=system.file("extdata","dataGeneTreeSample",package="MSCquartets"))
tnames=taxonNames(gtrees)
QT=quartetTable(gtrees,tnames[1:6])
RQT=quartetTableResolved(QT)
stree=WQDCrecursive(RQT)
write.tree(stree)
plot(stree)