write_SYSargsList: Writeout SYSargsList object

View source: R/sysargslist_utilities.R

write_SYSargsListR Documentation

Writeout SYSargsList object

Description

Function to writeout SYSargsList workflow control environment (S4 object) object.

Usage

write_SYSargsList(sysargs, sys.file=".SPRproject/SYSargsList.yml", silent=TRUE)

Arguments

sysargs

object of class SYSargsList.

sys.file

name and path of the SYSargsList file which will store all the project configuration information. Default is .SPRproject/SYSargsList.yml.

silent

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

Value

write_SYSargsList will return a sys.file path.

Author(s)

Daniela Cassol

See Also

See also as SYSargsList-class.

Examples

## 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")

sal <- write_SYSargsList(sal)
sal

tgirke/systemPipeR documentation built on Sept. 24, 2024, 9:48 a.m.