SparseDC_estimation: Estimate Parameters From Real Datasets by SparseDC

View source: R/22-SparseDC.R

SparseDC_estimationR Documentation

Estimate Parameters From Real Datasets by SparseDC

Description

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

Usage

SparseDC_estimation(ref_data, verbose = FALSE, other_prior, 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 SparseDC, users must input cell group information to estimate parameters from real data. But SparseDC may fail to estimate parameters due to the unsuitable distribution fitting and users can set nclusters parameter to try again.

For more information, see Examples and splatter::sparseDCEstimate()

Value

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

References

Barron M, Zhang S, Li J. A sparse differential clustering algorithm for tracing cell type changes via single-cell RNA-sequencing data. Nucleic acids research, 2018, 46(3): e14-e14. https://doi.org/10.1093/nar/gkx1113

CRAN URL: https://cran.rstudio.com/web/packages/SparseDC/index.html

Examples

## Not run: 
ref_data <- SingleCellExperiment::counts(scater::mockSCE())
## cell groups
set.seed(111)
group_condition <- sample(1:2, ncol(ref_data), replace = TRUE)
## estimation
estimate_result <- simmethods::SparseDC_estimation(
  ref_data = ref_data,
  other_prior = list(group.condition = group_condition),
  verbose = TRUE,
  seed = 111
)
## Note that SparseDC defines 2 clusters present in the dataset by default. Users
## can input other number if the estimation step failed.
estimate_result <- simmethods::SparseDC_estimation(
  ref_data = ref_data,
  other_prior = list(group.condition = group_condition,
                     nclusters = 3),
  verbose = TRUE,
  seed = 111
)

## End(Not run)


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