make_test_sce: Simulate a SingleCellExperiment for testing.

View source: R/make_test_sce.R

make_test_sceR Documentation

Simulate a SingleCellExperiment for testing.

Description

The counts are simulated from a poisson distribution with stats::rpois(). Use set.seed() if you want the results to be reproducible.

Usage

make_test_sce(n_cell = 100, n_gene = 100, n_cellType = 4, n_donor = 2)

Arguments

n_cell

An integer(1) specifying the number of cells.

n_gene

An integer(1) specifying the number of genes.

n_cellType

An integer(1) specifying the number of cell types.

n_donor

An integer(1) specifying the number of donors.

Value

A SingleCellExperiment object with randomly generated counts and colData().

Examples

## Create an example sce using default values.
set.seed(20240823)
test <- make_test_sce()

## Let's check the number of cells per cell type from each donor
addmargins(table(test$cellType, test$donor))

lahuuki/DeconvoBuddies documentation built on Nov. 2, 2024, 10:40 p.m.