Launching a workflow via API, multiple params for one tool

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Launching a workflow via API, multiple params for one tool

John Eppley
As far as I can figure out, the parameter map for running a workflow via the API is supposed to look like this:


{'blastn': {'param': 'evalue', 'value': '1e-06’}}

This doesn’t seem to allow for multiple parameters to a single tool. Is there a way to submit multiple parameters that I’m missing? For example:


{'blastn': {'param': 'evalue', 'value': '1e-06’, 'param': ‘identity_cutoff’, ‘value’: ’70’}}

…will not work. The dict() container doesn’t allow duplicate keys, it just overwrites the values.

Thanks
-john

___________________________________________________________
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/

smime.p7s (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Fwd: Launching a workflow via API, multiple params for one tool

John Eppley
As far as I can figure out, the parameter map for running a workflow via the API is supposed to look like this:


{'blastn': {'param': 'evalue', 'value': '1e-06’}}

This doesn’t seem to allow for multiple parameters to a single tool. Is there a way to submit multiple parameters that I’m missing? For example:


{'blastn': {'param': 'evalue', 'value': '1e-06’, 'param': ‘identity_cutoff’, ‘value’: ’70’}}

…will not work. The dict() container doesn’t allow duplicate keys, it just overwrites the values.

Thanks
-john


___________________________________________________________
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/

smime.p7s (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Launching a workflow via API, multiple params for one tool

Nicola Soranzo
In reply to this post by John Eppley
Il 2014-04-09 22:18 John Marmaduke Eppley ha scritto:

> As far as I can figure out, the parameter map for running a workflow
> via the API is supposed to look like this:
>
> {'blastn': {'param': 'evalue', 'value': '1e-06’}}
>
> This doesn’t seem to allow for multiple parameters to a single tool.
> Is there a way to submit multiple parameters that I’m missing? For
> example:
>
> {'blastn': {'param': 'evalue', 'value': '1e-06’, 'param':
> ‘identity_cutoff’, ‘value’: ’70’}}
>
> …will not work. The dict() container doesn’t allow duplicate keys,
> it just overwrites the values.

Hi John,
you are using the old and deprecated syntax, you can use instead:

{'blastn': {'evalue': '1e-06', 'identity_cutoff': 70}}

For more details look at _update_step_parameters() function
documentation:

https://bitbucket.org/galaxy/galaxy-dist/src/tip/lib/galaxy/webapps/galaxy/api/workflows.py

Or look at this complete example:

https://github.com/crs4/bioblend/blob/objects/docs/examples/w5_galaxy_api.py

Moreover, you may consider using the more high-level bioblend API:

http://bioblend.readthedocs.org/en/latest/

Best,
Nicola
___________________________________________________________
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 | Threaded
Open this post in threaded view
|

Re: Launching a workflow via API, multiple params for one tool

John Eppley
Ah, yes. That seems to have been added a couple months ago. The BioTeam appliance just missed that update by a week or two. I’ll go bug them. Thanks.

FWIW, I am using bioblend, and I got my example from the bioblend documentation:

-john



On Apr 10, 2014, at 5:42 AM, Nicola Soranzo <[hidden email]> wrote:

Il 2014-04-09 22:18 John Marmaduke Eppley ha scritto:
As far as I can figure out, the parameter map for running a workflow
via the API is supposed to look like this:

{'blastn': {'param': 'evalue', 'value': '1e-06’}}

This doesn’t seem to allow for multiple parameters to a single tool.
Is there a way to submit multiple parameters that I’m missing? For
example:

{'blastn': {'param': 'evalue', 'value': '1e-06’, 'param':
‘identity_cutoff’, ‘value’: ’70’}}

…will not work. The dict() container doesn’t allow duplicate keys,
it just overwrites the values.

Hi John,
you are using the old and deprecated syntax, you can use instead:

{'blastn': {'evalue': '1e-06', 'identity_cutoff': 70}}

For more details look at _update_step_parameters() function documentation:

https://bitbucket.org/galaxy/galaxy-dist/src/tip/lib/galaxy/webapps/galaxy/api/workflows.py

Or look at this complete example:

https://github.com/crs4/bioblend/blob/objects/docs/examples/w5_galaxy_api.py

Moreover, you may consider using the more high-level bioblend API:

http://bioblend.readthedocs.org/en/latest/

Best,
Nicola
___________________________________________________________
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/


___________________________________________________________
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/

smime.p7s (2K) Download Attachment