run_single_sample | R Documentation |
scdrake
pipeline.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:
Loading configs: load_pipeline_config()
, and load_single_sample_configs()
or load_integration_configs()
.
Obtaining the pipeline plan: get_single_sample_plan()
or get_integration_plan()
.
Creating a basic directory structure (based on paths loaded from config files): create_single_sample_dirs()
or
create_integration_dirs()
.
Running the pipeline: scdrake_make()
.
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).
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"),
...
)
pipeline_config_dir |
A character scalar: path to directory with pipeline config file ( |
single_sample_config_dir |
A character scalar: path to directory with |
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
|
do_update_configs |
A logical scalar: if |
verbose |
A logical scalar: if |
.dry |
A logical scalar: if |
... |
Passed to |
integration_config_dir |
A character scalar: path to directory with |
drake_file |
A character scalar: path to entry script for drake. |
TRUE
if pipeline finishes successfully.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.