Learn R Programming

dyngen (version 0.4.0)

initialise_model: Initial settings for simulating a dyngen dataset

Description

Initial settings for simulating a dyngen dataset

Usage

initialise_model(
  backbone,
  num_cells = 1000,
  num_tfs = nrow(backbone$module_info),
  num_targets = 100,
  num_hks = 50,
  distance_metric = c("pearson", "spearman", "cosine", "euclidean", "manhattan"),
  tf_network_params = tf_network_default(),
  feature_network_params = feature_network_default(),
  kinetics_params = kinetics_default(),
  gold_standard_params = gold_standard_default(),
  simulation_params = simulation_default(),
  experiment_params = experiment_snapshot(),
  verbose = TRUE,
  download_cache_dir = NULL,
  num_cores = 1,
  id = NULL
)

Arguments

backbone

The gene module configuration that determines the type of dynamic process being simulated. See list_backbones() for a full list of different backbones available in this package.

num_cells

The number of cells to sample.

num_tfs

The number of transcription factors (TFs) to generate. TFs are the main drivers of the changes that occur in a cell. TFs are regulated only by other TFs.

num_targets

The number of target genes to generate. Target genes are regulated by TFs and sometimes by other target genes.

num_hks

The number of housekeeping genes (HKs) to generate. HKs are typically highly expressed, and are not regulated by the TFs or targets.

distance_metric

The distance metric to be used to calculate the distance between cells. See dynutils::calculate_distance() for a list of possible distance metrics.

tf_network_params

Settings for generating the TF network with generate_tf_network(), see tf_network_default().

feature_network_params

Settings for generating the feature network with generate_feature_network(), see feature_network_default().

kinetics_params

Settings for determining the kinetics of the feature network with generate_kinetics(), see kinetics_default().

gold_standard_params

Settings pertaining simulating the gold standard with generate_gold_standard(), see gold_standard_default().

simulation_params

Settings pertaining the simulation itself with generate_cells(), see simulation_default().

experiment_params

Settings related to how the experiment is simulated with generate_experiment(), see experiment_snapshot() or experiment_synchronised().

verbose

Whether or not to print messages during the simulation.

download_cache_dir

If not NULL, temporary downloaded files will be cached in this directory.

num_cores

Parallellisation parameter for various steps in the pipeline.

id

An identifier for the model.

Value

A dyngen model.

Examples

Run this code
# NOT RUN {
model <- initialise_model(
  backbone = backbone_bifurcating()
)
plot_backbone_modulenet(model)
plot_backbone_statenet(model)

# }
# NOT RUN {
model <- 
  model %>%
  generate_tf_network() %>%
  generate_feature_network() %>%
  generate_kinetics() %>%
  generate_gold_standard() %>%
  generate_cells() %>%
  generate_experiment() 
  
dataset <- wrap_dataset(model)
# }

Run the code above in your browser using DataLab