I'm new to CWL tools. I can use any of bash commands in basecommand, i.e.:
basecommand cat
or
basecommand [wc, -w]
How should I modify it to make it do the same as
cat | wc -w
will do?
I'm new to CWL tools. I can use any of bash commands in basecommand, i.e.:
basecommand cat
or
basecommand [wc, -w]
How should I modify it to make it do the same as
cat | wc -w
will do?
One should use arguments and InlineJavascriptRequirement to specify input in arguments:
baseCommand: cat
arguments:
- $(inputs.infile)
- "|"
- wc
- w
You can also write a bash script and run the script in the cwl. I mean:
basecommand: sh
inputfile: script.sh
the script could contain all of your commands such as cat and wc. The script also could get other inputs for your commands such as file or strings too and you can use them inside the script by $1 and $2 and go on in which $1 relate to the first argument.