Maps custom cluster names to Seurat Object cluster IDs and adds cluster names to a new metadata column called Clusternames. Provides a dotplot of percentage of cell types within each cluster.

nameClusters(
  object,
  cluster.numbers,
  cluster.names,
  cluster.column,
  labels.column,
  order.clusters.by = NULL,
  order.celltypes.by = NULL,
  interactive = FALSE
)

Arguments

object

Seurat-class object with cluster IDs column and cell type column present

cluster.numbers

Vector containing cluster numbers that match the (numeric) cluster ID's in the cluster.column in Seurat Object metadata

cluster.names

Vector containing custom cluster labels

cluster.column

Column name containing cluster ID in the metadata slot in the object

labels.column

Column name containing labels (usually cell type) in the metadata slot in the object

order.clusters.by

Vector containing order of clusters in graph. Can contain a subset of cluster numbers to plot that match at least some of the values in the cluster.column. If NULL, use default order (default is NULL)

order.celltypes.by

Vector containing order of cell types in graph. Can contain a subset of cell types to plot that match at least some of the values in the labels.column. If NULL, use default order (default is NULL)

interactive

If TRUE, draw plotly plot (default is FALSE)

Value

Returns Seurat-class object with updated meta.data slot containing custom cluster annotation and a plot