Pools cells into pseudocells by random selection within biological groups. Includes a minimum threshold filter of 25 cells per subgroup to ensure pooling quality.

CellDEEP.Random(
  dataset,
  n_cells = 10,
  assay_name = "RNA",
  min_cells_per_subgroup = 25,
  readcounts = "mean"
)

Arguments

dataset

A Seurat object.

n_cells

Integer. The number of cells to pool into each pseudocell.

assay_name

Character. The assay to use for counts (default "RNA").

min_cells_per_subgroup

Integer. Minimum cells required in each sample-cluster subgroup to perform pooling (default 25).

readcounts

Character. Method to aggregate counts: "sum" or "mean".

Value

A new Seurat object containing the aggregated pseudocells.

Note

Subgroups (sample-cluster combinations) with fewer than 25 cells are automatically skipped. The function also generates a DimPlot to visualize the random pooling across samples.

Examples

# random_pooled_obj <- CellDEEP.Random(dataset = my_seurat, n_cells = 10, readcounts = "mean")