RenameCells: Rename cells

Description Usage Arguments Details Value Examples

Description

Change the cell names in all the different parts of an object. Can be useful before combining multiple objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
RenameCells(object, ...)

## S3 method for class 'Assay'
RenameCells(object, new.names = NULL, ...)

## S3 method for class 'DimReduc'
RenameCells(object, new.names = NULL, ...)

## S3 method for class 'Seurat'
RenameCells(object, add.cell.id = NULL,
  new.names = NULL, for.merge = FALSE, ...)

Arguments

object

An object

...

Arguments passed to other methods

new.names

vector of new cell names

add.cell.id

prefix to add cell names

for.merge

Only rename slots needed for merging Seurat objects. Currently only renames the raw.data and meta.data slots.

Details

If add.cell.id is set a prefix is added to existing cell names. If new.names is set these will be used to replace existing names.

Value

An object with new cell names

Examples

1
2
3
head(x = colnames(x = pbmc_small))
pbmc_small <- RenameCells(pbmc_small, add.cell.id = "Test")
head(x = colnames(x = pbmc_small))

atakanekiz/Seurat3.0 documentation built on May 26, 2019, 2:33 a.m.