This function is a wrapper around tradeSeq test functions, such as associationTest
or conditionTest
, and allows multiple tests to be performed simultaneously, with all necessary parameters specified internally. It also organizes the output of each test into separate list
elements, making it easy to access results. Finally, it calculates an adjusted p-value and orders based on decreasing Waldstat.
Usage
tradeSeqTests(
models,
tests = c("assoc", "pattern", "diffend", "early", "startvsend", "condition"),
global = TRUE,
pairwise = TRUE,
lineages = TRUE,
l2fc = 0,
eigen.thresh = 0.01,
n.points = 2 * nknots(models),
knots = NULL,
pseudotime.values = NULL,
parallelized = FALSE,
BPPARAM = NULL,
tidy = TRUE,
raw = FALSE,
verbose = TRUE
)
Arguments
- models
A SingleCellExperiment object containing the fitted GAM smoothers, computed using
fitGAM
, with or without conditions provided.- tests
Character. The names of one or several tests to perform. You may provide partial names, such as 'assoc' for
associationTest
, as long as a single match is found. The available tests areassociationTest
,patternTest
,diffEndTest
,earlyDETest
,startVsEndTest
andconditionTest
.conditionTest
is ignored ifmodels
was computed usingfitGAM
without conditions.- global
Logical. (from
earlyDETest
/startVsEndTest
documentation) IfTRUE
, test for all pairwise comparisons/lineages simultaneously.- pairwise
Logical. (from
earlyDETest
documentation) IfTRUE
, test for all pairwise comparisons independently. Ignored in tests that do not havepairwise
.- lineages
Logical. (from
startVsEndTest
documentation) IfTRUE
, test for all lineages independently. Ignored in tests that do not havelineages
.- l2fc
Numeric. (from
earlyDETest
documentation) The log2 fold change threshold to test against. Note, that this will affect both the global test and the pairwise comparisons.- eigen.thresh
Numeric. (from
earlyDETest
documentation) Eigenvalue threshold for inverting the variance-covariance matrix of the coefficients to use for calculating the Wald test statistics. Lower values are more lenient to adding more information but also decrease computational stability. This argument should in general not be changed by the user but is provided for back-compatability. Set to 1e-8 to reproduce results of older version of 'tradeSeq'. Ignored in tests that do not haveeigen.thresh
.- n.points
Numeric. (from
earlyDETest
documentation) The number of points to be compared between lineages. Defaults to twice the number of knots. Ignored in tests that do not haven.points
.- knots
Numeric or List. (from
earlyDETest
documentation) A vector of length 2 specifying the knots at the start and end of the region of interest. You may also provide alist
of multiple elements (for example, list(c(2,4), c(3,4))) to repeat the test for multiple sets of knots. Ignored in tests that do not haveknots
.- pseudotime.values
Numeric or List. (from
startVsEndTest
documentation) A vector of length 2, specifying two pseudotime values to be compared against each other, for every lineage of the trajectory. @details Note that this test assumes that all lineages start at a pseudotime value of zero, which is the starting point against which the end point is compared. You may also provide alist
of multiple elements (for example, list(c(8,12), c(6,14))) to repeat the test for multiple sets of pseudotime values. Ignored in tests that do not havepseudotime.values
.- parallelized
Logical. If
TRUE
, thetests
will be parallelized using BiocParallel. Please note that parallelization is complex and depends on your operating system (Windows users might not see a gain or might even experience a slowdown).- BPPARAM
A
BiocParallelParam
object to be used for parallelization. IfNULL
andparallelized
=TRUE
, the function will use aSerialParam
object configured to use a single worker (core) and is therefore not parallelized, in order to prevent accidental use of large computation resources. Ignored ifparallelized
=FALSE
.- tidy
Logical. If
TRUE
, alist
is returned, withdata.frame
objects corresponding to each test divided into eachglobal
,pairwise
and/orlineages
comparison results. An adjusted p-value (False Discovery Rate) is also calculated and eachdata.frame
object is ordered based on decreasing Waldstat.- raw
Logical. If
TRUE
, alist
is returned, withdata.frame
objects corresponding to each test results.- verbose
Logical. If
FALSE
, does not print progress messages and output, but warnings and errors will still be printed.