Question: CWL: Specify type of input file
0
gravatar for sc35
2.4 years ago by
sc350
sc350 wrote:

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.

cwl • 573 views
ADD COMMENTlink modified 2.4 years ago by bogdan.gavrilovic230 • written 2.4 years ago by sc350
0
gravatar for Michael R. Crusoe
2.4 years ago by
Common Workflow Language project
Michael R. Crusoe1.8k wrote:

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.

ADD COMMENTlink written 2.4 years ago by Michael R. Crusoe1.8k
0
gravatar for bogdan.gavrilovic
2.4 years ago by
bogdan.gavrilovic230 wrote:

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 ''
}

ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by bogdan.gavrilovic230
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1025 users visited in the last hour