runWF: Execute SYSargsList

Description Usage Arguments Value Author(s) See Also Examples

View source: R/sysargslist_utilities.R

Description

Function to execute all the code list specified in SYSargsList object.

Usage

1
2
runWF(sysargs, steps = NULL, force = FALSE, saveEnv = TRUE, warning.stop =
                 FALSE, error.stop = TRUE, silent = FALSE, ...)

Arguments

sysargs

object of class SYSargsList.

steps

character or numeric. Step name or index. If NULL, all the step will be executed.

force

Internally, the function checks if the expected output files exist, and it skips the command lines when the respective files exist. If the argument force is set to TRUE, the command line will be executed and the files overwrite. Default is force=FALSE.

saveEnv

If set to TRUE, the environment will be saved to an RDS file.

warning.stop

If set to TRUE, the process will be interrupted when a warning is detected.

error.stop

If set to TRUE, the process will be interrupted when a error is detected.

silent

If set to TRUE, all messages returned by the function will be suppressed.

...

Additional arguments to pass on from runCommandline().

Value

It will return an SYSargsList updated.

Author(s)

Daniela Cassol and Thomas Girke

See Also

See also as SYSargsList-class.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Construct SYSargsList object from Rmd file
sal <- SPRproject(overwrite=TRUE)
targetspath <- system.file("extdata/cwl/example/targets_example.txt", package="systemPipeR")

## Constructor and `appendStep<-`
appendStep(sal) <- SYSargsList(step_name = "echo", 
                               targets=targetspath, dir=TRUE,
                               wf_file="example/workflow_example.cwl", input_file="example/example.yml", 
                               dir_path = system.file("extdata/cwl", package="systemPipeR"),
                               inputvars = c(Message = "_STRING_", SampleName = "_SAMPLE_"))
appendStep(sal) <- LineWise(code = {
                            hello <- lapply(getColumn(sal, step=1, 'outfiles'), function(x) yaml::read_yaml(x))
                            }, 
                            step_name = "R_read", 
                            dependency = "echo")
## Not run: 
sal <- runWF(sal)

## End(Not run)

tgirke/systemPipeR documentation built on July 20, 2021, 10:45 p.m.