ClusteredDotPlot: ClusteredDotPlot

View source: R/Analysis.R

ClusteredDotPlotR Documentation

ClusteredDotPlot

Description

A function that generates a clustered dot plot with a heatmap of scaled expression.

Usage

ClusteredDotPlot(
  seuratObj,
  features,
  groupFields = "ClusterNames_0.2",
  assay = "RNA",
  ggplotify = TRUE,
  scaling = "column",
  layer = "data",
  forceRescaling = FALSE
)

Arguments

seuratObj

The Seurat object that holds the data.

features

The features to plot.

groupFields

The metadata column that is used for grouping.

assay

The assay to plot.

ggplotify

A boolean that determines if the ComplexHeatmap object should be converted to a ggplot object.

scaling

The scaling method for the heatmap. Options are "row", "column", or none.

layer

The layer of the Seurat object that holds the relevant expression data.

forceRescaling

A boolean that determines if the Seurat object should be rescaled to include entries in the features vector if any are missing from the scale.data layer. This might be costly to perform locally.

Examples

## Not run: 
#set the seurat Idents for FindAllMarkers
Seurat::Idents(seuratObj) <- "ClusterNames_0.2"

markers <- Seurat::FindAllMarkers(seuratObj)

#filter markers to display the largest cluster identity markers according to average log fold change and differences in pct expression.
strong_markers <- markers[abs(markers$avg_log2FC) > 3 & abs(markers$pct.1 - markers$pct.2) > 0.25, "gene"]

dotPlot <- ClusteredDotPlot(seuratObj, features = strong_markers, groupFields = "ClusterNames_0.2", scaling = 'column', ggplotify = TRUE)
print(dotPlot)


## End(Not run)

bimberlabinternal/CellMembrane documentation built on Nov. 15, 2024, 9:34 p.m.