earlyDETest: Perform test of early differences between lineages

Description Usage Arguments Details Value Examples

Description

Perform test of differential expression patterns between lineages in a user-defined region based on the knots of the smoothers.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
earlyDETest(models, ...)

## S4 method for signature 'SingleCellExperiment'
earlyDETest(
  models,
  global = TRUE,
  pairwise = FALSE,
  knots = NULL,
  nPoints = 2 * nknots(models),
  l2fc = 0,
  eigenThresh = 0.01
)

## S4 method for signature 'list'
earlyDETest(
  models,
  global = TRUE,
  pairwise = FALSE,
  knots = NULL,
  nPoints = 2 * nknots(models),
  l2fc = 0,
  eigenThresh = 0.01
)

Arguments

models

The fitted GAMs, typically the output from fitGAM.

...

parameters including:

global

If TRUE, test for all pairwise comparisons simultaneously.

pairwise

If TRUE, test for all pairwise comparisons independently.

knots

A vector of length 2 specifying the knots before and after the region of interest.

nPoints

The number of points to be compared between lineages. Defaults to twice the number of knots

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'.

Details

To help the user in choosing which knots to use when defining the branching, the plotGeneCount function has a models optional parameter that can be used to visualize where the knots are.

Value

A matrix with the wald statistic, the number of df and the p-value associated with each gene for all the tests performed. Also, for each possible pairwise comparision, the observed log fold changes. If the testing procedure was unsuccessful, the procedure will return NA test statistics, fold changes and p-values.

Examples

1
2
data(gamList, package = "tradeSeq")
earlyDETest(gamList, knots = c(1, 2), global = TRUE, pairwise = TRUE)

tradeSeq documentation built on Nov. 8, 2020, 7:51 p.m.