Skip to content

Commit

Permalink
Improved array generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHickman committed Aug 18, 2017
1 parent 7e1ab97 commit 2c7b2c3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gatkcwlgenerator/gen_cwl_arg.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,16 @@ def get_CWL_type(argument):
# inputBinding prefixes and it works with object types
# Also adding the type itself for convenience - this would be interpreted as
# a one element array
typ = [typ, {
array_type = {
"type": "array",
"items": typ,
"inputBinding": get_input_bindings(argument, typ == "File")
}]
}

if isinstance(typ, list):
typ = typ + [array_type]
else:
typ = [typ, array_type]

if argument['required'] == 'no':
if isinstance(typ, list):
Expand Down

0 comments on commit 2c7b2c3

Please sign in to comment.