Adapted from Seurat::DotPlot but adds the module score per group.

DotPlotwithModuleScore(
  object,
  assay = NULL,
  features,
  featureDat = featureDat,
  cols = c("lightgrey", "blue"),
  col.min = -2.5,
  col.max = 2.5,
  dot.min = 0,
  dot.scale = 6,
  idents = NULL,
  group.by = NULL,
  split.by = NULL,
  cluster.idents = FALSE,
  clusters = "sampleNames",
  scale = TRUE,
  scale.by = "radius",
  scale.min = NA,
  scale.max = NA
)

Arguments

object

A Seurat object.

assay

The assay to be used for plotting. Defaults to NULL, in which case the default assay of the object is used.

features

A list of character vectors of gene names in "symbol" annotation (SCHNAPPs specific).

featureDat

A data frame containing information about features, particularly the "symbol" column.

cols

A vector of colors for plotting.

col.min

Minimum value for color scaling.

col.max

Maximum value for color scaling.

dot.min

Minimum value for dot scaling.

dot.scale

Scaling factor for dot size.

idents

Identifiers for cells.

group.by

Grouping variable.

split.by

Variable to split the plot by.

cluster.idents

Boolean indicating whether to cluster identifiers.

clusters

Column name for grouping identifiers.

scale

Logical indicating whether to scale the data.

scale.by

The type of scaling to be applied ('size' or 'radius').

scale.min

Minimum value for scaling.

scale.max

Maximum value for scaling.

Value

A ggplot2 object representing the DotPlot with module scores.