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,
...
)
Object of class Seurat or liger.
Arguments passed to other methods
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.
optional, name to use for storing current object idents in object meta data slot.
optional, name to use for storing new object idents in object meta data slot.
logical, whether to overwrite columns in object meta data slot. if they have same
names as old_ident_name
and/or new_ident_name
.
An object of the same class as object
with updated default identities.
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")
}