% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quartetDistTree.R
\name{quartetDistTree}
\alias{quartetDistTree}
\title{Build a Species Tree from Gene Trees Using the Quartet Distance}
\usage{
quartetDistTree(
  genedata,
  method = ape::fastme.bal,
  taxanames = NULL,
  omit = FALSE
)
}
\arguments{
\item{genedata}{gene tree data, supplied in any of 3 forms:
\enumerate{
\item as a character string giving the name of a file containing Newick gene trees,
\item as a \code{multiPhylo} object containing the gene trees, or
\item as a table of quartet counts on the gene trees, as produced by
\code{quartetTable} or \code{quartetTableResolved}
}}

\item{method}{a function for constructing a tree from a distance matrix, such as \code{NJ} or
\code{fastme.bal}}

\item{taxanames}{used only if \code{genedata} is a filneame or multiphylo object;
restrict gene trees to these taxa; if \code{NULL}, use taxa on first tree}

\item{omit}{used only if \code{genedata} is a filneame,\code{multiPhylo} object, 
or a quartet table with column \code{'1234'};
if TRUE omit unresolved quartets, if \code{FALSE} treat them as 1/3 of each resolution}
}
\value{
A \code{phylo} object representing the inferred tree.
}
\description{
This function takes a collection of gene trees and uses a
species tree by first computing the quartet distance of 
\insertCite{Rho19;textual}{MSCquartets}
from the gene trees and then applying a distance method.
}
\examples{
gtrees=read.tree(file=system.file("extdata","dataGeneTreeSample",package="MSCquartets"))
tree<-quartetDistTree(gtrees)
write.tree(tree)
plot(tree)

}
\references{
\insertRef{Rho19}{MSCquartets}
}
\seealso{
\code{quartetDist}, \code{QDS}, \code{quartetTableDominant}
}
