-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathkersplatSample.Rd
100 lines (94 loc) · 3.59 KB
/
kersplatSample.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kersplat-simulate.R
\name{kersplatSample}
\alias{kersplatSample}
\title{Kersplat sample}
\usage{
kersplatSample(params, sparsify = TRUE, verbose = TRUE)
}
\arguments{
\item{params}{KersplatParams object containing simulation parameters.}
\item{sparsify}{logical. Whether to automatically convert assays to sparse
matrices if there will be a size reduction.}
\item{verbose}{logical. Whether to print progress messages}
}
\value{
SingleCellExperiment object containing the simulated counts and
intermediate values.
}
\description{
Sample cells for the Kersplat simulation
}
\details{
The second stage is a two-step Kersplat simulation is to generate cells based
on a complete \code{\link{KersplatParams}} object.
intermediate parameters.
The sampling process involves the following steps:
\enumerate{
\item Simulate library sizes for each cell
\item Simulate means for each cell
\item Simulate endogenous counts for each cell
\item Simulate ambient counts for each cell
\item Simulate final counts for each cell
}
The final output is a
\code{\link[SingleCellExperiment]{SingleCellExperiment}} object that
contains the simulated counts but also the values for various intermediate
steps. These are stored in the \code{\link{colData}} (for cell specific
information), \code{\link{rowData}} (for gene specific information) or
\code{\link{assays}} (for gene by cell matrices) slots. This additional
information includes:
\describe{
\item{\code{colData}}{
\describe{
\item{Cell}{Unique cell identifier.}
\item{Type}{Whether the cell is a Cell, Doublet or Empty.}
\item{CellLibSize}{The expected number of endogenous counts for
that cell.}
\item{AmbientLibSize}{The expected number of ambient counts for
that cell.}
\item{Path}{The path the cell belongs to.}
\item{Step}{How far along the path each cell is.}
\item{Path1}{For doublets the path of the first partner in the
doublet (otherwise \code{NA}).}
\item{Step1}{For doublets the step of the first partner in the
doublet (otherwise \code{NA}).}
\item{Path2}{For doublets the path of the second partner in the
doublet (otherwise \code{NA}).}
\item{Step2}{For doublets the step of the second partner in the
doublet (otherwise \code{NA}).}
}
}
\item{\code{rowData}}{
\describe{
\item{Gene}{Unique gene identifier.}
\item{BaseMean}{The base expression level for that gene.}
\item{AmbientMean}{The ambient expression level for that gene.}
}
}
\item{\code{assays}}{
\describe{
\item{CellMeans}{The mean expression of genes in each cell
after any differential expression and adjusted for expected
library size.}
\item{CellCounts}{Endogenous count matrix.}
\item{AmbientCounts}{Ambient count matrix.}
\item{counts}{Final count matrix.}
}
}
}
Values that have been added by Splatter are named using \code{UpperCamelCase}
in order to differentiate them from the values added by analysis packages
which typically use \code{underscore_naming}.
}
\examples{
if (requireNamespace("igraph", quietly = TRUE)) {
params <- kersplatSetup()
sim <- kersplatSample(params)
}
}
\seealso{
\code{\link{kersplatSimLibSizes}}, \code{\link{kersplatSimCellMeans}},
\code{\link{kersplatSimCellCounts}}, \code{\link{kersplatSimAmbientCounts}},
\code{\link{kersplatSimCounts}}
}