Wrapper function to rename active cluster identity in Seurat or Liger Object with new idents.

Rename_Clusters(object, ...)

# S3 method for liger
Rename_Clusters(
  object,
  new_idents,
  old_ident_name = NULL,
  new_ident_name = NULL,
  overwrite = FALSE,
  ...
)

# S3 method for Seurat
Rename_Clusters(
  object,
  new_idents,
  old_ident_name = NULL,
  new_ident_name = NULL,
  meta_col_name = deprecated(),
  overwrite = FALSE,
  ...
)

Arguments

object

Object of class Seurat or liger.

...

Arguments passed to other methods

new_idents

vector of new cluster names. Must be equal to the length of current default identity of Object. Will accept named vector (with old idents as names) or will name the new_idents vector internally.

old_ident_name

optional, name to use for storing current object idents in object meta data slot.

new_ident_name

optional, name to use for storing new object idents in object meta data slot.

overwrite

logical, whether to overwrite columns in object meta data slot. if they have same names as old_ident_name and/or new_ident_name.

meta_col_name

[Soft-deprecated]. See old_ident_name.

Value

An object of the same class as object with updated default identities.

Examples

if (FALSE) {
# Liger version
obj <- Rename_Clusters(object = obj_name, new_idents = new_idents_vec,
old_ident_name = "LIGER_Idents_Round01", new_ident_name = "LIGER_Idents_Round02")
}

if (FALSE) {
obj <- Rename_Clusters(seurat_object = obj_name, new_idents = new_idents_vec,
old_ident_name = "Seurat_Idents_Round01", new_ident_name = "Round01_Res0.6_Idents")
}