scDesign2_estimation: Estimate Parameters From Real Datasets by scDesign2

View source: R/12-scDesign2.R

scDesign2_estimationR Documentation

Estimate Parameters From Real Datasets by scDesign2

Description

This function is used to estimate useful parameters from a real dataset by using fit_model_scDesign2 function in scDesign2 package.

Usage

scDesign2_estimation(ref_data, verbose = FALSE, other_prior = NULL, seed)

Arguments

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 Details below for more information.

seed

An integer of a random seed.

Details

In scDesign2, users can input cell group or cell type information before estimating parameters from real datasets. For more instructions or information, see Examples or scDesign2::fit_model_scDesign2()

Value

A list contains the estimated parameters and the results of execution detection.

References

Sun T, Song D, Li W V, et al. scDesign2: a transparent simulator that generates high-fidelity single-cell gene expression count data with gene correlations captured. Genome biology, 2021, 22(1): 1-37. https://doi.org/10.1186/s13059-021-02367-2

Github URL: https://github.com/JSB-UCLA/scDesign2

Examples

## Not run: 
ref_data <- simmethods::data

## cell groups
group_condition <- as.numeric(simmethods::group_condition)
## In scDesign2, cell group information is not neccessary which indicates the type
## that each cell belongs to.
estimate_result <- simmethods::scDesign2_estimation(
  ref_data = ref_data,
  other_prior = list(group.condition = group_condition),
  verbose = TRUE,
  seed = 111
)
## Or you can input information of cell types via cell_type_sel parameter described
## in scDesign2::fit_model_scDesign2 function
estimate_result <- simmethods::scDesign2_estimation(
  ref_data = ref_data,
  other_prior = list(cell_type_sel = paste0("cell_type",
                                            group_condition)),
  verbose = TRUE,
  seed = 111
)

## End(Not run)


duohongrui/simmethods documentation built on June 17, 2024, 10:49 a.m.