Gather file array into one argument in CommandlineTool

I have the following tool

class: CommandLineTool
inputs:
- id: imageSequence
  type: File[]
- id: renderedAnimation
  type: string
outputs:
- id: ffmpegAnimation
  type: File
  outputBinding:
    glob: '*.mp4'
requirements:
- class: InlineJavascriptRequirement
baseCommand: ffmpeg
arguments:
- -r
- '25'
- -i
- $(inputs.imageSequence)
- -c:v
- libx264
- -preset
- fast
- -y
- $(inputs.renderedAnimation)
successCodes:
- 0
cwlVersion: v1.0

Is there a way to generate one set of

- -i
- an individual file

for every file in the input sequence

For example, if there are 3 files in the input sequence (hello.exr, world.exr,nicholas.exr), there will be -i hello.exr -i world.exr -i nicholas.exr

Cheers

Again read 5.1.2 of the spec and specifically the prefix, itemSeparator Bits. So I have an example of this here gdc-rnaseq-cwl/gdc_qc_tool.fastqc.cwl at 490ff7f2595262eb883b5804462afaf70e7bc2e1 · NCI-GDC/gdc-rnaseq-cwl · GitHub

1 Like