NANUQdist: Compute NANUQ distance and write to file

NANUQdistR Documentation

Compute NANUQ distance and write to file

Description

Computes the quartet distance tables for the NANUQ algorithm of \insertCiteABR19;textualMSCquartets, using precomputed p-values for quartets, for each of several levels specified. Distance tables are written to files, in nexus format.

Usage

NANUQdist(
  pTable,
  outfile = "NANUQdist",
  alpha = 0.05,
  beta = 0.95,
  plot = TRUE
)

Arguments

pTable

a table of resolved quartets and p-values, as previously computed by NANUQ, or by both quartetTreeTestInd and quartetStarTestInd, with columns "p_T3" and "p_star"

outfile

a character string giving an output file name stub for saving a NANUQ distance matrix in nexus format; to the stub outfile will be appended an alpha and beta value and ".nex"; if NULL then not written to file

alpha

a value or vector of significance levels for judging p-values testing a null hypothesis of no hybridization for each quartet; a smaller value applies a more liberal test for a tree (more trees), hence a stricter requirement for suspecting hybridization (fewer reticulations)

beta

a value or vector of significance levels for judging p-values testing a null hypothesis of a star tree for each quartet; a smaller value applies a more liberal test for a star tree (more polytomies), hence a stricter requirment for suspecting a resolved tree; if vectors, alpha and beta must have the same length

plot

TRUE produces simplex plots of hypothesis tests, FALSE omits plots

Details

If plots are produced, each point represents an empirical quartet concordance factor, color-coded to represent test results giving interpretation as network, resolved tree, or star tree.

If alpha and beta are vectors, they must be of the same length k. Then the i-th entries are paired to produce k plots and k distance tables/output files. This is equivalent to k calls to NANUQdist with paired scalar values from the vectors of alpha and beta.

See the documentation for quartetNetworkDist for an explanation of a small, rarely noticeable, stochastic element of the algorithm.

Value

a NANUQ distance table, or a list of such tables if alpha and beta are vectors (returned invisibly)

References

\insertRef

ABR19MSCquartets

See Also

NANUQ, quartetTreeTestInd, quartetStarTestInd

Examples

data(pTableYeastRokas)
dist=NANUQdist(pTableYeastRokas, alpha=.05, beta=.95, outfile = NULL)


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