I have a input parameter that is an array of records, like the following:
resources:
type:
type: array
items:
- type: record
name: resource
fields:
- name: resource
type: File
inputBinding:
prefix: --resource
- name: resource_param
type: string
inputBinding:
prefix: --resource_param
In the record, resource is File object, and will require secondaryFiles. But secondaryFiles is only allowed for CommandInputParameter, and not allowed in CommandInputRecordField.
Ideally I want to something like the following to work:
resources:
type:
type: array
items:
- type: record
name: resource
fields:
- name: resource
type: File
secondaryFiles:
- ".ext"
inputBinding:
prefix: --resource
- name: resource_param
type: string
inputBinding:
prefix: --resource_param
My reason to use array of records here is to combine resource and resource_param together to produce command line like --resource --resource_param --resource --resource_param. I wish there is some other alternative in cwl.
3 answers
My another question is:
Is the support of `seconaryFiles` in `CommandInputRecordField` general enough? Should this be added to cwl standard?
If it is going to support secondaryFiles in InputRecordField, the fix is straight foward:
In `schemas/v1.0/Process.yml`, there is a `secondaryFiles` field under `Parameter`. Just copy this field to under InputRecordField after label field.
One ticket is filed on github/cwltool ( https://github.com/common-workflow-language/cwltool/issues/480 ).
Log in to answer this question.