This is a wrapper around drake::make() with some sensible defaults.
Before a plan is executed, this function sets locally some options, environment variables and other things.
That means no side effects are left. Note that this is a less reproducible way to run
the scdrake pipeline since it is executed in the current R session.
Also note that create_single_sample_dirs() or create_integration_dirs() must be run before.
The preferred way is calling the scdrake_r_make() function,
which is a wrapper around drake::r_make()
(details).
It will start a fresh new R session, source _drake.R (or a similar file) and execute the plan.
The current _drake.R-like files copied when a new scdrake project is initialized are:
_drake_single_sample.Rfor the single-sample pipeline_drake_integration.Rfor the integration pipeline
Internally, _drake_single_sample.R and _drake_integration.R do almost the same as code in scdrake_make(),
except there is no need for isolation of side effects. Also, by default, it relies on environment variables,
such as paths to config directories, e.g. SCDRAKE_SINGLE_SAMPLE_CONFIG_DIR whose value is used as the default for
option used in load_single_sample_configs(dir = getOption("scdrake_single_sample_config_dir")).
Arguments
- plan
A
drakeplan.- cfg_pipeline
One of:
A
scdrake_listobject: pipeline config (seeload_pipeline_config()) obtained frompipeline.yamlfile located in a pipeline config directoryNULL: the config will be loaded using the path defined in thescdrake_pipeline_config_diroption
- cfg_main
A
scdrake_listobject: main config (see load_config) obtained from00_main.yamlfile located in single-sample or integration config directory.- verbose
A logical scalar: if
TRUE, be verbose. The default value is obtained fromgetOption("scdrake_verbose").- prework, log_worker, ...
Passed to
drake::make().preworkmust be a character scalar.- options
A list: additional
base::options()to be set (locally).- drake_file
A character scalar: path to
_drake.R(default forNULL) or similar file (details).