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.R
for the single-sample pipeline_drake_integration.R
for 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
drake
plan.- cfg_pipeline
One of:
A
scdrake_list
object: pipeline config (seeload_pipeline_config()
) obtained frompipeline.yaml
file located in a pipeline config directoryNULL
: the config will be loaded using the path defined in thescdrake_pipeline_config_dir
option
- cfg_main
A
scdrake_list
object: main config (see load_config) obtained from00_main.yaml
file 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()
.prework
must 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).