Learn R Programming

MSCquartets (version 3.1)

quartetDist: Compute quartet distance between taxa

Description

Compute the Quartet Distance of Rho19;textualMSCquartets from a table specifying a collection of quartets on n taxa.

Usage

quartetDist(dqt)

Value

a pairwise distance matrix on n taxa

Arguments

dqt

an (n choose 4) x n (or n+1) matrix of form output by quartetTableDominant; (Note: If present, the n+1th column of dqt is ignored.)

References

Rho19MSCquartets

See Also

quartetTableDominant, QDS, QDC, quartetWeightedDist

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)
DQT=quartetTableDominant(RQT)
Dist=quartetDist(DQT)
tree=NJ(Dist)
write.tree(tree)
plot(tree)

Run the code above in your browser using DataLab