Skip to contents

Extract dimensional reduction embedding (e.g., UMAP, tSNE, PCA).

Usage

get_embedding(seurat, embedding_name = "umap", dims = 1:2)

Arguments

seurat

Seurat object

embedding_name

Name of the reduction (e.g., "umap", "tsne", "pca")

dims

Dimensions to extract (default: first 2)

Value

Matrix (cells x dimensions)

Examples

if (FALSE) { # \dontrun{
# Get UMAP coordinates
umap <- get_embedding(seurat, "umap")

# Get first 50 PCs
pcs <- get_embedding(seurat, "pca", dims = 1:50)
} # }