View source: R/scDD-estimate.R
scDDEstimate | R Documentation |
Estimate simulation parameters for the scDD simulation from a real dataset.
scDDEstimate(
counts,
params = newSCDDParams(),
verbose = TRUE,
BPPARAM = SerialParam(),
...
)
## S3 method for class 'matrix'
scDDEstimate(
counts,
params = newSCDDParams(),
verbose = TRUE,
BPPARAM = SerialParam(),
conditions,
...
)
## S3 method for class 'SingleCellExperiment'
scDDEstimate(
counts,
params = newSCDDParams(),
verbose = TRUE,
BPPARAM = SerialParam(),
condition = "condition",
...
)
## Default S3 method:
scDDEstimate(
counts,
params = newSCDDParams(),
verbose = TRUE,
BPPARAM = SerialParam(),
condition,
...
)
counts |
either a counts matrix or a SingleCellExperiment object containing count data to estimate parameters from. |
params |
SCDDParams object to store estimated values in. |
verbose |
logical. Whether to show progress messages. |
BPPARAM |
A |
... |
further arguments passed to or from other methods. |
conditions |
Vector giving the condition that each cell belongs to. Conditions can be 1 or 2. |
condition |
String giving the column that represents biological group of interest. |
This function applies preprocess
to the counts then uses
scDD
to estimate the numbers of each gene type to
simulate. The output is then converted to a SCDDParams object. See
preprocess
and scDD
for details.
SCDDParams object containing the estimated parameters.
if (requireNamespace("scDD", quietly = TRUE)) {
library(scuttle)
set.seed(1)
sce <- mockSCE(ncells = 20, ngenes = 100)
colData(sce)$condition <- sample(1:2, ncol(sce), replace = TRUE)
params <- scDDEstimate(sce, condition = "condition")
params
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.