TINNIK {MSCquartets} | R Documentation |
TINNIK algorithm to infer species tree of blobs
Description
Apply the TINNIK algorithm of Allman et al. (2024) (see also Allman et al. (2022)) to infer a tree of blobs for the species network from a collection of gene trees, under the network multispecies coalescent (NMSC) model.
Usage
TINNIK(
genedata,
omit = FALSE,
epsilon = 0,
test = "T3",
alpha = 0.05,
beta = 0.95,
treemethod = fastme.bal,
delta = 0,
taxanames = NULL,
plot = TRUE
)
Arguments
genedata |
gene tree data that may be supplied in any of 3 forms:
|
omit |
|
epsilon |
minimum for branch lengths to be treated as non-zero; ignored if gene tree data given as quartet table |
test |
a hypothesis test to perform, either "cut" or "T3" (default) |
alpha |
a value or vector of significance levels for judging p-values for test specified by "test"; testing a null hypothesis of no hybridization vs. an alternative of hybridization, for each quartet; a smaller value applies a less conservative test for a tree (more trees), hence a stricter requirement for deciding in favor of hybridization (fewer reticulations) |
beta |
a value or vector of significance levels for judging p-values testing
a null hypothesis of a star tree (polytomy) for each quartet vs. an alternative of anything else; a smaller value applies a less conservative
test for a star tree (more polytomies), hence a stricter requirement for deciding in favor of a resolved tree or network;
if vectors, |
treemethod |
a function implementing a method of tree inference from a distance table, e.g. the ape package's fastme.bal or nj |
delta |
a minimum edge length to retain in tree of blobs (see (Allman et al. 2024) for related theory); shorter edges are collapsed |
taxanames |
if |
plot |
|
Details
This function
counts displayed quartets across gene trees to form quartet count concordance factors (qcCFs),
applies appropriate hypothesis tests to judge qcCFs as representing putative hybridization, resolved trees, or unresolved (star) trees using
alpha
andbeta
as significance levels,produces a simplex plot showing results of the hypothesis tests for all qcCFs
computes the appropriate TINNIK distance table, and infers the tree of blobs from the distance.
A call of TINNIK
with genedata
given as a table previously output from TINNIK
is
equivalent to a call of TINNIKdist
followed by tree construction from the distance table.
If genedata
is a
table previously output from quartetTableResolved
which lacks columns of p-values for hypothesis tests, these will be appended to the table output by TINNIK
.
This table must contain a row with quartet counts for every 4 taxon set.
If plots are produced, there are 2 simplex plots: The first shows the hypothesis test results, and the second shows inferred B-quartets and T-quartets. In both, each point in the simplex plot corresponds to an empirical quartet concordance factor, color-coded to represent test or inference results.
In general, alpha
should be chosen to be small and beta
to be large so that most quartets are interpreted as resolved trees. More quartets judges to have
either blob or unresolved relationships will lead to a less resolved blob tree.
Usually, an initial call to TINNIK
will not give a good analysis, as values
of alpha
and beta
are likely to need some adjustment based on inspecting the data. Saving the returned
table of test results from TINNIK
will allow for the results of the time-consuming computation of qcCFs to be
saved, along with p-values,
for input to further calls of TINNIK
with new choices of alpha
and beta
.
See the documentation for TINNIKdist
for an explanation of a small, rarely noticeable,
stochastic element of the algorithm.
For data sets of many gene trees, user time may be reduced by using parallel code for
counting displayed quartets. See quartetTableParallel
.
Value
output
(returned invisibly), with output$ToB
the TINNIK tree of blobs, output$pTable
the table of quartets and p-values for judging fit to the MSC on quartet
trees, and output$Bquartets
a TRUE/FALSE indicator vector of B-quartets; if alpha, beta
are vectors, output$ToB
is a vector of trees;
the table can be used as input to TINNIK
or TINNIKdist
with new choices of alpha, beta
, without re-tallying quartets on
gene trees
References
Allman ES, Baños H, Mitchell JD, Rhodes JA (2022). “The tree of blobs of a species network: identifiability under the coalescent.” Journal of Mathematical Biology, 86(1), 10. doi:10.1007/s00285-022-01838-9.
Allman ES, Baños H, Mitchell JD, Rhodes JA (2024). “TINNIK: Inference of the Tree of Blobs of Species Networks Under the Coalescent.” draft.
See Also
quartetTable
, quartetTableParallel
, quartetTableDominant
, quartetCutTestInd
,quartetTreeTestInd
,
quartetStarTestInd
, TINNIKdist
, quartetTestPlot
, pvalHist
Examples
data(pTableYeastRokas)
out=TINNIK(pTableYeastRokas,test="T3",alpha=.01, beta=.05)