Description Usage Arguments Value zinbwave zingeR edgeR DESeq2 Author(s) See Also Examples
We now generally recommend the ZINB-WaVE method over zingeR, since it is faster, and has been show to be more sensitive for most single-cell RNA-seq datasets.
1 2 3 4 5 6 7 8 9 10 11 | diffExp(object, ...)
## S4 method for signature 'SingleCellExperiment'
diffExp(object, numerator, denominator,
zeroWeights = c("zinbwave", "zingeR"), caller = c("edgeR", "DESeq2"),
minCellsPerGene = 25L, minCountsPerCell = 5L)
## S4 method for signature 'seurat'
diffExp(object, numerator, denominator,
zeroWeights = c("zinbwave", "zingeR"), caller = c("edgeR", "DESeq2"),
minCellsPerGene = 25L, minCountsPerCell = 5L)
|
object |
Object. |
... |
Additional arguments. |
numerator |
Group of cells to use in the numerator of the contrast (e.g. treatment). |
denominator |
Group of cells to use in the denominator of the contrast (e.g. control). |
zeroWeights |
Package to use for zero weight calculations. Defaults to zinbwave but zingeR is also supported. |
caller |
Package to use for differential expression calling. Defaults to edgeR (faster for large datasets) but DESeq2 is also supported. |
minCellsPerGene |
The minimum number of cells where a gene is expressed,
to pass low expression filtering. Set to |
minCountsPerCell |
Minimum number of counts per cell for a gene to pass
low expression filtering. The number of cells is defined by
|
caller = "edgeR"
: DEGLRT
.
caller = "DESeq2"
: Unshrunken DESeqResults
. Use lfcShrink()
if
shrunken results are desired.
We are currently using an epsilon setting of 1e12
, as recommended by the
ZINB-WaVE integration paper.
We first perform a differential expression analysis using zingeR posterior
probabilities and focussing on the count component of the ZINB model. The
weights are estimated with the core function of zingeR, zeroWeightsLS()
. It
is important to be consistent with the normalization procedure, i.e. if you
use TMM normalization for the analysis, you should also use it for estimating
the zingeR posterior probabilities.
After estimation of the dispersions and posterior probabilities, the
glmWeightedF()
function is used for statistical inference. This is an
adapted function from the glmLRT()
function of edgeR. It uses an F-test for
which the denominator degrees of freedom are by default adjusted according to
the downweighting of excess zeros (ZI = TRUE
). Also, independent filtering
can be performed on the obtained p-values (independentFiltering = TRUE
). We
use the independent filtering strategy that was originally implemented in
DESeq2. By default, the average fitted values are used as a filter criterion.
We're providing preliminary support for DESeq2 as the differential expression caller. It is currently considerably slower for large datasets than edgeR.
Michael Steinbaugh
Consult the following sources for more information:
DESeq2: We're trying to follow the conventions used in DESeq2 for
contrasts, defining the name of the factor in the design formula,
numerator, and denominator level for the fold change calculations. See
DESeq2::results()
for more information.
Seurat: Note that Seurat currently uses the convention cells.1
for the
numerator and cells.2
for the denominator. See Seurat::DiffExpTest()
for additional information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # seurat ====
# Expression in cluster 3 relative to cluster 2
object <- seurat_small
numerator <- Seurat::WhichCells(object, ident = 3L)
glimpse(numerator)
denominator <- Seurat::WhichCells(object, ident = 2L)
glimpse(denominator)
x <- diffExp(
object = object,
numerator = numerator,
denominator = denominator,
minCellsPerGene = 5L,
minCountsPerCell = 5L
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.