Shared a value for multiple set-at-runtime workflow parameters
Hi all, I have a multi-step workflow where I've marked some parameters to be set at run time (in this case, a minimum read length, used in two different workflow steps). I want to use the same parameter value in multiple tools, rather than give the user one prompt for each tool. Is this possible? Related to this, it would be nice to specify a default in the workflow (overriding any default in the tool wrapper), and give some caption text to the workflow level parameter. I guess some of this functionality would be related to any enhancement to make a workflow act like a tool (e.g. to combine subworkflows into larger workflows). Thanks, Peter
Peter- Just a quick response to your first question- you might want to give the workflow parameters feature a shot to see if it does what you're looking to do. Within the workflow editor, instead of setting a value to 'specify at runtime', use a variable tag in the format ${yourvariablename}. This variable can be reused in as many steps as you want in the workflow, and can also be used in the Rename Dataset action if you wanted to tag datasets by the parameter used. See the example from the January news brief for screenshots (https://bitbucket.org/galaxy/galaxy-central/wiki/Features/DevNewsBrief/2011_...). -Dannon On Mar 2, 2011, at 9:40 AM, Peter Cock wrote:
Hi all,
I have a multi-step workflow where I've marked some parameters to be set at run time (in this case, a minimum read length, used in two different workflow steps). I want to use the same parameter value in multiple tools, rather than give the user one prompt for each tool. Is this possible?
Related to this, it would be nice to specify a default in the workflow (overriding any default in the tool wrapper), and give some caption text to the workflow level parameter. I guess some of this functionality would be related to any enhancement to make a workflow act like a tool (e.g. to combine subworkflows into larger workflows).
Thanks,
Peter _______________________________________________ To manage your subscriptions to this and other Galaxy lists, please use the interface at:
On Wed, Mar 2, 2011 at 2:51 PM, Dannon Baker <dannonbaker@me.com> wrote:
Peter-
Just a quick response to your first question- you might want to give the workflow parameters feature a shot to see if it does what you're looking to do. Within the workflow editor, instead of setting a value to 'specify at runtime', use a variable tag in the format ${yourvariablename}. This variable can be reused in as many steps as you want in the workflow, and can also be used in the Rename Dataset action if you wanted to tag datasets by the parameter used. See the example from the January news brief for screenshots (https://bitbucket.org/galaxy/galaxy-central/wiki/Features/DevNewsBrief/2011_...).
-Dannon
Great - that seems to solve the core task I wanted to do :) I would say this isn't very intuitive or obvious... but once you know how it can be done it is pretty easy. Maybe some tooltip text would help? I'm also wondering about adding "Workflow Parameters" to the workflow menu (next to Edit Attributes, Layout, Save, Close), or simply adding them to the Workflow Attributes editor? That would also give somewhere to add a text caption to the new workflow parameter (the second part of my query). (I'm sure you have some ideas in house too) Thanks! Peter
On Wed, Mar 2, 2011 at 3:21 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
On Wed, Mar 2, 2011 at 2:51 PM, Dannon Baker <dannonbaker@me.com> wrote:
Peter-
Just a quick response to your first question- you might want to give the workflow parameters feature a shot to see if it does what you're looking to do. Within the workflow editor, instead of setting a value to 'specify at runtime', use a variable tag in the format ${yourvariablename}. This variable can be reused in as many steps as you want in the workflow, and can also be used in the Rename Dataset action if you wanted to tag datasets by the parameter used. See the example from the January news brief for screenshots (https://bitbucket.org/galaxy/galaxy-central/wiki/Features/DevNewsBrief/2011_...).
-Dannon
Great - that seems to solve the core task I wanted to do :)
I would say this isn't very intuitive or obvious... but once you know how it can be done it is pretty easy. Maybe some tooltip text would help?
I'm also wondering about adding "Workflow Parameters" to the workflow menu (next to Edit Attributes, Layout, Save, Close), or simply adding them to the Workflow Attributes editor? That would also give somewhere to add a text caption to the new workflow parameter (the second part of my query).
I've found that Galaxy seems quite happy to use variable names with spaces in them, e.g. ${Minimum read length (after any clipping)} or: ${Mismatches (0, 1 or 2)} That addresses my need to give some explanatory text. Peter P.S. I do like the color highlighting and live substitution of the workflow parameters into each tool step that uses them. Very slick!
On Wed, Mar 2, 2011 at 3:42 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
P.S. I do like the color highlighting and live substitution of the workflow parameters into each tool step that uses them. Very slick!
That was the good news. Now the bad news - two bug reports. Firstly if you clear the workflow parameter (leaving it empty), then the caption is used for the highlighted placeholders BUT only the first word is used, e.g. ${Minimum read length (after any clipping)} Initially the the placeholders show "Minimum read length (after any clipping)", and if you enter a value like "30" then "30" is shown. If you then edit the field to become empty, the placeholder now shows just "Minimum". Furthermore, if I leave my workflow parameters empty, and press execute, I get a traceback ending with: AttributeError: 'WorkflowStep' object has no attribute 'module' Since an empty value is valid for some tools for some parameters (e.g. optional text fields) I would have expected any error later - from the tools themselves if they don't like the empty value. Peter
On Mar 2, 2011, at 11:05 AM, Peter Cock wrote:
On Wed, Mar 2, 2011 at 3:42 PM, Peter Cock <p.j.a.cock@googlemail.com> wrote:
P.S. I do like the color highlighting and live substitution of the workflow parameters into each tool step that uses them. Very slick!
That was the good news. Now the bad news - two bug reports.
Firstly if you clear the workflow parameter (leaving it empty), then the caption is used for the highlighted placeholders BUT only the first word is used, e.g.
${Minimum read length (after any clipping)}
Initially the the placeholders show "Minimum read length (after any clipping)", and if you enter a value like "30" then "30" is shown. If you then edit the field to become empty, the placeholder now shows just "Minimum".
Furthermore, if I leave my workflow parameters empty, and press execute, I get a traceback ending with:
AttributeError: 'WorkflowStep' object has no attribute 'module'
Since an empty value is valid for some tools for some parameters (e.g. optional text fields) I would have expected any error later - from the tools themselves if they don't like the empty value.
Peter
Thanks for both the compliment and the bug reports, I should have these fixed shortly. I hadn't actually anticipated long strings being used as parameters, but it should definitely work, and I can see where it'd be useful for comments like in your situation! -Dannon
participants (2)
-
Dannon Baker
-
Peter Cock