This function produces dot plots. Each column represent a group
of cells specified by groupBy, each row is a factor specified by
useDims. The color of dots reflects mean of factor loading of
specified factors in each cell group and sizes reflects the percentage of
cells that have loadings of a factor in a group. We utilize
ComplexHeatmap
for simplified management of adding annotation and slicing subplots. This was
inspired by the implementation in
scCustomize.
plotClusterFactorDot(
object,
groupBy = NULL,
useDims = NULL,
useRaw = FALSE,
splitBy = NULL,
factorScaleFunc = NULL,
cellIdx = NULL,
legendColorTitle = "Mean Factor\nLoading",
legendSizeTitle = "Percent\nLoaded",
viridisOption = "viridis",
verbose = FALSE,
...
)HeatmapList object.
A liger object
The names of the columns in cellMeta slot storing
categorical variables. Loading data would be aggregated basing on these,
together with splitBy. Default uses default clusters.
A Numeric vector to specify exact factors of interests.
Default NULL uses all available factors.
Whether to use un-aligned cell factor loadings (\(H\)
matrices). Default FALSE.
The names of the columns in cellMeta slot storing
categorical variables. Dotplot panel splitting would be based on these.
Default NULL.
A function object applied to factor loading matrix for
scaling the value for better visualization. Default NULL.
Valid cell subscription. See subsetLiger.
Default NULL for using all cells.
Title for colorbar legend. Default
"Mean Factor\nLoading".
Title for size legend. Default
"Percent\nLoaded"
Name of available viridis palette. See
viridis. Default "viridis".
Logical. Whether to show progress information. Mainly when
subsetting data. Default FALSE.
Additional theme setting arguments passed to
.complexHeatmapDotPlot and heatmap setting arguments passed to
Heatmap. See Details.
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.
# \donttest{
plotClusterFactorDot(pbmcPlot)
# }
Run the code above in your browser using DataLab