commit/galaxy-central: greg: 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.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/309f2650b4f4/ changeset: 309f2650b4f4 user: greg date: 2011-10-28 22:13:21 summary: 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. affected #: 1 file diff -r 2369a117e49772b9074dab996ef1601969f007dc -r 309f2650b4f46c4cd75ca252b215dae1799732ee lib/galaxy/web/controllers/workflow.py --- a/lib/galaxy/web/controllers/workflow.py +++ b/lib/galaxy/web/controllers/workflow.py @@ -1296,7 +1296,16 @@ 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 @@ # 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 ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket