Learn R Programming

tidyseurat (version 0.8.0)

aggregate_cells: Aggregate cells

Description

Combine cells into groups based on shared variables and aggregate feature counts.

Usage

# S4 method for Seurat
aggregate_cells(
  .data,
  .sample = NULL,
  slot = "data",
  assays = NULL,
  aggregation_function = Matrix::rowSums,
  ...
)

Value

A tibble object

Arguments

.data

A tidyseurat object

.sample

A vector of variables by which cells are aggregated

slot

The slot to which the function is applied

assays

The assay to which the function is applied

aggregation_function

The method of cell-feature value aggregation

...

Used for future extendibility

Examples

Run this code
data(pbmc_small)
pbmc_small_pseudo_bulk <- pbmc_small |>
  aggregate_cells(c(groups, letter.idents), assays="RNA")

Run the code above in your browser using DataLab