how to make seconaryFiles work for File in CommandInputRecordField
3
1
Entering edit mode
6.8 years ago
liuxf09 ▴ 30

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.

cwl • 1.5k views
ADD COMMENT
0
Entering edit mode
6.8 years ago
liuxf09 ▴ 30

My another question is:

Is the support of `seconaryFiles` in `CommandInputRecordField` general enough? Should this be added to cwl standard?
ADD COMMENT
0
Entering edit mode
6.8 years ago
liuxf09 ▴ 30

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.
ADD COMMENT
0
Entering edit mode
6.8 years ago
liuxf09 ▴ 30

One ticket is filed on github/cwltool ( https://github.com/common-workflow-language/cwltool/issues/480 ).

ADD COMMENT

Login before adding your answer.

Traffic: 3861 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6