expectedCFs: Produce table of expected quartet concordance factors for a...

View source: R/ExpectedCFs.R

expectedCFsR Documentation

Produce table of expected quartet concordance factors for a species tree

Description

Compiles table of expected quartet concordance factors (CFs) for gene trees under the MSC model on a metric species tree.

Usage

expectedCFs(speciestree, plot = TRUE, model = "T1", cex = 1)

Arguments

speciestree

phylo or character object specifying un/rooted metric species tree

plot

TRUE (default) to produce simplex plot of CFs, or FALSE to omit plot

model

"T1" or "T3" specifying model for plot

cex

scaling factor for size of plotted symbols

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 \insertCiteAllman2011MSCquartets 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 T1 model all CFs will lie on the vertical model line, and many choices of 4 taxa will give the same CFs. For model T3 the model lines the CFs are plotted on depend on taxon names and are essentially arbitrary.

Value

an (n choose 4)x(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

References

\insertRef

Allman2011MSCquartets

See Also

quartetTable, quartetTableResolved

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)


MSCquartets documentation built on Oct. 31, 2024, 1:08 a.m.