Get Cell Embeddings

Embeddings(object, ...)

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

# S3 method for Seurat
Embeddings(object, reduction = "pca", ...)

Arguments

object

An object

...

Arguments passed to other methods

reduction

Name of reduction to pull cell embeddings for

Value

The embeddings matrix

Examples

# Get the embeddings directly from a DimReduc object
Embeddings(object = pbmc_small[["pca"]])[1:5, 1:5]
#>                       PC_1       PC_2       PC_3      PC_4       PC_5
#> ATGCCAGAACGACT -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838
#> CATGGCCTGTGCAT -0.02602702 -0.3466795  0.6651668 0.4182900  0.5853204
#> GAACCTGATGAACC -0.45650250  0.1795811  1.3175907 2.0137210 -0.4818851
#> TGACTGGATTCTCA -0.81163243 -1.3795340 -1.0019320 0.1390503 -1.5982232
#> AGTCAGACTGCACA -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838

# Get the embeddings from a specific DimReduc in a Seurat object
Embeddings(object = pbmc_small, reduction = "pca")[1:5, 1:5]
#>                       PC_1       PC_2       PC_3      PC_4       PC_5
#> ATGCCAGAACGACT -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838
#> CATGGCCTGTGCAT -0.02602702 -0.3466795  0.6651668 0.4182900  0.5853204
#> GAACCTGATGAACC -0.45650250  0.1795811  1.3175907 2.0137210 -0.4818851
#> TGACTGGATTCTCA -0.81163243 -1.3795340 -1.0019320 0.1390503 -1.5982232
#> AGTCAGACTGCACA -0.77403708 -0.8996461 -0.2493078 0.5585948  0.4650838