SPARSim_estimation | R Documentation |
This function is used to estimate useful parameters from a real dataset by
using SPARSim_estimate_parameter_from_data
function in SPARSim package.
SPARSim_estimation(ref_data, verbose = FALSE, other_prior = NULL, seed)
ref_data |
A count matrix. Each row represents a gene and each column represents a cell. |
verbose |
Logical. |
other_prior |
A list with names of certain parameters. Some methods need
extra parameters to execute the estimation step, so you must input them. In
simulation step, the number of cells, genes, groups, batches, the percent of
DEGs are usually customed, so before simulating a dataset you must point it out.
See |
seed |
An integer of a random seed. |
In SPARSim, the information of cell group condition can be input if neccessary
by other_prior = list(group.condition = xxx)
. Note that the cell group condition
must be an integer vactor (e.g. 1, 2, 3, ...) to specify which condition that
each cell belongs to. See Examples
below for more.
A list contains the estimated parameters and the results of execution detection.
Baruzzo G, Patuzzi I, Di Camillo B. SPARSim single cell: a count data simulator for scRNA-seq data. Bioinformatics, 2020, 36(5): 1468-1475. https://doi.org/10.1093/bioinformatics/btz752
Gitlab URL: https://gitlab.com/sysbiobig/sparsim
## Not run:
ref_data <- simmethods::data
# 1) Estimation without cell group information
estimate_result <- simmethods::SPARSim_estimation(
ref_data = ref_data,
other_prior = NULL,
verbose = TRUE,
seed = 111
)
# 2) Estimation with cell group information (Note that an integer vector to specify
# which condition that each cell belongs to)
group_condition <- as.numeric(simmethods::group_condition)
estimate_result <- simmethods::SPARSim_estimation(
ref_data = ref_data,
other_prior = list(group.condition = group_condition),
verbose = TRUE,
seed = 111
)
# 3) Users can also utilize spike-in genes to estimate parameters. In this case, users
## must input dilution.factor and volume (nanoliter) parameters. Note that the
## reference matrix must contain spike-in gene counts.
ref_data <- simmethods::data
group_condition <- as.numeric(simmethods::group_condition)
estimate_result <- simmethods::SPARSim_estimation(
ref_data = ref_data,
other_prior = list(group.condition = group_condition,
dilution.factor = 50000,
volume = 0.01),
verbose = TRUE,
seed = 111
)
## check spike-in parameters
spikein_params <- estimate_result[["estimate_result"]][["SPARSim_spikein_parameter"]]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.