getClusterColors: Regenerate Cluster Colors from a Seurat Object

View source: R/Seurat.Utils.Visualization.R

getClusterColorsR Documentation

Regenerate Cluster Colors from a Seurat Object

Description

Regenerate and optionally displays the color scheme associated with the clusters in a Seurat object as defined by a specified identity column.

Usage

getClusterColors(
  obj = combined.obj,
  use_new_palettes = TRUE,
  palette = c("alphabet", "alphabet2", "glasbey", "polychrome", "stepped")[3],
  ident = GetClusteringRuns()[1],
  show = TRUE
)

Arguments

obj

Seurat object containing clustering information.

use_new_palettes

Logical indicating whether to use custom palettes defined in DiscretePalette function. Default: TRUE.

palette

Name of the color palette to use if use_new_palettes is TRUE. Options: "alphabet", "alphabet2", "glasbey", "polychrome", "stepped". Default: "glasbey".

ident

Clustering identity to use for coloring. Retrieved from the first entry of GetClusteringRuns() by default.

show

If TRUE, displays a plot showing the color mapping for each cluster. Default: TRUE.

Examples

## Not run: 
if (interactive()) {
  getClusterColors(obj = combined.obj, ident = GetClusteringRuns(combined.obj)[1])
}

## End(Not run)

vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.