Seurat (version 2.3.4)

SetIdent: Set identity class information

Description

Sets the identity class value for a subset (or all) cells

Usage

SetIdent(object, cells.use = NULL, ident.use = NULL)

Arguments

object

Seurat object

cells.use

Vector of cells to set identity class info for (default is all cells)

ident.use

Vector of identity class values to assign (character vector)

Value

A Seurat object where object@ident has been appropriately modified

Examples

Run this code
# NOT RUN {
cluster2 <- WhichCells(object = pbmc_small, ident = 2)
pbmc_small@ident[cluster2]
pbmc_small <- SetIdent(
  object = pbmc_small,
  cells.use = cluster2,
  ident.use = 'cluster_2'
)
pbmc_small@ident[cluster2]

# }

Run the code above in your browser using DataLab