cellCounts: Extract cell counts

View source: R/cellCounts.R

cellCountsR Documentation

Extract cell counts

Description

Extract matrix of cell counts from SingleCellExperiment

Usage

cellCounts(x)

Arguments

x

a SingleCellExperiment

Value

matrix of cell counts with samples as rows and cell types as columns

See Also

computeCellCounts()

Examples

library(muscat)
library(SingleCellExperiment)

data(example_sce)

# create pseudobulk for each sample and cell cluster
pb <- aggregateToPseudoBulk(example_sce,
  assay = "counts",
  cluster_id = "cluster_id",
  sample_id = "sample_id",
  verbose = FALSE
)

# get matrix of cell counts for each sample
cellCounts(pb)


GabrielHoffman/dreamlet documentation built on Nov. 23, 2024, 12:28 a.m.