BEARscc_simulation: Simulate Datasets by BEARscc

View source: R/18-BEARscc.R

BEARscc_simulationR Documentation

Simulate Datasets by BEARscc

Description

This function is used to simulate datasets from learned parameters by simulate_replicates function in BEARscc package.

Usage

BEARscc_simulation(
  parameters,
  other_prior = NULL,
  return_format,
  verbose = FALSE,
  seed
)

Arguments

parameters

A object generated by BEARscc::simulate_replicates()

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.

return_format

A character. Alternative choices: list, SingleCellExperiment, Seurat, h5ad. If you select h5ad, you will get a path where the .h5ad file saves to.

verbose

Logical. Whether to return messages or not.

seed

A random seed.

Details

In BEARscc, users can not even set the number of cell and genes. But some other unusually used parameters can be found in BEARscc::simulate_replicates()

References

Severson D T, Owen R P, White M J, et al. BEARscc determines robustness of single-cell clusters using simulated technical replicates. Nature communications, 2018, 9(1): 1-7. https://doi.org/10.1038/s41467-018-03608-y

Bioconductor URL: https://www.bioconductor.org/packages/release/bioc/html/BEARscc.html

Github URL: https://github.com/seversond12/BEARscc

Examples

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

other_prior = list(dilution.factor = 50000,
                   volume = 0.1,
                   species = "mouse")

estimate_result <- simmethods::BEARscc_estimation(
  ref_data = ref_data,
  other_prior = other_prior,
  verbose = TRUE,
  seed = 111
)

simulate_result <- simmethods::BEARscc_simulation(
  parameters = estimate_result[["estimate_result"]],
  other_prior = NULL,
  return_format = "list",
  verbose = TRUE,
  seed = 111
)

## End(Not run)


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