Skip to content

Commit

Permalink
Remove dups in software_prerequisites
Browse files Browse the repository at this point in the history
Add code to check for duplicate entries in execution_domain::software_prerequisites. Also add code for user suplied xref as suggested by @nsoranzo in #22
  • Loading branch information
HadleyKing authored and nsoranzo committed Feb 21, 2020
1 parent 8b1eafe commit 13fe2af
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/galaxy/webapps/galaxy/api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ def export_invocation_bco(self, trans, invocation_id, **kwd):
if tag.user_tname not in keywords:
keywords.append(tag.user_tname)

input_subdomain, output_subdomain, pipeline_steps, software_prerequisites = [], [], [], []
tools, input_subdomain, output_subdomain, pipeline_steps, software_prerequisites = [], [], [], [], []
for i, step in enumerate(workflow_invocation.steps):
current_tool = dict_workflow['steps'][str(i)]
if step.workflow_step.type == 'tool':
Expand Down Expand Up @@ -1111,11 +1111,15 @@ def export_invocation_bco(self, trans, invocation_id, **kwd):
}
except Exception:
continue
software_prerequisites.append(software_prerequisite)
if software_prerequisite['uri']['uri'] in tools:
continue
else:
software_prerequisites.append(software_prerequisite)
tools.append(software_prerequisite['uri']['uri'])
# method to grab the workflow inputs? [WIP] TODO
if step.workflow_step.type != 'tool':
input_subdomain.append(step.workflow_step)

print tools
usability_domain = []
for a in stored_workflow.annotations:
usability_domain.append(a.annotation)
Expand Down Expand Up @@ -1152,7 +1156,7 @@ def export_invocation_bco(self, trans, invocation_id, **kwd):
'extension_domain': galaxy_extension,
'description_domain': {
'keywords': keywords,
'xref': [],
'xref': kwd.get('xref', []),
'platform': ['Galaxy'],
'pipeline_steps': pipeline_steps,
},
Expand Down

0 comments on commit 13fe2af

Please sign in to comment.