Create heatmap for showing top marker expression in conditions
plotMarkerHeatmap(
object,
result,
topN = 5,
lfcThresh = 1,
padjThresh = 0.05,
pctInThresh = 50,
pctOutThresh = 50,
dedupBy = c("logFC", "padj"),
groupBy = NULL,
groupSize = 50,
column_title = NULL,
...
)
A HeatmapList-class object.
A liger object, with normalized data and metadata to annotate available.
The data.frame returned by runMarkerDEG
.
Number of top features to be plot for each group. Default
5
.
Hard threshold on logFC value. Default 1
.
Hard threshold on adjusted P-value. Default 0.05
.
Threshold on expression percentage. These
mean that a feature will only pass the filter if it is expressed in more than
pctInThresh
percent of cells in the corresponding cluster. Similarly
for pctOutThresh
. Only applied when these metrics are available.
Default 50
percent for both.
When ranking by padj and logFC and a feature is ranked as top
for multiple clusters, assign this feature as the marker of a cluster when
it has the largest "logFC"
in the cluster or has the lowest
"padj"
. Default "logFC"
.
Cell metadata variable names for cell grouping. Downsample
balancing will also be aware of this. Default "dataset"
and the
default cluster.
Maximum number of cells in each group to be downsampled for
plotting. Default 50
.
Title on the column. Default NULL
.
Arguments passed on to plotGeneHeatmap
, .plotHeatmap
cellAnnotation
data.frame object for using external annotation, with
each column a variable and each row is a cell. Row names of this data.frame
will be used for matching cells involved in heatmap. For cells not found in
this data.frame, NA
s will be added with warning. Default NULL
.
transpose
Logical, whether to "rotate" the heatmap by 90 degrees so
that cell information is displayed by row. Default FALSE
.
showCellLabel,showFeatureLabel
Logical, whether to show cell barcodes,
gene symbols or factor names. Default TRUE
for gene/factors but
FALSE
for cells.
cellAnnColList,featureAnnColList
List object, with each element a
named vector of R-interpretable color code. The names of the list elements
are used for matching the annotation variable names. The names of the colors
in the vectors are used for matching the levels of a variable (factor object,
categorical). Default NULL
generates ggplot-flavor categorical colors.
scale
Logical, whether to take z-score to scale and center gene
expression. Applied after dataScaleFunc
. Default FALSE
.
trim
Numeric vector of two values. Limit the z-score value into this
range when scale = TRUE
. Default c(-2, 2)
.
baseSize
One-parameter control of all text sizes. Individual text element sizes can be controlled by other size arguments. "Title" sizes are 2 points larger than "text" sizes when being controlled by this.
cellTextSize,featureTextSize,legendTextSize
Size of cell barcode
labels, gene/factor labels, or legend values. Default NULL
.
cellTitleSize,featureTitleSize,legendTitleSize
Size of titles of the
cell slices, gene/factor slices, or the legends. Default NULL
.
viridisOption,viridisDirection
See argument option
and
direction
of viridis
. Default "A"
and -1
.
RColorBrewerOption
When scale = TRUE
, heatmap color will be
mapped with brewer.pal
. This is passed to
name
. Default "RdBu"
.
defaultCluster(pbmc) <- pbmcPlot$leiden_cluster
pbmc <- normalize(pbmc)
plotMarkerHeatmap(pbmc, deg.marker)
Run the code above in your browser using DataLab