Accessories function to modify the Command-line Version 1

printParam(sysargs, position, index = NULL)
subsetParam(sysargs, position, index = NULL, trim = TRUE, mute = FALSE)
replaceParam(sysargs, position, index = NULL, replace, mute = FALSE)
renameParam(sysargs, position, index = FALSE, rename, mute = FALSE)
appendParam(sysargs, position, index = NULL, append, after, mute = FALSE)

Arguments

sysargs

Object of class SYSargs2. Output from the createParamFiles function.

position

string, one of baseCommand, inputs, outputs to view or apply a modification.

index

numeric or character vector, index to view or change a single item in baseCommand, inputs, outputs.

trim

logical, only keep arguments specified by index. Default is "TRUE".

replace

named list, replace arguments in different positions. Replace list length must be the same as index. Different positions will have different requirements.

rename

character vector, rename items in different positions. rename vector length must be the same as index.

append

named list, same requirements as replace, however it cannot append baseCommand.

after

a subscript, after which the values are to be appended. If NULL will be after the last argument or specify a numeric integer.

mute

logical, print the raw command-line string and output after replacing or rename.

Details

- printParam: prints its arguments defined by position and index.

- subsetParam: returns subsets of command-line, keeping the arguments defined by position and index.

- replaceParam: replaces the values in command-line with indices given in list by those given in values

- renameParam: rename the names of the arguments.

- appendParam: Add arguments to the original command line.

Value

SYSargs2 object

References

For more details on CWL, please consult the following page: https://www.commonwl.org/

Author

Le Zhang and Daniela Cassol

See also

writeParamFiles createParamFiles loadWorkflow renderWF showClass("SYSargs2")

Examples

command <- "
hisat2 \
    -S <F, out: ./results/M1A.sam> \
    -x <F: ./data/tair10.fasta> \
    -k <int: 1> \
    -min-intronlen <int: 30> \
    -max-intronlen <int: 3000> \
    -threads <int: 4> \
    -U <F: ./data/SRR446027_1.fastq.gz> \
    --verbose
"
cmd <- createParamFiles(command)
#> *****BaseCommand*****
#> hisat2 
#> *****Inputs*****
#> S:
#>     type: File
#>     preF: -S
#>     yml: ./results/M1A.sam
#> x:
#>     type: File
#>     preF: -x
#>     yml: ./data/tair10.fasta
#> k:
#>     type: int
#>     preF: -k
#>     yml: 1
#> min-intronlen:
#>     type: int
#>     preF: -min-intronlen
#>     yml: 30
#> max-intronlen:
#>     type: int
#>     preF: -max-intronlen
#>     yml: 3000
#> threads:
#>     type: int
#>     preF: -threads
#>     yml: 4
#> U:
#>     type: File
#>     preF: -U
#>     yml: ./data/SRR446027_1.fastq.gz
#> verbose:
#>     type: 
#>     preF: --verbose
#>     yml: 
#> *****Outputs*****
#> output1:
#>     type: File
#>     value: ./results/M1A.sam
#> *****Parsed raw command line*****
#> hisat2 -S ./results/M1A.sam -x ./data/tair10.fasta -k 1 -min-intronlen 30 -max-intronlen 3000 -threads 4 -U ./data/SRR446027_1.fastq.gz --verbose  
#> 	 Written content of 'commandLine' to file: 
#>  param/cwl/hisat2/hisat2.cwl 
#> 	 Written content of 'commandLine' to file: 
#>  param/cwl/hisat2/hisat2.yml 
cmdlist(cmd)
#> $defaultid
#> $defaultid$hisat2
#> [1] "hisat2 -S ./results/M1A.sam -x ./data/tair10.fasta -k 1 -min-intronlen 30 -max-intronlen 3000 -threads 4 -U ./data/SRR446027_1.fastq.gz --verbose "
#> 
#>