Skip to content
Snippets Groups Projects
Commit 43cde1f1 authored by David Rafferty's avatar David Rafferty
Browse files

Add check to exclude empty strings

Former-commit-id: 99bbb242
parent 101156ce
No related branches found
No related tags found
No related merge requests found
......@@ -14,30 +14,31 @@ inputs:
type: string?
default: '*&'
doc: Filter these baselines for the comparison
label: identifyBadAntennas_join
arguments:
- '-c'
- |
import sys
import json
flaggedants = $(inputs.flaggedants)
filter = '$(inputs.filter)'
flaggedants_list = [ flaggedant.split(',') for flaggedant in flaggedants ]
flagged_antenna_list = set.intersection(*map(set, flaggedants_list))
flagged_antenna_list = set.intersection(*map(set, flaggedants_list))
for flagged_antenna in flagged_antenna_list:
filter += ';!' + flagged_antenna + '*&&*'
if flagged_antenna != '':
filter += ';!' + flagged_antenna + '*&&*'
cwl_output = {"filter": filter}
with open('./out.json', 'w') as fp:
json.dump(cwl_output, fp)
outputs:
- id: filter_out
type: string
......@@ -48,10 +49,10 @@ outputs:
- id: logfile
type: File?
outputBinding:
glob: identifyBadAntennas.log
glob: identifyBadAntennas.log
requirements:
- class: InlineJavascriptRequirement
stdout: identifyBadAntennas.log
stderr: identifyBadAntennas_err.log
\ No newline at end of file
stderr: identifyBadAntennas_err.log
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment