plotClusterGeneDot | R Documentation |
This function produces dot plots. Each column represent a group
of cells specified by groupBy
, each row is a gene specified by
features
. The color of dots reflects mean of normalized expression of
specified genes in each cell group and sizes reflects the percentage of cells
expressing each gene in a group. We utilize
ComplexHeatmap
for simplified management of adding annotation and slicing subplots. This was
inspired by the implementation in
scCustomize.
plotClusterGeneDot(
object,
features,
groupBy = NULL,
splitBy = NULL,
featureScaleFunc = function(x) log2(10000 * x + 1),
cellIdx = NULL,
legendColorTitle = "Mean\nExpression",
legendSizeTitle = "Percent\nExpressed",
viridisOption = "magma",
verbose = FALSE,
...
)
object |
A liger object |
features |
Use a character vector of gene names to make plain dot plot
like a heatmap. Use a data.frame where the first column is gene names and
second column is a grouping variable (e.g. subset |
groupBy |
The names of the columns in |
splitBy |
The names of the columns in |
featureScaleFunc |
A function object applied to normalized data for
scaling the value for better visualization. Default |
cellIdx |
Valid cell subscription. See |
legendColorTitle |
Title for colorbar legend. Default
|
legendSizeTitle |
Title for size legend. Default
|
viridisOption |
Name of available viridis palette. See
|
verbose |
Logical. Whether to show progress information. Mainly when
subsetting data. Default |
... |
Additional theme setting arguments passed to
|
For ...
, please notice that arguments colorMat
,
sizeMat
, featureAnnDF
, cellSplitVar
, cellLabels
and viridisOption
from .complexHeatmapDotPlot
are
already occupied by this function internally. A lot of arguments from
Heatmap
have also been occupied: matrix,
name, heatmap_legend_param, rect_gp, col, layer_fun, km, border, border_gp,
column_gap, row_gap, cluster_row_slices, cluster_rows, row_title_gp,
row_names_gp, row_split, row_labels, cluster_column_slices, cluster_columns,
column_split, column_title_gp, column_title, column_labels, column_names_gp,
top_annotation
.
HeatmapList
object.
# Use character vector of genes
features <- varFeatures(pbmcPlot)[1:10]
plotClusterGeneDot(pbmcPlot, features = features)
# Use data.frame with grouping information, with more tweak on plot
features <- data.frame(features, rep(letters[1:5], 2))
plotClusterGeneDot(pbmcPlot, features = features,
clusterFeature = TRUE, clusterCell = TRUE, maxDotSize = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.