Cwltool --pack "invalid field inputBinding"

After using the cwltool --pack command we are receiving an error related to an invalid field in one of the inputs.

I believe this may be an issue with the json representation of the workflow, as before packing, the workflow runs successfully with YAML. I do see that inputBinding is a valid field for inputArraySchema, so I’m not sure why this error would be raised: Common Workflow Language (CWL) Workflow Description, v1.0.2

Here is the full error:

ERROR Tool definition failed initialization:
Tool definition file:///Users/johnsoni/Desktop/code/msk_access/nucleo/nucleo__packed.cwl#base_quality_recalibration.cwl failed validation:
nucleo__packed.cwl:9684:9:     Object `nucleo__packed.cwl#base_quality_recalibration.cwl` is not valid
                              because
                                tried `Workflow` but
nucleo__packed.cwl:9688:13:       the `inputs` field is not valid because
nucleo__packed.cwl:9708:17:         item is invalid because
nucleo__packed.cwl:9710:21:           the `type` field is not valid because
                                        tried array of <CWLType or InputRecordSchema or
                                        InputEnumSchema or InputArraySchema or string> but
                                          item is invalid because
                                            - tried InputRecordSchema but
nucleo__packed.cwl:9713:29:                   * the `type` field is not valid because
                                                the value 'array' is not a valid
                                                enum_d9cba076fca539106791a4f46d198c7fcfbdb779, expected 'record'
nucleo__packed.cwl:9714:29:                   * invalid field `items`, expected one of: 'fields',
                                              'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9715:29:                   * invalid field `inputBinding`, expected one of:
                                              'fields', 'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9710:21:                 - tried InputEnumSchema but
                                              * missing required field `symbols`
nucleo__packed.cwl:9713:29:                   * the `type` field is not valid because
                                                the value 'array' is not a valid
                                                enum_d961d79c225752b9fadb617367615ab176b47d77, expected 'enum'
nucleo__packed.cwl:9714:29:                   * invalid field `items`, expected one of: 'symbols',
                                              'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9715:29:                   * invalid field `inputBinding`, expected one of:
                                              'symbols', 'type', 'label', 'doc', 'name'
nucleo__packed.cwl:9710:21:                 - tried InputArraySchema but
nucleo__packed.cwl:9715:29:                   invalid field `inputBinding`, expected one of: 'items',
                                              'type', 'label', 'doc', 'name'

And the relevant section of the packed workflow:

  9684	        {
  9685	            "class": "Workflow",
  9686	            "id": "#base_quality_recalibration.cwl",
  9687	            "label": "base_quality_recalibration",
  9688	            "inputs": [
...
  9708	                {
  9709	                    "id": "#base_quality_recalibration.cwl/read_filter",
  9710	                    "type": [
  9711	                        "null",
  9712	                        {
  9713	                            "type": "array",
  9714	                            "items": "string",
  9715	                            "inputBinding": {
  9716	                                "prefix": "--read-filter"
  9717	                            }
  9718	                        }
  9719	                    ],
  9720	                    "https://www.sevenbridges.com/x": 0,
  9721	                    "https://www.sevenbridges.com/y": 213.375
  9722	                },
1 Like

Could you provide the yaml version of the workflow please?

The inputBinding is a valid field for inputArraySchema in a tool context, but I’m not familiar with using inputBinding with workflow inputs.

Alexis

Thank you, yes the issue was for some reason having inputBinding in the inputs section of a workflow. The CWL is valid after this was removed!

1 Like