QDC: Compute Quartet Distance Consensus tree from gene tree data

View source: R/TreeQuartetDist.R

QDCR Documentation

Compute Quartet Distance Consensus tree from gene tree data

Description

Compute the Quartet Distance Consensus \insertCiteRho19MSCquartets estimate of an unrooted topological species tree from gene tree data.

Usage

QDC(
  genetreedata,
  taxanames = NULL,
  method = fastme.bal,
  omit = FALSE,
  metric = FALSE
)

Arguments

genetreedata

gene tree data that may be supplied in any of 3 forms:

  1. a character string giving the name of a file containing gene trees in Newick,

  2. a multiPhylo object containing gene trees, or

  3. a resolved quartet table, such as produced by quartetTableResolved

taxanames

if genetreedata is a file or a multiPhylo object, a vector of a subset of the taxa names on the gene trees to be analyzed, if NULL all taxa on the first gene tree are used; if genetreedata is a quartet table, this argument is ignored and all taxa in the table are used

method

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

omit

TRUE ignores unresolved quartets; FALSE treats them as 1/3 of each resolution; ignored if genetreedata is supplied as a quartet table

metric

if FALSE return topological tree; if TRUE return metric tree with internal edge lengths estimated by estimateEdgeLengths with lambda=0, and terminal branches of length 1

Details

This function is a wrapper which performs the steps of reading in a collection of gene trees, tallying quartets, computing the quartet distance between taxa, building a tree which consistently estimates the unrooted species tree topology under the MSC, and then possibly estimating edge lengths using the "simpleML" method.

Value

an unrooted tree of type phylo

References

\insertRef

Rho19MSCquartets

See Also

quartetTable, quartetTableResolved, quartetTableDominant, quartetDist, QDS, WQDC, WQDCrecursive estimateEdgeLengths

Examples

gtrees=read.tree(file=system.file("extdata","dataGeneTreeSample",package="MSCquartets"))
tnames=taxonNames(gtrees)
stree=QDC(gtrees,tnames[1:6])
write.tree(stree)
plot(stree)
streeMetric=QDC(gtrees, tnames[1:6],metric=TRUE)
write.tree(streeMetric)
plot(streeMetric)


MSCquartets documentation built on Nov. 2, 2023, 5:32 p.m.