Can you make CWL insist that an input file has a particular type? How would you do this? I would like an error if the tool is given a file of the wrong type.
Can you make CWL insist that an input file has a particular type? How would you do this? I would like an error if the tool is given a file of the wrong type.
Hello sc35 and thank you for your question.
The answer depends on what you mean by "insist" :-)
The format
field can be used to signal which File format you expect: http://www.commonwl.org/user_guide/16-file-formats/
But validation (beyond matching the format values) is up to the workflow engines themselves.
HI, You can probably do a sort of a check using JS expression, for example add an argument that will not appear on the command line, but will throw an error if something is not the way you want it to be:
arguments:
- valueFrom: |-
${
if (inputs.input_file.nameext != '.bam') throw 'Not BAM'
return ''
}
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.