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':
[2.3,'/tmp/kYzoax02.tmp']

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.

Thanks,
C
--- 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
         step.state.inputs.update(param_dict)
 
-
 __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:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to