WQDCrecursive: Compute the Recursive Weighted Quartet Distance Consensus...

View source: R/WQDCrecursive.R

WQDCrecursiveR 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 \insertCiteYR19;textualMSCquartets. 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 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.

Value

an unrooted metric tree, of type phylo

References

\insertRef

YR19MSCquartets

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)


MSCquartets documentation built on Oct. 31, 2024, 1:08 a.m.