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

Add check to exclude empty strings

Former-commit-id: 43cde1f1 [formerly 99bbb242]
Former-commit-id: f2779617
Former-commit-id: ab84b7ce
parent 2145edee
No related branches found
No related tags found
No related merge requests found
...@@ -14,30 +14,31 @@ inputs: ...@@ -14,30 +14,31 @@ inputs:
type: string? type: string?
default: '*&' default: '*&'
doc: Filter these baselines for the comparison doc: Filter these baselines for the comparison
label: identifyBadAntennas_join label: identifyBadAntennas_join
arguments: arguments:
- '-c' - '-c'
- | - |
import sys import sys
import json import json
flaggedants = $(inputs.flaggedants) flaggedants = $(inputs.flaggedants)
filter = '$(inputs.filter)' filter = '$(inputs.filter)'
flaggedants_list = [ flaggedant.split(',') for flaggedant in flaggedants ] 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: for flagged_antenna in flagged_antenna_list:
filter += ';!' + flagged_antenna + '*&&*' if flagged_antenna != '':
filter += ';!' + flagged_antenna + '*&&*'
cwl_output = {"filter": filter} cwl_output = {"filter": filter}
with open('./out.json', 'w') as fp: with open('./out.json', 'w') as fp:
json.dump(cwl_output, fp) json.dump(cwl_output, fp)
outputs: outputs:
- id: filter_out - id: filter_out
type: string type: string
...@@ -48,10 +49,10 @@ outputs: ...@@ -48,10 +49,10 @@ outputs:
- id: logfile - id: logfile
type: File? type: File?
outputBinding: outputBinding:
glob: identifyBadAntennas.log glob: identifyBadAntennas.log
requirements: requirements:
- class: InlineJavascriptRequirement - class: InlineJavascriptRequirement
stdout: identifyBadAntennas.log stdout: identifyBadAntennas.log
stderr: identifyBadAntennas_err.log stderr: identifyBadAntennas_err.log
\ No newline at end of file
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