Skip to contents

Rename features for the Seurat object

Usage

RenameFeatures(srt, newnames = NULL, assays = NULL)

Arguments

srt

A Seurat object.

newnames

A vector with the same length of features in Seurat object, or characters named with old features.

assays

Assays to rename.

Examples

data("panc8_sub")
head(rownames(panc8_sub))
#> [1] "A1BG"   "A1CF"   "A2M"    "A4GALT" "AAAS"   "AACS"  
# Simply convert genes from human to mouse and preprocess the data
genenames <- make.unique(capitalize(rownames(panc8_sub), force_tolower = TRUE))
panc8_rename <- RenameFeatures(panc8_sub, newnames = genenames)
#> Rename features for the assay: RNA
head(rownames(panc8_rename))
#> [1] "A1bg"   "A1cf"   "A2m"    "A4galt" "Aaas"   "Aacs"