conditionTest: Assess differential expression patterns between conditions...

conditionTestR Documentation

Assess differential expression patterns between conditions within a lineage.

Description

Assess differential expression patterns between conditions within a lineage.

Assess differential expression patterns between conditions within a lineage.

Usage

conditionTest(models, ...)

## S4 method for signature 'SingleCellExperiment'
conditionTest(
  models,
  global = TRUE,
  pairwise = FALSE,
  lineages = FALSE,
  knots = NULL,
  l2fc = 0,
  eigenThresh = 0.01
)

Arguments

models

The fitted GAMs, typically the output from fitGAM. For conditionTest, these are required to be a singleCellExperiment object.

...

parameters including:

global

If TRUE, test for all pairwise comparisons simultaneously, i.e. test for DE between all conditions in all lineages.

pairwise

If TRUE, return output for all comparisons between pairs of conditions. Both global and pairwise can be TRUE.

lineages

If TRUE, return output for all comparisons within each lineage. Both global and lineages can be TRUE. If both lineages and pairwise are TRUE, the function returns output for all pairs of conditions within each lineage.

knots

Default to NULL. Otherwise, a vector of length 2 specifying the smallest and largest knots that are contrasted between conditions.

l2fc

The log2 fold change threshold to test against. Note, that this will affect both the global test and the pairwise comparisons.

eigenThresh

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.

Value

A matrix with the wald statistic, the number of degrees of freedom and the p-value associated with each gene for all the tests performed.

Examples

## artificial example
data(crv, package = "tradeSeq")
data("countMatrix", package = "tradeSeq")
conditions <- factor(sample(1:2, size = ncol(countMatrix), replace = TRUE))
sce <- fitGAM(as.matrix(countMatrix), sds = crv, conditions = conditions)
res <- conditionTest(sce)

statOmics/tradeSeq documentation built on Jan. 19, 2024, 8:26 p.m.