subsetWF {systemPipeR} | R Documentation

## Subsetting SYSargs2 class slots

### Description

Return subsets of `character` for the `input`, `output` or the list of command-line for each workflow `step`.

### Usage

    subsetWF(args, slot, subset = NULL, delete = FALSE)

### Arguments

`args` | object of class `SYSargs2`.
`slot` | 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.
`subset` | name or numeric position of the values to be subsetting in the `slot`.
`delete` | allows to delete a subset of files in the case of `slot="output"`. Default is `delete=NULL`.

### Author(s)

Daniela Cassol and Thomas Girke

### See Also

`loadWorkflow` `renderWF`

### Examples

    ## 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-se/hisat2-mapping-se.cwl",
                       input_file="hisat2-se/hisat2-mapping-se.yml",
                       dir_path=dir_path)
    WF <- renderWF(WF, inputvars=c(FileName="_FASTQ_PATH_", SampleName="_SampleName_"))
    WF

    ## Testing subset_wf function
    input <- subsetWF(WF, slot="input", subset='FileName')
    output <- subsetWF(WF, slot="output", subset=1)
    step.cmd <- subsetWF(WF, slot="step", subset=1) ## subset all the HISAT2 commandline

[Package systemPipeR version 1.18.2 Index]