SYSargsList {systemPipeR} | R Documentation |
"SYSargsList"
S4 class container for storing parameters and information of command-line- or R-based workflow.
SYSargsList
instances are constructed by the SYSargsList
function.
## Constructor SYSargsList(sysargs = NULL, step_name = "default", targets = NULL, wf_file = NULL, input_file = NULL, dir_path = ".", id = "SampleName", inputvars = NULL, rm_targets_col = NULL, dir = TRUE, dependency = NA, run_step = "mandatory", run_session = "local", run_remote_resources = NULL, silent = FALSE, projPath = getOption("projPath", getwd())) ## Accessors stepsWF(x) statusWF(x) targetsWF(x) outfiles(x) SE(x) dependency(x) projectInfo(x) runInfo(x) ## Methods baseCommand(x, ...) SampleName(x, ...) stepName(x) targetsheader(x, ...) yamlinput(x, ...) cmdlist(x, ...) codeLine(x, ...) copyEnvir(x, list = character(), new.env = globalenv(), silent = FALSE) viewEnvir(x, silent = FALSE) ## Subset Methods subset(x, ...) getColumn(x, step, position = c("outfiles", "targetsWF"), column = 1, names = SampleName(x, step)) ## Replacement dependency(x, step, ...) <- value appendStep(x, after = length(x), ...) <- value replaceStep(x, step, step_name = "default") <- value renameStep(x, step, ...) <- value yamlinput(x, paramName, ...) <- value appendCodeLine(x, after = length(x), ...) <- value replaceCodeLine(x, line, ...) <- value updateColumn(x, step, position = c("outfiles", "targetsWF")) <- value
sysargs |
|
step_name |
character with the step index name. |
targets |
the path to |
wf_file |
name and path to |
input_file |
name and path to |
dir_path |
full path to the directory with the |
id |
A column from |
inputvars |
variables list defined in the |
rm_targets_col |
targets file colunms to be removed. |
dir |
This option allows creating an exclusive results folder for each step in the
workflow. All the outfiles and log files for the particular step will be
created in the respective folders. Default is |
dependency |
character. Dependency tree, required when appending this step to
the workflow. Character name of a previous step in the workflow.
Default is |
run_step |
character. If the step has "mandatory" or "optional" flag for the execution. |
run_session |
character. If the step has "local" or "remote" flag for the execution. |
run_remote_resources |
|
silent |
If set to |
projPath |
a character vector of a full project path name. Default is the current path. |
x |
An instance of class |
step |
character or numeric. Step name or index. |
list |
a character vector naming objects to be copyied from the enviroment. |
new.env |
An environment to copy to. Default is |
position |
character. Options are |
column |
character or numeric. Which column will be replaces from the position argument. |
names |
character vector. Names of the new column. |
after |
A subscript, after which the values are to be appended. |
paramName |
character. Input name from |
line |
An instance of class |
value |
object containing the values to be replaced to x. Values may be of the same
class as the orginal values. For |
... |
object containing the values to be replaced to x. Values may be of the same class as the orginal values. |
Objects can be created by calls of the form new("SYSargsList", ...)
.
stepsWF
:Object of class "list"
storing all the
SYSargs2
objects of the workflow
statusWF
:Object of class "list"
storing all the
success and failure of each step in the workflow
targetsWF
:Object of class "list"
storing all the
targets files for each step in the workflow
outfiles
:Object of class "list"
storing all the
output files in the workflow
SE
:Object of class "list"
storing all the
SummarizedExperiment
objects in the workflow
dependency
:Object of class "list"
storing all the
dependency steps in the workflow
targets_connection
:Object of class "list"
storing all
targets files connection in the workflow
projectInfo
:Object of class "list"
storing all the
projectInfo
information of the workflow
runInfo
:Object of class "list"
storing all the
runInfo
information of the workflow
signature(x = "SYSargsList", i = "ANY", j = "ANY", drop = "ANY")
:
subsetting of class with bracket operator
signature(x = "SYSargsList", i = "ANY", j = "ANY")
:
subsetting of class with bracket operator
signature(x = "SYSargsList", i = "ANY", j = "ANY", value = "ANY")
:
replacement method for SYSargsList
class
signature(x = "SYSargsList")
:
extracting slots elements by name
signature(from = "list", to = "SYSargsList")
:
as(list, "SYSargsList")
signature(from = "SYSargsList", to = "list")
:
as(SYSargsList, "list")
signature(x = "SYSargsList")
: extracts number of
SYSargs2
objects
signature(x = "SYSargsList")
: extracts slot names
signature(object = "SYSargsList")
: summary view of
SYSargsList
steps
signature(x = "SYSargsList")
: extract data from
stepsWF
slot
signature(x = "SYSargsList")
: extract data from
statusWF
slot
signature(x = "SYSargsList")
: extract data from
dependency
slot
signature(x = "SYSargsList")
: extract data from
projectInfo
slot
signature(x = "SYSargsList")
: extract data from
runInfo
slot
signature(x = "SYSargsList")
: extract data from
targetsWF
slot
signature(x = "SYSargsList")
: Coerce back to
list as(SYSargsList, "list")
signature(x = "SYSargsList")
: extract data from
SE
slot
signature(x = "SYSargsList", sample=NULL)
:
extracts data from cmdlist
slot for each step
signature(x = "SYSargsList")
:
replacement method for append a step
signature(x = "SYSargsList")
:
replacement method for append a step
signature(x = "SYSargsList")
:
replacement method for replace a step
signature(x = "SYSargsList")
:
replacement method for rename a step
signature(x = "SYSargsList")
:
replacement method for yamlinput
slot for each step
signature(x = "SYSargsList")
:
replacement method for dependency
slot for each step
signature(x = "SYSargsList")
:
updateStatus method for update a step status
Daniela Cassol and Thomas Girke
SYSargs2
, LineWise
, and SPRproject
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") ## Accessors stepsWF(sal) statusWF(sal) targetsWF(sal) outfiles(sal) SE(sal) dependency(sal) projectInfo(sal) runInfo(sal) ## Methods baseCommand(sal, 1) ## SYSargs2 step SampleName(sal, step="echo") stepName(sal) targetsheader(sal, step=1) ## SYSargs2 step yamlinput(sal, step=1) ## SYSargs2 step cmdlist(sal, step=1, targets=1:2) ## SYSargs2 step codeLine(sal, step=2) ## SYSargs2 step copyEnvir(sal, list = character(), new.env = globalenv()) viewEnvir(sal) ## Subset Methods sal_sub <- subset(sal, subset_steps=1, input_targets=1:2, keep_steps = TRUE) targetsIn <- getColumn(sal, step=1, position = c("outfiles")) ## Replacement renameStep(sal, step=1) <- "new_echo" dependency(sal, step=2) <- "new_echo" updateColumn(sal, step=2, position = c("targetsWF")) <- data.frame(targetsIn) targetsWF(sal) replaceStep(sal, step=2) <- LineWise(code = { hello <- "Printing a new message" }, step_name = "R_hello", dependency = "new_echo") #yamlinput(sal, step=1, paramName="results_path") <- list(results_path=list( # class="Directory", path="./data")) appendCodeLine(sal, step=2, after = 0) <- "log <- log(10)" codeLine(sal, 2) replaceCodeLine(sal, step=2, line=1) <- LineWise(code = { log <- log(50) }) codeLine(sal, 2)