scDesign3_estimation: Estimate Parameters From Real Datasets by scDesign3

View source: R/13-scDesign3.R

scDesign3_estimationR Documentation

Estimate Parameters From Real Datasets by scDesign3

Description

This function is used to estimate useful parameters from a real dataset by using fit_marginal and fit_copula function in scDesign3 package.

Usage

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

Arguments

ref_data

A count matrix. Each row represents a gene and each column represents a cell.

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.

verbose

Logical.

seed

An integer of a random seed.

Details

When you use scDesign3 to estimate parameters from a real dataset, you can optionally input a numeric vector to specify the groups or plates that each cell comes from, like ⁠other_prior = list(group.condition = the numeric vector)⁠.

You can also optionally input a numeric vector to specify the batches that each cell comes from, like ⁠other_prior = list(batch.condition = the numeric vector)⁠.

See Examples and learn from it.

Value

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

References

Song, D., Wang, Q., Yan, G. et al. scDesign3 generates realistic in silico data for multimodal single-cell and spatial omics. Nat Biotechnol (2023). https://doi.org/10.1038/s41587-023-01772-1

Github URL: https://github.com/SONGDONGYUAN1994/scDesign3/tree/main

Examples

## Not run: 
ref_data <- simmethods::data
estimate_result <- simmethods::Splat_estimation(ref_data = data,
                                                verbose = TRUE,
                                                seed = 10)
estimate_result <- estimate_result[["estimate_result"]]
## Check the class
class(estimate_result) == "SplatParams"

## End(Not run)


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