WQDSAdjustLengths: Adjust edge lengths on tree built from Weighted Quartet...

View source: R/TreeQuartetDist.R

WQDSAdjustLengthsR Documentation

Adjust edge lengths on tree built from Weighted Quartet distance to estimate metric tree

Description

Modify edge lengths of a tree built from a distance table produced by quartetWeightedDist, to remove scaling factors related to the size of the split associated to the edge.

Usage

WQDSAdjustLengths(tree)

Arguments

tree

an unrooted metric tree, of type phylo

Details

As explained by \insertCiteYR19;textualMSCquartets, a metric tree produced from the weighted quartet distance has edge lengths inflated by a factor dependent on the associated split size. Removing these factors yields a consistent estimate of the metric species tree displaying the weighted quartets, if such a tree exists.

This function should not be used on trees output from WQDS, WQDC, or WQDCrecursive, as their edges are already adjusted. It can be used on trees built from the distance computed by quartetWeightedDist.

Value

an unrooted metric tree, of type phylo

References

\insertRef

YR19MSCquartets

See Also

WQDS, WQDC

Examples

gtrees=read.tree(file=system.file("extdata","dataGeneTreeSample",package="MSCquartets"))
tnames=taxonNames(gtrees)
QT=quartetTable(gtrees,tnames[1:6])
RQT=quartetTableResolved(QT)
DQT=quartetTableDominant(RQT,bigweights="finite")
D=quartetWeightedDist(DQT)
tree=NJ(D)
write.tree(tree)
plot(tree)
stree=WQDSAdjustLengths(tree)
write.tree(stree)
plot(stree)


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