With an input SingleCellExperiment object and specifying the clustering labels, this function iteratively call the differential expression analysis on each cluster against all the others.
findMarkerDiffExp(
inSCE,
useAssay = "logcounts",
method = c("wilcox", "MAST", "DESeq2", "Limma", "ANOVA"),
cluster = "cluster",
covariates = NULL,
log2fcThreshold = NULL,
fdrThreshold = 0.05,
minClustExprPerc = NULL,
maxCtrlExprPerc = NULL,
minMeanExpr = NULL
)
SingleCellExperiment inherited object.
character. A string specifying which assay to use for the
MAST calculations. Default "logcounts"
.
A single character for specific differential expression
analysis method. Choose from 'wilcox'
, 'MAST'
, 'DESeq2'
,
'Limma'
, and 'ANOVA'
. Default "wilcox"
.
One single character to specify a column in
colData(inSCE)
for the clustering label. Alternatively, a vector or
a factor is also acceptable. Default "cluster"
.
A character vector of additional covariates to use when
building the model. All covariates must exist in
names(colData(inSCE))
. Not applicable when method
is
"MAST"
method. Default NULL
.
Only out put DEGs with the absolute values of log2FC
larger than this value. Default NULL
Only out put DEGs with FDR value smaller than this
value. Default NULL
A numeric scalar. The minimum cutoff of the
percentage of cells in the cluster of interests that expressed the marker
gene. From 0 to 1. Default NULL
.
A numeric scalar. The maximum cutoff of the
percentage of cells out of the cluster (control group) that expressed the
marker gene. From 0 to 1. Default NULL
.
A numeric scalar. The minimum cutoff of the mean
expression value of the marker in the cluster of interests. Default
NULL
.
The input SingleCellExperiment object with
metadata(inSCE)$findMarker
updated with a data.table of the up-
regulated DEGs for each cluster.
data("mouseBrainSubsetSCE", package = "singleCellTK")
mouseBrainSubsetSCE <- findMarkerDiffExp(mouseBrainSubsetSCE,
useAssay = "logcounts",
cluster = "level1class")
#> Wed Jun 29 07:52:38 2022 ... Identifying markers for cluster 'microglia', using DE method 'wilcox'
#> Wed Jun 29 07:52:39 2022 ... Identifying markers for cluster 'oligodendrocytes', using DE method 'wilcox'
#> Wed Jun 29 07:52:40 2022 ... Organizing findMarker result