mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fixes for finding tools installed from a tool shed when building workflows from the current history or running workflows, and the workflow in question references tools using the old tool_id.
This commit is contained in:
@@ -1296,7 +1296,16 @@ class WorkflowController( BaseUIController, Sharable, UsesStoredWorkflow, UsesAn
|
||||
for job_id in job_ids:
|
||||
assert job_id in jobs_by_id, "Attempt to create workflow with job not connected to current history"
|
||||
job = jobs_by_id[ job_id ]
|
||||
tool = trans.app.toolbox.tools_by_id[ job.tool_id ]
|
||||
try:
|
||||
tool = trans.app.toolbox.tools_by_id[ job.tool_id ]
|
||||
except KeyError, e:
|
||||
# Handle the case where the workflow requires a tool not available in the local Galaxy instance.
|
||||
# The id value of tools installed from a Galaxy tool shed is a guid, but these tool's old_id
|
||||
# attribute should contain what we're looking for.
|
||||
for available_tool_id, available_tool in trans.app.toolbox.tools_by_id.items():
|
||||
if job.tool_id == available_tool.old_id:
|
||||
tool = available_tool
|
||||
break
|
||||
param_values = job.get_param_values( trans.app )
|
||||
associations = cleanup_param_values( tool.inputs, param_values )
|
||||
# Doing it this way breaks dynamic parameters, backed out temporarily.
|
||||
@@ -1463,7 +1472,16 @@ class WorkflowController( BaseUIController, Sharable, UsesStoredWorkflow, UsesAn
|
||||
# Execute module
|
||||
job = None
|
||||
if step.type == 'tool' or step.type is None:
|
||||
tool = trans.app.toolbox.tools_by_id[ step.tool_id ]
|
||||
try:
|
||||
tool = trans.app.toolbox.tools_by_id[ step.tool_id ]
|
||||
except KeyError, e:
|
||||
# Handle the case where the workflow requires a tool not available in the local Galaxy instance.
|
||||
# The id value of tools installed from a Galaxy tool shed is a guid, but these tool's old_id
|
||||
# attribute should contain what we're looking for.
|
||||
for available_tool_id, available_tool in trans.app.toolbox.tools_by_id.items():
|
||||
if step.tool_id == available_tool.old_id:
|
||||
tool = available_tool
|
||||
break
|
||||
input_values = step.state.inputs
|
||||
# Connect up
|
||||
def callback( input, value, prefixed_name, prefixed_label ):
|
||||
|
||||
Reference in New Issue
Block a user