Used for simulating pseudo-bulk RNA-Seq from a 'cellMarkers' object. Cell counts are randomly sampled from the uniform distribution, using the original subclass contingency table as a limit on the maximum number of cells in each subclass.
generate_samples(
object,
n,
equal_sample = TRUE,
method = c("unif", "dirichlet"),
alpha = 1.5
)An integer matrix with n rows, with columns for each cell
subclasses in object, representing cell counts for each cell subclass.
Designed to be passed to simulate_bulk().
A 'cellMarkers' class object
Integer value for the number of samples to generate
Logical whether to sample subclasses equally or generate samples with proportions of cells in keeping with the original subtotal of cells in the main scRNA-Seq data.
Either "unif" or "dirichlet" to specify whether cell numbers are drawn from uniform distribution or dirichlet distribution.
Shape parameter for gtools::rdirichlet(). Automatically
expanded to be a vector whose length is the number of subclasses.
Leaving equal_sample = TRUE is better for tuning deconvolution parameters.
simulate_bulk()