createParam {systemPipeR} | R Documentation |
The constructor function creates an SYSargs2
S4 class object from
command-line string. Also, the function creates and saves the CWL param files.
The latest storages all the parameters required for running command-line software,
following the standard and specification defined on Common Workflow Language (CWL).
createParamFiles(commandline, cwlVersion = "v1.1", class = "CommandLineTool", results_path = "./results", module_load = "baseCommand", file = "default", writeParamFiles = TRUE, confirm = FALSE, overwrite = FALSE, silent = FALSE) writeParamFiles(sysargs, file = "default", overwrite = TRUE, silent = FALSE)
commandline |
string. Original command-line to create the CWL files from. Please see
|
cwlVersion |
string. The version of the Common Workflow Language. More information here: https://www.commonwl.org/. |
class |
character. Name of Common Workflow Language Description class. The following
is accepted: |
results_path |
Path to the results folder. Default is |
module_load |
string, Name of software to load by Environment Modules system. Default is
"baseCommand", which creates a subfolder and two files: *.cwl and *.yml
at |
file |
character. Name and path of output files. If set to "default" then the name of
the output files will have the pattern |
writeParamFiles |
logical. If set to TRUE, it will write to file the content of the CWL
files: |
confirm |
If set to |
overwrite |
logical. If set to TRUE, existing files of the same name will be overwritten.
Default is |
silent |
logical. If set to TRUE, all messages returned by the function will be
suppressed. Default is |
sysargs |
Object of class |
- First line of the command-line object will be treated as the
baseCommand
;
- For argument lines (starting from the second line), any word before the first
space with leading '-' or '–' in each will be treated as a prefix, like
-S
or --min
. Any line without this first word will be treated
as no prefix;
- All defaults are placed inside <...>
;
- First argument is the input argument type. F
for "File", int
for integer, string
for string;
- Optional: use the keyword out
followed the type with a ,
comma
separation to indicate if this argument is also a CWL output;
- Then, use :
to separate keywords and default values, any non-space
value after the :
will be treated as the default value;
- If any argument has no default value, just a flag, like --verbose
,
there no need to add any <...>
.
- The \
is not required, however for consistency it is recommended to add.
SYSargs2
object
Le Zhang and Daniela Cassol
For more details on CWL
, please consult the following
page: https://www.commonwl.org/
writeParamFiles
printParam
subsetParam
replaceParam
renameParam
appendParam
loadWorkflow
renderWF
showClass("SYSargs2")
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 <- createParam(command, writeParamFiles=FALSE) cmdlist(cmd)