% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ExpectedCFs.R
\name{expectedCFs}
\alias{expectedCFs}
\title{Produce table of expected quartet concordance factors for a species tree}
\usage{
expectedCFs(speciestree, plot = TRUE, model = "T1", cex = 1)
}
\arguments{
\item{speciestree}{phylo or character object specifying un/rooted metric species tree}

\item{plot}{\code{TRUE} (default) to produce simplex plot of CFs, or \code{FALSE} to omit plot}

\item{model}{"T1" or "T3" specifying model for plot}

\item{cex}{scaling factor for size of plotted symbols}
}
\value{
an (\code{n} choose 4)x(\code{n}+3) matrix encoding
    4 taxon subsets of taxa and expectation of each of the
    quartets 12|34, 13|24, 14|23 across gene trees
}
\description{
Compiles table of expected quartet concordance factors (CFs) for gene trees under the MSC model 
on a metric species tree.
}
\details{
The species tree may be rooted or unrooted, but must have edge lengths given in coalescent units. Note that while the MSC
requires a rooted metric species tree parameter, as shown in \insertCite{Allman2011}{MSCquartets} the quartet CFs are independent 
of the root.

In the returned table, columns are labeled by taxon names and quartet names ("12|34", etc.).
1s and 0s in taxon columns indicate the taxa in a quartet. Quartet 12|34 means the first and second 
indicated taxa form a cherry, 13|24 means the first and third form a cherry, and 14|23 means
the first and fourth form a cherry. Unresolved quartets always have expectation 0 under the MSC.

If a simplex plot is produced, for the \code{T1} model all CFs will lie on the vertical model line, 
and many choices of 4 taxa will give the same CFs. For model \code{T3} the model lines the CFs are 
plotted on depend on taxon names and are essentially arbitrary.
}
\examples{
stree="((((t5:5000,t6:5000):5000,t4:10000):2500,t7:12500):7500,((t8:3000,t9:3000):5000,
((t1:4000,t2:4000):2500,t3:6500):1500):12000);"
st=read.tree(text=stree)
st$edge.length=st$edge.length/10000
expectedCFs(st)

}
\references{
\insertRef{Allman2011}{MSCquartets}
}
\seealso{
\code{\link{quartetTable}}, \code{\link{quartetTableResolved}}
}
