Learn R Programming

Seurat (version 3.1.1)

Key: Get a key

Description

Get a key

Set a key

Usage

Key(object, ...)

Key(object, ...) <- value

# S3 method for Assay Key(object, ...)

# S3 method for DimReduc Key(object, ...)

# S3 method for Seurat Key(object, ...)

# S3 method for Assay Key(object, ...) <- value

# S3 method for DimReduc Key(object, ...) <- value

Arguments

object

An object

...

Arguments passed to other methods

value

Key value

Examples

Run this code
# NOT RUN {
# Get an Assay key
Key(object = pbmc_small[["RNA"]])

# Get a DimReduc key
Key(object = pbmc_small[["pca"]])

# Show all keys associated with a Seurat object
Key(object = pbmc_small)

# Set the key for an Assay
Key(object = pbmc_small[["RNA"]]) <- "newkey_"
Key(object = pbmc_small[["RNA"]])

# Set the key for DimReduc
Key(object = pbmc_small[["pca"]]) <- "newkey2_"
Key(object = pbmc_small[["pca"]])

# }

Run the code above in your browser using DataLab