Skip to contents

There are two ways how to run scdrake pipeline:

The first, reproducible way is via run_single_sample_r() or run_integration_r(). In the end, drake::r_make() is called and sources "_drake_single_sample.R" or "_drake_integration.R" scripts in a fresh new R session. Those scripts are entry points for drake. See scdrake_r_make() for more details.

(Soft-deprecated since scdrake 1.4.0) The second way is to run pipeline in the current R session via run_single_sample() or run_integration(), which is a shortcut for:

This way is considered as nonreproducible, because the pipeline is run in the current session and there might be interfering variables or loaded packages. Internally, the run_single_sample() and run_integration() functions are basically replicating the code that is in "_drake_single_sample.R" and "_drake_integration.R" scripts, respectively, while protecting from side effects (e.g. setting options() etc.) on your current session (i.e. all environment modifications are limited to function's scope).

Usage

run_single_sample(
  pipeline_config_dir = getOption("scdrake_pipeline_config_dir"),
  single_sample_config_dir = getOption("scdrake_single_sample_config_dir"),
  project_root = getOption("scdrake_project_root"),
  do_update_configs = TRUE,
  verbose = getOption("scdrake_verbose"),
  .dry = FALSE,
  ...
)

run_integration(
  pipeline_config_dir = getOption("scdrake_pipeline_config_dir"),
  integration_config_dir = getOption("scdrake_integration_config_dir"),
  project_root = getOption("scdrake_project_root"),
  do_update_configs = TRUE,
  verbose = getOption("scdrake_verbose"),
  .dry = FALSE,
  ...
)

run_single_sample_r(
  drake_file = "_drake_single_sample.R",
  project_root = getOption("scdrake_project_root"),
  ...
)

run_integration_r(
  drake_file = "_drake_integration.R",
  project_root = getOption("scdrake_project_root"),
  ...
)

Arguments

pipeline_config_dir

A character scalar: path to directory with pipeline config file (pipeline.yaml).

single_sample_config_dir

A character scalar: path to directory with 00_main.yaml, 01_input_qc.yaml, 02_norm_clustering.yaml, cluster_markers.yaml, and contrasts.yaml files.

project_root

A character scalar: path to directory in which the pipeline will be run, i.e. a new working directory. The working directory will be used only temporarily. Default value of the scdrake_project_root options is the current working directory.

do_update_configs

A logical scalar: if TRUE, run update_single_sample_configs() or update_integration_configs() before loading configs.

verbose

A logical scalar: if TRUE, be verbose. The default value is obtained from getOption("scdrake_verbose").

.dry

A logical scalar: if TRUE, omit the last step in the description and just return TRUE.

...

Passed to scdrake_make() or scdrake_r_make().

integration_config_dir

A character scalar: path to directory with 00_main.yaml, 01_integration.yaml, 02_int_clustering.yaml, cluster_markers.yaml, and contrasts.yaml files.

drake_file

A character scalar: path to entry script for drake.

Value

TRUE if pipeline finishes successfully.