View source: R/simulate_bulk.R
| generate_samples | R Documentation |
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,
zero_fraction = 0
)
object |
A 'cellMarkers' class object |
n |
Integer value for the number of samples to generate |
equal_sample |
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. |
method |
Either "unif" or "dirichlet" to specify whether cell numbers are drawn from uniform distribution or dirichlet distribution. |
alpha |
Shape parameter for |
zero_fraction |
Numeric from 0 to 1 specifying proportion of cell subclasses to randomly set to zero in each sample. |
Leaving equal_sample = TRUE is better for tuning deconvolution parameters.
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().
simulate_bulk()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.