View source: R/WQDCrecursive.R
WQDCrecursive | R Documentation |
Infer a metric species tree from counts of quartets displayed on a collection of gene trees, as described by \insertCiteYR19;textualMSCquartets. Edge lengths are in coalescent units.
WQDCrecursive(rqt, method = fastme.bal, stopAt = 2, terminal = 1)
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 |
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.
an unrooted metric tree, of type phylo
YR19MSCquartets
quartetTableResolved
,quartetTable
,
QDC
, QDS
, quartetTableCollapse
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.