Assess differences in expression patterns between lineages.

patternTest(models, ...)

# S4 method for list
patternTest(
models,
global = TRUE,
pairwise = FALSE,
nPoints = 2 * nknots(models),
l2fc = 0,
eigenThresh = 0.01
)

# S4 method for SingleCellExperiment
patternTest(
models,
global = TRUE,
pairwise = FALSE,
nPoints = 2 * nknots(models),
l2fc = 0,
eigenThresh = 0.01
)

## Arguments

models The fitted GAMs, typically the output from fitGAM. parameters including: If TRUE, test for all pairwise comparisons simultaneously. If models contains conditions (i.e. fitGAM was run with the conditions argument), then we compare the within-lineage average across conditions, between lineages. If TRUE, test for all pairwise comparisons, between lineages. The number of points to be compared between lineages. Defaults to twice the number of knots The log2 fold change threshold to test against. Note, that this will affect both the global test and the pairwise comparisons. Eigenvalue threshold for deciding on the rank of the variance-covariance matrix of the contrasts defined by patternTest, and 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 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

data(gamList, package = "tradeSeq")
patternTest(gamList, global = TRUE, pairwise = TRUE)
#> Only two lineages; skipping pairwise comparison.#>                   waldStat df    pvalue   fcMedian
#> 1700012B09Rik 9.653884e-17  2 1.0000000  0.2870678
#> 1700017B05Rik 5.709874e+00  5 0.3354806  1.9125323
#> 1700020L24Rik 9.653884e-17  2 1.0000000  0.2870678
#> 1810009A15Rik 1.651983e+00  3 0.6476613  0.7895784
#> 1810011H11Rik 9.653884e-17  2 1.0000000  0.2870678
#> 1810027O10Rik 1.050938e+00  5 0.9583535  0.4161918
#> 1810031K17Rik 2.674113e+00  5 0.7500748  0.8405849
#> 1810033B17Rik 9.653884e-17  2 1.0000000  0.2870678
#> 1810037I17Rik 1.486265e+00  2 0.4756216  1.2153200
#> 2010002N04Rik 9.653884e-17  2 1.0000000  0.2870678
#> 2010011I20Rik 1.709778e-01  3 0.9821326 19.6281799