Entering edit mode
7.8 years ago
jeltje.van.baren
▴
80
How do I make an array optional input?
This works:
cwlVersion: v1.0
class: CommandLineTool
inputs:
insertSize:
type:
type: array
items: int
inputBinding:
prefix: -s
separate: true
inputBinding:
position: 2
I want to make insertSize optional, but changing array
into array?
gives a long list of errors (pasted below).
What is the correct way to do this?
Error:
Tool definition failed validation: Validation error in object file:///mnt/mc3_tcga/pindel/pindel.cwl Could not validate `CommandLineTool` because
CommandLineTool record could not validate field `inputs` because
At position 16
could not validate field `type` because
the value `{'inputBinding': {'prefix': '-s', 'separate': True},
'items': 'int',
'type': [u'null', 'array']}`
is not a valid type in the union, expected one of:
- null, but
the value `{'inputBinding': {'prefix': '-s', 'separate': True},
'items': 'int',
'type': [u'null', 'array']}` is not null
- CWLType, but
the value `{'inputBinding': {'prefix': '-s', 'separate': True},
'items': 'int',
'type': [u'null', 'array']}`
is not a valid symbol in enum CWLType, expected one of 'File', 'Directory'
- CommandInputRecordSchema, but
could not validate field `type` because
the value `[u'null', 'array']`
is not a valid symbol in enum Record_symbol, expected one of 'record'
could not validate field `items` because it is not recognized and strict is True, valid fields are: fields, type, label
could not validate field `inputBinding` because it is not recognized and strict is True, valid fields are: fields, type, label
- CommandInputEnumSchema, but
missing required field `symbols`
could not validate field `type` because
the value `[u'null', 'array']`
is not a valid symbol in enum Enum_symbol, expected one of 'enum'
could not validate field `items` because it is not recognized and strict is True, valid fields are: symbols, type, label, inputBinding
- CommandInputArraySchema, but
could not validate field `type` because
the value `[u'null', 'array']`
is not a valid symbol in enum Array_symbol, expected one of 'array'
- string, but
the value `{'inputBinding': {'prefix': '-s', 'separate': True},
'items': 'int',
'type': [u'null', 'array']}` is not string
- array of <CWLType or CommandInputRecordSchema or CommandInputEnumSchema or CommandInputArraySchema or string>, but
the value `{'inputBinding': {'prefix': '-s', 'separate': True},
'items': 'int',
'type': [u'null', 'array']}` is not a list, expected list of CWLType or CommandInputRecordSchema or CommandInputEnumSchema or CommandInputArraySchema or string