Learn R Programming

Seurat (version 3.0.1)

DefaultAssay: Get and set the default assay

Description

Get and set the default assay

Usage

DefaultAssay(object, ...)

DefaultAssay(object, ...) <- value

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

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

# S3 method for Seurat DefaultAssay(object, ...) <- value

Arguments

object

An object

...

Arguments passed to other methods

value

Name of assay to set as default

Value

The name of the default assay

An object with the new default assay

Examples

Run this code
# NOT RUN {
# Get current default assay
DefaultAssay(object = pbmc_small)

# Create dummy new assay to demo switching default assays
new.assay <- pbmc_small[["RNA"]]
Key(object = new.assay) <- "RNA2_"
pbmc_small[["RNA2"]] <- new.assay
# switch default assay to RNA2
DefaultAssay(object = pbmc_small) <- "RNA2"
DefaultAssay(object = pbmc_small)

# }

Run the code above in your browser using DataLab