DefaultAssay: Get and set the default assay

Description Usage Arguments Value Examples

View source: R/generics.R

Description

Get and set the default assay

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
DefaultAssay(object, ...)

DefaultAssay(object, ...) <- value

## S3 method for class 'Assay'
DefaultAssay(object, ...)

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

## S3 method for class 'Graph'
DefaultAssay(object, ...)

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

## S3 method for class 'SeuratCommand'
DefaultAssay(object, ...)

## S3 method for class 'SpatialImage'
DefaultAssay(object, ...)

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

## S3 replacement method for class 'SpatialImage'
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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)

Seurat documentation built on Jan. 13, 2021, 7:11 p.m.