DotPlot2: Enhanced Dot Plot Visualization for Seurat Objects

View source: R/DotPlotFxs.R

DotPlot2R Documentation

Enhanced Dot Plot Visualization for Seurat Objects

Description

This function provides an enhanced dot plot visualization for Seurat objects, allowing for flexible grouping, assay selection, and dendrogram inclusion options. It averages expression data by specified groups and then utilizes a customized plotting function to display the results.

Usage

DotPlot2(
  SerObj,
  group.by,
  layer = "data",
  assay = "RBA",
  markerVec,
  rowsplit = NULL,
  columnsplit = NULL,
  size = 6,
  coldend = FALSE,
  rowdend = FALSE,
  coldendside = "bottom",
  rowdendside = "left",
  fontsize = 12,
  titlefontsize = 14,
  gap = 0
)

Arguments

SerObj

A Seurat object containing the data to be visualized.

group.by

The name of the metadata column in 'SerObj' to group the data by.

layer

The layer from which to retrieve data. Common layers include "data", "scale.data", and "counts".

assay

The name of the assay to use for data retrieval. Default is "RBA".

markerVec

A vector of marker genes to include in the plot.

rowsplit

Optional. A vector specifying how to split rows in the plot. NULL means no splitting.

columnsplit

Optional. A vector specifying how to split columns in the plot. NULL means no splitting.

size

The size of the dots in the plot.

coldend

Logical, whether to include a column dendrogram.

rowdend

Logical, whether to include a row dendrogram.

coldendside

The side on which to draw the column dendrogram ("top" or "bottom").

rowdendside

The side on which to draw the row dendrogram ("left" or "right").

fontsize

The font size for text in the plot.

titlefontsize

The font size for the plot title.

gap

The gap between dots in the plot.

Value

Generates a dot plot visualization based on the provided Seurat object and parameters.

Examples

DotPlot2(mySeuratObject, group.by = "ident", layer = "data", assay = "RNA",
         markerVec = c("GeneA", "GeneB", "GeneC"))


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.