This function assesses differential expression between the average expression of the start and end points of a lineage.

startVsEndTest(models, ...)

# S4 method for SingleCellExperiment
startVsEndTest(
  models,
  global = TRUE,
  lineages = FALSE,
  pseudotimeValues = NULL,
  l2fc = 0
)

# S4 method for list
startVsEndTest(
  models,
  global = TRUE,
  lineages = FALSE,
  pseudotimeValues = NULL,
  l2fc = 0
)

Arguments

models

The fitted GAMs, typically the output from fitGAM.

...

parameters including:

global

If TRUE, test for all lineages simultaneously.

lineages

If TRUE, test for all lineages independently.

pseudotimeValues

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.

l2fc

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

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") startVsEndTest(gamList, global = TRUE, lineages = TRUE)
#> waldStat df pvalue waldStat_lineage1 df_lineage1 #> 1700012B09Rik 1.489419e-16 2 1.0000000 1.453929e-16 1 #> 1700017B05Rik 4.316466e-01 2 0.8058777 4.093973e-01 1 #> 1700020L24Rik 1.489419e-16 2 1.0000000 1.453929e-16 1 #> 1810009A15Rik 1.384770e+00 2 0.5003812 1.448834e-02 1 #> 1810011H11Rik 1.489419e-16 2 1.0000000 1.453929e-16 1 #> 1810027O10Rik 2.589421e+00 2 0.2739772 5.277397e-01 1 #> 1810031K17Rik 1.805065e+00 2 0.4055413 1.608561e+00 1 #> 1810033B17Rik 1.489419e-16 2 1.0000000 1.453929e-16 1 #> 1810037I17Rik 7.002206e-01 2 0.7046104 5.686266e-01 1 #> 2010002N04Rik 1.489419e-16 2 1.0000000 1.453929e-16 1 #> 2010011I20Rik 4.511815e-01 2 0.7980446 4.385465e-01 1 #> pvalue_lineage1 waldStat_lineage2 df_lineage2 pvalue_lineage2 #> 1700012B09Rik 1.0000000 3.548941e-18 1 1.0000000 #> 1700017B05Rik 0.5222756 2.224933e-02 1 0.8814257 #> 1700020L24Rik 1.0000000 3.548941e-18 1 1.0000000 #> 1810009A15Rik 0.9041920 1.370282e+00 1 0.2417635 #> 1810011H11Rik 1.0000000 3.548941e-18 1 1.0000000 #> 1810027O10Rik 0.4675587 2.061681e+00 1 0.1510435 #> 1810031K17Rik 0.2046942 1.965042e-01 1 0.6575575 #> 1810033B17Rik 1.0000000 3.548941e-18 1 1.0000000 #> 1810037I17Rik 0.4508052 1.315940e-01 1 0.7167850 #> 2010002N04Rik 1.0000000 3.548941e-18 1 1.0000000 #> 2010011I20Rik 0.5078248 1.263505e-02 1 0.9105017 #> logFClineage1 logFClineage2 #> 1700012B09Rik 0.9861345 -0.1417701 #> 1700017B05Rik -0.9678810 0.4140010 #> 1700020L24Rik 0.9861345 -0.1417701 #> 1810009A15Rik -0.1818238 2.4017616 #> 1810011H11Rik 0.9861345 -0.1417701 #> 1810027O10Rik 1.0967420 2.0879539 #> 1810031K17Rik 2.3024202 -0.5601034 #> 1810033B17Rik 0.9861345 -0.1417701 #> 1810037I17Rik -2.4445498 0.7254729 #> 2010002N04Rik 0.9861345 -0.1417701 #> 2010011I20Rik -28.4890302 31.0458737