JustDots: Custom Dot Plot Visualization for Seurat Objects

View source: R/DotPlotFxs.R

JustDotsR Documentation

Custom Dot Plot Visualization for Seurat Objects

Description

This function creates a custom dot plot visualization for Seurat objects. It is designed to allow for complex customizations such as splitting rows and columns, adjusting dot sizes, and incorporating dendrograms. It scales the expression data, applies custom naming conventions, and utilizes a heatmap to represent data visually.

Usage

JustDots(
  SerObj,
  mat,
  markerVec,
  pairedList2,
  labelColumn,
  rowsplit = NULL,
  columnsplit = NULL,
  size,
  coldend = TRUE,
  rowdend = TRUE,
  coldendside = "bottom",
  rowdendside = "left",
  fontsize = 12,
  titlefontsize = 14,
  gap = 0,
  assay = "RNA"
)

Arguments

SerObj

A Seurat object containing the data to be visualized.

mat

A matrix of data to be visualized, typically derived from a Seurat object.

markerVec

A vector of marker genes to be included in the plot.

pairedList2

A named list where each name corresponds to a marker gene in 'markerVec' and each value is the name to replace it with in the plot.

labelColumn

The name of the metadata column in 'SerObj' to use for labeling.

rowsplit

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

columnsplit

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

size

Size of the dots in the plot.

coldend

Logical indicating whether to include a column dendrogram.

rowdend

Logical indicating whether to include a row dendrogram.

coldendside

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

rowdendside

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

fontsize

Font size for text in the plot.

titlefontsize

Font size for the plot title.

gap

Gap between dots in the plot.

Value

A ComplexHeatmap object representing the custom dot plot. This object can be directly plotted in R or further customized using the ComplexHeatmap and circlize packages.

Examples

JustDots(mySeuratObject, mat = expressionMatrix, 
         markerVec = c("GeneA", "GeneB"), 
         pairedList2 = list(GeneA = "Gene A", GeneB = "Gene B"), 
         labelColumn = "ident")


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