View source: R/01_Collection_of_poolingFunctions.R
| CellDEEP.Random | R Documentation |
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"
)
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". |
A new Seurat object containing the aggregated pseudocells.
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.
data("sim")
pool_input <- prepare_data(
sim,
sample_id = "DonorID",
group_id = "Status",
cluster_id = "cluster_id"
)
pooled_random <- CellDEEP.Random(
pool_input,
readcounts = "sum",
n_cells = 3,
min_cells_per_subgroup = 1,
assay_name = "RNA"
)
pooled_random
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.