View source: R/TreeQuartetDist.R
| WQDSAdjustLengths | R Documentation |
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.
WQDSAdjustLengths(tree)
tree |
an unrooted metric tree, of type phylo |
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.
an unrooted metric tree, of type phylo
YR19MSCquartets
WQDS,
WQDC
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.