printParam2 | R Documentation |
Accessories function to modify the Command-line Version 2
printParam2(sysargs, base = FALSE, args = FALSE, inputs = FALSE,
outputs = FALSE, stdout = FALSE, raw_cmd = FALSE, all = TRUE)
appendParam2(sysargs, x, position = c("inputs", "args", "outputs"),
after = NULL, verbose = FALSE)
replaceParam2(sysargs, x, index=NULL,
position = c("inputs", "baseCommand", "args", "outputs", "stdout"),
verbose = FALSE)
removeParam2(sysargs, index=NULL, position = c("inputs", "args", "outputs", "stdout"),
verbose = FALSE)
renameParam2(sysargs, index=NULL, new_names,
position = c("inputs", "args", "outputs", "stdout"), verbose = FALSE)
sysargs |
Object of class |
base |
logical, print out base command information? |
args |
logical, print out arguments information? |
inputs |
logical, print out inputs information? |
outputs |
logical, print out outputs information? |
stdout |
logical, print out stdout information? |
raw_cmd |
logical, print out parsed raw command information? |
all |
logical, print out all base command, arguments, inputs,
outputs, and raw command information?
Turn this to |
position |
string, one of the positions to apply a modification.
For |
index |
numeric or character vector, index of items to remove or rename item(s)
inside the position you choose, in |
after |
integer, in |
x |
named list or string, new items to replace or append in different positions. Replace list length
must be the same as |
new_names |
character vector, new names that you wish to replace the old names. |
verbose |
logical, show addtional information during/after operation? for example, print the new changes. |
- printParam2
: prints its arguments defined by position
and index
.
- removeParam2
: removes items in certain positions you select.
- replaceParam2
: replaces the values in command-line with indices given in list by those given in values
- renameParam2
: rename the names of items in certain position.
- appendParam2
: Add arguments to the original command line. Adding new basecommand or
standard out is not allowed.
- If x
is a character, it requires exact 3 semi-colons ;
to separate the string
in to 4 columns. Values before the third column is the same as createParam
inputs,
first column: prefix/argument name, second column: type, third column: default value.
The fourth column (new): numeric, index of the new item, this will be translated into
position
entries in CWL.
- If x
is a list, it must be named. Following items must be included in list:
preF
, type
, value
, index
. They refer to prefix, param type,
default value, and position index correspondingly.
SYSargs2
object
Le Zhang and Daniela Cassol
For more details on CWL
, please consult the following page: https://www.commonwl.org/
writeParamFiles
createParamFiles
loadWorkflow
renderWF
showClass("SYSargs2")
command2 <- '
mycmd2 \
p: -s; File; sample1.txt \
p: -s; File; sample2.txt \
p: --c; ; \
p: -o; File; out: myout.txt \
ref_genome; File; a.fasta \
p: --nn; int; 12 \
mystdout; File; stdout: abc.txt
'
cmd2 <- createParam(command2, syntaxVersion = "v2", writeParamFiles=FALSE)
# string format
new_cmd <- 'p: -abc; string; abc; 7'
cmd2 <- appendParam2(cmd2, x = new_cmd, position = "inputs")
printParam2(cmd2, all = FALSE, inputs = TRUE, raw_cmd = TRUE)
# list format
new_cmd <- list(name = "new_arg", preF = "--foo", index = "8")
cmd2 <- appendParam2(cmd2, x = new_cmd, position = "args")
printParam2(cmd2, all = FALSE, args = TRUE, raw_cmd = TRUE)
# rename
cmd2 <- renameParam2(cmd2, "new_name_arg", index = "new_arg", position = "args")
printParam2(cmd2, all = FALSE, args = TRUE, raw_cmd = TRUE)
# remove
cmd2 <- removeParam2(cmd2, index = "new_name_arg", position = "args")
printParam2(cmd2, all = FALSE, args = TRUE, raw_cmd = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.