Heatmap visualization of DEG result
plotDEGHeatmap(
inSCE,
useResult,
doLog = FALSE,
onlyPos = FALSE,
log2fcThreshold = 0.25,
fdrThreshold = 0.05,
useAssay = NULL,
featureAnnotations = NULL,
cellAnnotations = NULL,
featureAnnotationColor = NULL,
cellAnnotationColor = NULL,
rowDataName = NULL,
colDataName = NULL,
colSplitBy = "condition",
rowSplitBy = "regulation",
title = paste0("DE Analysis: ", useResult),
...
)SingleCellExperiment inherited object.
character. A string specifying the analysisName
used when running a differential expression analysis function.
Logical scalar. Whether to do log(assay + 1)
transformation on the assay used for the analysis. Default FALSE.
logical. Whether to only plot DEG with positive log2_FC
value. Default FALSE.
numeric. Only plot DEGs with the absolute values of
log2FC larger than this value. Default 0.25.
numeric. Only plot DEGs with FDR value smaller than this
value. Default 0.05.
character. A string specifying an assay of expression value
to plot. By default the assay used for runMAST() will be used.
Default NULL.
data.frame, with rownames containing
all the features going to be plotted. Character columns should be factors.
Default NULL.
data.frame, with rownames containing
all the cells going to be plotted. Character columns should be factors.
Default NULL.
A named list. Customized color settings for
feature labeling. Should match the entries in the featureAnnotations
or rowDataName. For each entry, there should be a list/vector of
colors named with categories. Default NULL.
A named list. Customized color settings for
cell labeling. Should match the entries in the cellAnnotations or
colDataName. For each entry, there should be a list/vector of colors
named with categories. Default NULL.
character. The column name(s) in rowData that need
to be added to the annotation. Default NULL.
character. The column name(s) in colData that need
to be added to the annotation. Default NULL.
character. Do semi-heatmap based on the grouping of
this(these) annotation(s). Should exist in either colDataName or
names(cellAnnotations). Default "condition".
character. Do semi-heatmap based on the grouping of
this(these) annotation(s). Should exist in either rowDataName or
names(featureAnnotations). Default "regulation".
character. Main title of the heatmap. Default
"DE Analysis: <useResult>".
Other arguments passed to plotSCEHeatmap
A ComplexHeatmap::Heatmap object
A differential expression analysis function has to be run in advance
so that information is stored in the metadata of the input SCE object. This
function wraps plotSCEHeatmap.
A feature annotation basing on the log2FC level called "regulation"
will be automatically added. A cell annotation basing on the condition
selection while running the analysis called "condition", and the
annotations used from colData(inSCE) while setting the condition and
covariates will also be added.
data("sceBatches")
logcounts(sceBatches) <- log(counts(sceBatches) + 1)
sce.w <- subsetSCECols(sceBatches, colData = "batch == 'w'")
sce.w <- runWilcox(sce.w, class = "cell_type", classGroup1 = "alpha",
groupName1 = "w.alpha", groupName2 = "w.beta",
analysisName = "w.aVSb")
plotDEGHeatmap(sce.w, "w.aVSb")