Question: Strict validation for input and inputBinding values with same position?
0
gravatar for brunodepaulak
11 months ago by
brunodepaulak0 wrote:

Hi,

Is it valid in the CWL language to have two input parameters with the same inputBinding position? I thought that would raise an error (tried with --strict --verbose) but it actually appended the values of hello message and file.

#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
baseCommand: echo
inputs:
  message:
    type: string
    inputBinding:
      position: 1
  file:
    type: string
    inputBinding:
      position: 1
outputs: []

In the example above, with the reference cwlrunner, everything runs fine:

$ cwl-runner --strict --verbose 1st-tool.cwl echo-job.yml 
INFO /home/kinow/Development/python/workspace/cwl/venv/bin/cwl-runner 1.0.20190621234233
INFO Resolved '1st-tool.cwl' to 'file:///home/kinow/Development/python/workspace/cwl/1st-tool.cwl'
INFO [job 1st-tool.cwl] /tmp/wn7i3zwz$ echo \
    'Say what?' \
    'Hello world!'
Say what? Hello world!
INFO Could not collect memory usage, job ended before monitoring began.
INFO [job 1st-tool.cwl] completed success
{}
INFO Final process status is success

Content of echo-job.yml:

message: Hello world!
file: Say what?

Thanks Bruno

validation cwl • 287 views
ADD COMMENTlink modified 11 months ago by Tom530 • written 11 months ago by brunodepaulak0
0
gravatar for Tom
11 months ago by
Tom530
Tom530 wrote:

The CWL specification has a section on how cwl-runners have to handle this situation: https://www.commonwl.org/v1.1/CommandLineTool.html#Input_binding

I'm not sure i understand correctly, but i think the runner can either use the order of the items in the document (message > file in your case) or their names. Whatever it might be, i would recommend not relying on your tool to produce the same output when using different runners.

ADD COMMENTlink modified 11 months ago • written 11 months ago by Tom530
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: 2111 users visited in the last hour