View source: R/plotDEAnalysis.R
plotDEGHeatmap | R Documentation |
Heatmap visualization of DEG result
plotDEGHeatmap(
inSCE,
useResult,
onlyPos = FALSE,
log2fcThreshold = 0.25,
fdrThreshold = 0.05,
minGroup1MeanExp = NULL,
maxGroup2MeanExp = NULL,
minGroup1ExprPerc = NULL,
maxGroup2ExprPerc = NULL,
useAssay = NULL,
doLog = FALSE,
featureAnnotations = NULL,
cellAnnotations = NULL,
featureAnnotationColor = NULL,
cellAnnotationColor = NULL,
rowDataName = NULL,
colDataName = NULL,
colSplitBy = "condition",
rowSplitBy = "regulation",
rowLabel = S4Vectors::metadata(inSCE)$featureDisplay,
title = paste0("DE Analysis: ", useResult),
...
)
inSCE |
SingleCellExperiment inherited object. |
useResult |
character. A string specifying the |
onlyPos |
logical. Whether to only plot DEG with positive log2_FC
value. Default |
log2fcThreshold |
numeric. Only plot DEGs with the absolute values of
log2FC larger than this value. Default |
fdrThreshold |
numeric. Only plot DEGs with FDR value smaller than this
value. Default |
minGroup1MeanExp |
numeric. Only plot DEGs with mean expression in
group1 greater then this value. Default |
maxGroup2MeanExp |
numeric. Only plot DEGs with mean expression in
group2 less then this value. Default |
minGroup1ExprPerc |
numeric. Only plot DEGs expressed in greater then
this fraction of cells in group1. Default |
maxGroup2ExprPerc |
numeric. Only plot DEGs expressed in less then this
fraction of cells in group2. Default |
useAssay |
character. A string specifying an assay of expression value
to plot. By default the assay used for |
doLog |
Logical scalar. Whether to do |
featureAnnotations |
|
cellAnnotations |
|
featureAnnotationColor |
A named list. Customized color settings for
feature labeling. Should match the entries in the |
cellAnnotationColor |
A named list. Customized color settings for
cell labeling. Should match the entries in the |
rowDataName |
character. The column name(s) in |
colDataName |
character. The column name(s) in |
colSplitBy |
character. Do semi-heatmap based on the grouping of
this(these) annotation(s). Should exist in either |
rowSplitBy |
character. Do semi-heatmap based on the grouping of
this(these) annotation(s). Should exist in either |
rowLabel |
|
title |
character. Main title of the heatmap. Default
|
... |
Other arguments passed to |
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.
A ggplot
object
Yichen Wang
data("sceBatches")
logcounts(sceBatches) <- log1p(counts(sceBatches))
sce.w <- subsetSCECols(sceBatches, colData = "batch == 'w'")
sce.w <- runWilcox(sce.w, class = "cell_type",
classGroup1 = "alpha", classGroup2 = "beta",
groupName1 = "w.alpha", groupName2 = "w.beta",
analysisName = "w.aVSb")
plotDEGHeatmap(sce.w, "w.aVSb")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.