LikelihoodRatioTest {grandR} | R Documentation |
Compute a likelihood ratio test.
Description
The test is computed on any of total/old/new counts using DESeq2 based on two nested models specified using formulas.
Usage
LikelihoodRatioTest(
data,
name = "LRT",
mode = "total",
slot = "count",
normalization = mode,
target = ~Condition,
background = ~1,
columns = NULL,
logFC = FALSE,
verbose = FALSE
)
Arguments
data |
A grandR object |
name |
the user defined analysis name to store the results |
mode |
either "total", "new" or "old" |
slot |
which slot to use (should be a count slot, not normalized values) |
normalization |
normalize on "total", "new", or "old" (see details) |
target |
formula specifying the target model (you can use any column name from the |
background |
formula specifying the background model (you can use any column name from the |
columns |
logical vector of which columns (samples or cells) to use (or NULL: use all) |
logFC |
compute and add the log2 fold change as well |
verbose |
Print status updates |
Details
This is a convenience wrapper around the likelihood ratio test implemented in DESeq2.
DESeq2 by default performs size factor normalization. When computing differential expression of new RNA, it might be sensible to normalize w.r.t. to total RNA, i.e. use the size factors computed from total RNA instead of computed from new RNA. This can be accomplished by setting mode to "new", and normalization to "total"!
Value
a new grandR object including a new analysis table. The columns of the new analysis table are
"M" |
the base mean |
"S" |
the difference in deviance between the reduced model and the full model |
"P" |
the likelihood ratio test P value |
"Q" |
same as P but Benjamini-Hochberg multiple testing corrected |
"LFC" |
the log2 fold change for the target model (only with the logFC parameter set to TRUE) |