Sets the identity class value for a subset (or all) cells
SetIdent(object, cells.use = NULL, ident.use = NULL)
Seurat object
Vector of cells to set identity class info for (default is all cells)
Vector of identity class values to assign (character vector)
A Seurat object where object@ident has been appropriately modified
# 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