R/AllGenerics.R
, R/diffEndTest.R
diffEndTest.Rd
Assess differential expression between the average expression at the end points of lineages of a trajectory.
diffEndTest(models, ...) # S4 method for SingleCellExperiment diffEndTest(models, global = TRUE, pairwise = FALSE, l2fc = 0) # S4 method for list diffEndTest(models, global = TRUE, pairwise = FALSE, l2fc = 0)
models | The fitted GAMs, typically the output from
|
---|---|
... | parameters including: |
global | If TRUE, test for all pairwise comparisons simultaneously. |
pairwise | If TRUE, test for all pairwise comparisons independently. |
l2fc | The log2 fold change threshold to test against. Note, that this will affect both the global test and the pairwise comparisons. |
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.
The l2fc
argument allows to test against a particular fold change
threshold. For example, if the interest lies in discovering genes that are
differentially expressed with an absolute log2 fold change cut off above 1,
i.e. a fold change of at least 2, then one can test for this by setting
l2fc=1
as argument to the function.
#>#> waldStat df pvalue logFC1_2 #> 1700012B09Rik 5.952271e-17 1 1.0000000 0.4659914 #> 1700017B05Rik 1.195657e+00 1 0.2741914 2.2271283 #> 1700020L24Rik 5.952271e-17 1 1.0000000 0.4659914 #> 1810009A15Rik 7.361088e-02 1 0.7861501 -0.3283338 #> 1810011H11Rik 5.952271e-17 1 1.0000000 0.4659914 #> 1810027O10Rik 6.182099e-01 1 0.4317133 -0.7828738 #> 1810031K17Rik 8.649102e-01 1 0.3523682 1.0515476 #> 1810033B17Rik 5.952271e-17 1 1.0000000 0.4659914 #> 1810037I17Rik 1.311039e+00 1 0.2522066 -2.6832658 #> 2010002N04Rik 5.952271e-17 1 1.0000000 0.4659914 #> 2010011I20Rik 2.664639e-02 1 0.8703317 21.3959504