Extracts and combines a data frame with cells as rows and features as columns from Seurat assay data. Supports multiple assays and optional metadata integration.
Arguments
- sce
Seurat object.
- vars
Character vector of feature names to extract. If `NULL`, all features are extracted.
- assay
Character vector specifying assay(s) to pull data from.
- slot
Character string specifying the assay data slot. Default is `"scale.data"`.
- combine_meta_data
Logical indicating whether to combine metadata with the extracted data frame. Default is `TRUE`.
Examples
if (requireNamespace("Seurat", quietly = TRUE)) {
pbmc <- SeuratObject::pbmc_small
vars <- c("PPBP", "IGLL5", "VDAC3", "CD1C", "AKR1C3")
eset <- extract_sc_data(sce = pbmc, vars = vars, assay = "RNA")
}
#> ℹ Available assays: "RNA"
#> ℹ Merging metadata...