I need to pass an array as an optional argument in a CWL tool definition. I know that for primitive types ['null', <type>]
works fine, but for array it generates an error:
Type property "['null', 'array']" not a valid Avro schema
.
I have also tried to specify it the next way:
- id: bam_files
type:
- "null"
- type: array
items: string
but cwltool interprets the first given type as the only one, i.e. bam_files is always null
or it is a required argument when type: array
goes first.
The same applies to enum
type.
Your second approach should be the correct one. Can you provide the error when you try it that way?
I'm sorry, I checked the job file and found out that I confused an underscore with a dash in the argument name...
Could you please point to the second approach in the docs? As far as I remember, I found that on GitHub, not in the documentation.