I try to refer to a list of input paths in a CommandLineTool. In essence, my tool looks like this:
class: CommandLineTool
cwlVersion: v1.0
baseCommand:
- python
inputs:
- id: inpfiles
type: 'Directory[]'
outputs: []
label: _do_magic
arguments:
- position: 0
prefix: '-c'
valueFrom: |
import magic
magic.main(["$(inputs.inpfiles.path)"])
The main function of the magic script (not my script...) expects a dict of paths as input (I will probably have to play with the separator setting as well for this). The code I have now works for a single Directory object, but doesn't work. It does work when I refer to a single entry by using $inputs.inpfiles[0].path.
So my question is: how should I get a list of paths in an array of Directory objects?
Answering my own question. Curious to see if this is indeed the neatest option:
class: CommandLineTool cwlVersion: v1.0
You can have it written to a file and then load json in the Python section