Learn R Programming

MSCquartets (version 3.1)

WQDCrecursive: 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 YR19;textualMSCquartets. Edge lengths are in coalescent units.

Usage

WQDCrecursive(rqt, method = fastme.bal, stopAt = 2, terminal = 1)

Value

an unrooted metric tree, of type phylo

Arguments

rqt

a resolved quartet table as produced by quartetTableResolved

method

a distance-based tree building function, such as fastme.bal or nj

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 WQDCrecursive

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.

References

YR19MSCquartets

See Also

quartetTableResolved,quartetTable, QDC, QDS, quartetTableCollapse

Examples

Run this code
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)

Run the code above in your browser using DataLab