Below is an example of a tool. Rather than use baseCommand, it uses arguments, and it invokes multiple commands (separated by newline characters).
cwlVersion: v1.1
class: CommandLineTool
requirements:
ShellCommandRequirement: {}
inputs:
given_name:
type: string
surname:
type: string
arguments:
- shellQuote: false
valueFrom: >
echo "Hello, $(inputs.given_name)!"
echo "Your surname is $(inputs.surname)."
outputs:
standard_output:
type: stdout
stdout: output.txt
This is an overly simple example. But in bioinformatics research, I often have a need to execute two related commands (maybe to align and then index a BAM file). Rather than structure them as two separate CWL tool definitions, it sometimes makes sense (to me) to use this approach. Here are my questions:
- Is there some strong philosophical or technical reasoning against this approach?
- Is there some strong reason that it would be a bad idea to leave baseCommand out of tool definitions?
Thanks!