Sample cells for the Kersplat simulation
kersplatSample(params, verbose = TRUE)
params | KersplatParams object containing simulation parameters. |
---|---|
verbose | logical. Whether to print progress messages |
SingleCellExperiment object containing the simulated counts and intermediate values.
The second stage is a two-step Kersplat simulation is to generate cells based
on a complete KersplatParams
object.
intermediate parameters.
The sampling process involves the following steps:
Simulate library sizes for each cell
Simulate means for each cell
Simulate endogenous counts for each cell
Simulate ambient counts for each cell
Simulate final counts for each cell
The final output is a
SingleCellExperiment
object that
contains the simulated counts but also the values for various intermediate
steps. These are stored in the colData
(for cell specific
information), rowData
(for gene specific information) or
assays
(for gene by cell matrices) slots. This additional
information includes:
colData
Unique cell identifier.
Whether the cell is a Cell, Doublet or Empty.
The expected number of endogenous counts for that cell.
The expected number of ambient counts for that cell.
The path the cell belongs to.
How far along the path each cell is.
For doublets the path of the first partner in the
doublet (otherwise NA
).
For doublets the step of the first partner in the
doublet (otherwise NA
).
For doublets the path of the second partner in the
doublet (otherwise NA
).
For doublets the step of the second partner in the
doublet (otherwise NA
).
rowData
Unique gene identifier.
The base expression level for that gene.
The ambient expression level for that gene.
assays
The mean expression of genes in each cell after any differential expression and adjusted for expected library size.
Endogenous count matrix.
Ambient count matrix.
Final count matrix.
Values that have been added by Splatter are named using UpperCamelCase
in order to differentiate them from the values added by analysis packages
which typically use underscore_naming
.
kersplatSimLibSizes
, kersplatSimCellMeans
,
kersplatSimCellCounts
, kersplatSimAmbientCounts
,
kersplatSimCounts
if (requireNamespace("igraph", quietly = TRUE)) { params <- kersplatSetup() sim <- kersplatSample(params) }#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>