generate_dataset: Generate a dataset

View source: R/generate_dataset.R

generate_datasetR Documentation

Generate a dataset

Description

This function contains the complete pipeline for generating a dataset with dyngen. In order to have more control over how the dataset is generated, run each of the steps in this function separately.

Usage

generate_dataset(
  model,
  format = c("list", "dyno", "sce", "seurat", "anndata", "none"),
  output_dir = NULL,
  make_plots = FALSE,
  store_dimred = model$simulation_params$compute_dimred,
  store_cellwise_grn = model$simulation_params$compute_cellwise_grn,
  store_rna_velocity = model$simulation_params$compute_rna_velocity
)

Arguments

model

A dyngen initial model created with initialise_model().

format

Which output format to use, must be one of 'dyno' (requires dynwrap), 'sce' (requires SingleCellExperiment), 'seurat' (requires Seurat), 'anndata' (requires anndata), 'list' or 'none'.

output_dir

If not NULL, then the generated model and dynwrap dataset will be written to files in this directory.

make_plots

Whether or not to generate an overview of the dataset.

store_dimred

Whether or not to store the dimensionality reduction constructed on the true counts.

store_cellwise_grn

Whether or not to also store cellwise GRN information.

store_rna_velocity

WHether or not to store the log propensity ratios.

Value

A list containing a dyngen model (li$model) and a dynwrap dataset (li$dataset).

Examples

model <- 
  initialise_model(
    backbone = backbone_bifurcating()
  )


# generate dataset and output as a list format
# please note other output formats exist: "dyno", "sce", "seurat", "anndata"
out <- generate_dataset(model, format = "list")

model <- out$model
dataset <- out$dataset


dyngen documentation built on Oct. 12, 2022, 5:06 p.m.