Description Usage Arguments Details Value
View source: R/kersplat-simulate.R
Simulate endogenous counts for each cell in a Kersplat simulation
1 | kersplatSimCellMeans(sim, params, verbose)
|
sim |
SingleCellExperiment containing simulation. |
params |
KersplatParams object with simulation parameters. |
verbose |
logical. Whether to print progress messages |
Cells are first assigned to a path and a step along that path. This is
controlled by the cells.design parameter which is a data.frame
with the columns "Path", "Probability", "Alpha" and "Beta". The Path field
is an ID for each path and the Probability field is the probability that a
cell will come from that path (must sum to 1). The Alpha and Beta parameters
control the density of cells along the path. After they are assigned to paths
the step for each cell is sampled from a Beta distribution with parameters
shape1 equals Alpha and shape2 equals beta. This approach is very flexible
and allows almost any distribution of cells along a path. The distribution
can be viewed using hist(rbeta(10000, Alpha, Beta), breaks = 100).
Some useful combinations of parameters are:
Alpha = 1, Beta = 1Uniform distribution along the path
Alpha = 0, Beta = 1All cells at the start of the path.
Alpha = 1, Beta = 0All cells at the end of the path.
Alpha = 0, Beta = 0Cells only at each end of the path.
Alpha = 1, Beta = 2Linear skew towards the start of the path
Alpha = 0.5, Beta = 1Curved skew towards the start of the path
Alpha = 2, Beta = 1Linear skew towards the end of the path
Alpha = 1, Beta = 0.5Curved skew towards the end of the path
Alpha = 0.5, Beta = 0.5Curved skew towards both ends of the path
Alpha = 0.5, Beta = 0.5Curved skew away from both ends of the path
Once cells are assigned to paths and steps the correct means are extracted
from the paths.means parameter and adjusted based on each cell's
library size. An adjustment for BCV is then applied. Doublets are also
simulated at this stage by selecting two path/step combinations and averaging
the means.
SingleCellExperiment with cell means
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.