output_update {systemPipeR}R Documentation

Updates the output files paths in the SYSargs2 object

Description

After executing all the command-lines by the runCommadline function, the output files can be created in specific directories rather then results in a particular directory. Also, the runCommadline function allows converting the SAM file outputs to sorted and indexed BAM files. Thus, the output_update function allows updating the location of these files in the output of the SYSargs2 object.

Usage

output_update(args, dir = TRUE, dir.name = NULL, replace = NULL)

Arguments

args

object of class SYSargs2.

dir

assign TRUE to update the location of the output files in the args object accordingly with the workflow name directory. Default is dir=TRUE.

dir.name

if the results directory name is not specified in the input file, it is possible to specify here the name. This argument is required if the path name return NULL from the input file. Default is dir.name=NULL.

replace

replace the extension for the output files in the args object. For example, ".bam" autodetects SAM file outputs in the args object and replace them to BAM extensions. Default is replace=NULL.

Value

SYSargs2 object with output location files updated.

Author(s)

Daniela Cassol and Thomas Girke

See Also

To check directory name in the input file: yamlinput(WF)$results_path$path.

Examples

 
## Construct SYSargs2 object from CWl param, CWL input, and targets files 
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
output(WF)

## Not run: 
runCommandline(args=WF, make_bam=TRUE)
## Output paths update
WF <- output_update(WF, dir=FALSE, replace = ".bam")

runCommandline(args=WF, make_bam=TRUE, dir=TRUE)
## Output paths update
WF <- output_update(WF, dir=TRUE, replace = ".bam")

## End(Not run)

[Package systemPipeR version 1.18.2 Index]