subsetWF.Rd
Return subsets of character
for the input
, output
or the list of command-line for each workflow step
.
subsetWF(args, slot, subset=NULL, index=NULL, delete=FALSE)
object of class SYSargs2
.
three options available: type="input"
returns input slot from SYSargs2
object; type="output"
returns output slot from SYSargs2
object; and type="step"
returns all the command-line for each workflow step from SYSargs2
object.
name or numeric position of the values to be subsetting in the slot
. If slot="input"
, the subset
are the variables defined in the param.yml
file. If slot="step"
, the subset
is the command line defined on the SYSargs2
object for all the steps of the workflow. If slot="output"
, the subset
is the path for the expected output files for all the steps in the workflow. Default is subset=NULL
A numeric index positions of the file in SYSargs2
object, slot output
. It requires a subset
to be defined. Default is index=NULL
.
allows to delete a subset of files in the case of slot="output"
. Default is delete=NULL
.
loadWorkflow
renderWF
## Construct SYSargs2 object
targets <- system.file("extdata", "targets.txt", package="systemPipeR")
dir_path <- system.file("extdata/cwl", package="systemPipeR")
WF <- loadWorkflow(targets=targets, wf_file="hisat2/hisat2-mapping-se.cwl",
input_file="hisat2/hisat2-mapping-se.yml", dir_path=dir_path)
WF <- renderWF(WF, inputvars=c(FileName="_FASTQ_PATH1_", SampleName="_SampleName_"))
WF
#> Instance of 'SYSargs2':
#> Slot names/accessors:
#> targets: 18 (M1A...V12B), targetsheader: 4 (lines)
#> modules: 1
#> wf: 0, clt: 1, yamlinput: 7 (inputs)
#> input: 18, output: 18
#> cmdlist: 18
#> Sub Steps:
#> 1. hisat2-mapping-se (rendered: TRUE)
#>
#>
## Testing subset_wf function
input <- subsetWF(WF, slot="input", subset='FileName')
output <- subsetWF(WF, slot="output", subset=1, index=1)
step.cmd <- subsetWF(WF, slot="step", subset=1) ## subset all the HISAT2 commandline
# subsetWF(WF, slot="output", subset=1, index=1, delete=TRUE) ## in order to delete the subset files list