Hi all,

I am working in a project that requires running workflows with multiple
parameter by using the Galaxy API.

However I realised that /api/workflows webservice does not allow to set
several parameters for one sigle step.

You can check that ingalaxy-dist/lib/galaxy/workflow/run.py
  _update_step_parameters __doc__ string:

      PARAM_DICT = {'param': NAME, 'value': VALUE}

    Note that this format allows only one parameter to be set per step.

I've done a change in the script so it allows setting multiple parameters
per step.

So the format of the PARAM_DICT would be:
PARAM_DICT={'param': ['threshold','path'], 'value':

a list of parameters and a list of values, that will be combined and
assigned to the step.

I'm attaching a patch to the run.py file.
Is there any thought to fix that?
Could that be integrated in the main repository?
We have been patching the same part of the code for the last 2 months and I
think it would be interesting to add this feature permanently.

--- old/run.py	2014-06-11 11:30:43.000000000 +0000
+++ run.py	2014-06-11 11:34:15.000000000 +0000
@@ -307,16 +307,16 @@
     Finally (again, for backwards compatibility), PARAM_DICT can also
     be specified as::
-      PARAM_DICT = {'param': NAME, 'value': VALUE}
-    Note that this format allows only one parameter to be set per step.
+      PARAM_DICT = {'param': [list of param names], 'value': [list of param values]}
+          eg: PARAM_DICT={'param': ['threshold','path'], 'value': [2.3,'/tmp/kYzoax02.tmp']
     param_dict = param_map.get(step.tool_id, {}).copy()
     param_dict.update(param_map.get(str(step.id), {}))
     if param_dict:
         if 'param' in param_dict and 'value' in param_dict:
-            param_dict[param_dict['param']] = param_dict['value']
+            for k,v in zip(param_dict['param'],param_dict['value']):
+                param_dict[k] =v
 __all__ = [ invoke, WorkflowRunConfig ]
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

To search Galaxy mailing lists use the unified search at:

Reply via email to