Skip to contents

Coerce object to Seurat

Usage

as.Seurat(x, ...)

# S4 method for SingleCellExperiment
as.Seurat(x)

Arguments

x

Object.

...

Additional arguments.

Value

Seurat.

Details

Note that Seurat::as.Seurat() method requires logcounts to be defined in assays(), so we're using CreateSeuratObject() here instead.

Note

Updated 2023-10-04.

Examples

data(SingleCellExperiment_Seurat, package = "AcidTest")

## SingleCellExperiment to Seurat ====
from <- SingleCellExperiment_Seurat
to <- as.Seurat(from)
class(to)
#> [1] "Seurat"
#> attr(,"package")
#> [1] "SeuratObject"
print(to)
#> An object of class Seurat 
#> 230 features across 80 samples within 1 assay 
#> Active assay: RNA (230 features, 0 variable features)
#>  2 layers present: counts, data