"when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options??
So I need to refresh on change....I see that if I have a conditional item in my form, this causes a refresh of the page and a (re)evaluation of my dynamic_options methods....so I could misuse this "feature". However, it seems that when I have a <conditional> I must have a <when> entry for every item in my select box. There is no "when else" option? Thanks, Pieter From: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] On Behalf Of Lukasse, Pieter Sent: woensdag 27 augustus 2014 22:37 To: galaxy-dev@lists.bx.psu.edu Subject: [galaxy-dev] refresh_on_change : is this a valid attribute? Any other ideas/options?? Hi, I'm trying to get a wrapper from someone else working and I found this "refresh_on_change" attribute in his select boxes which are filled using the dynamic_options feature: <param name="col_type" type="select" label="Select column type" refresh_on_change="true" display="radio" dynamic_options='get_column_type(library_file)' help="" /> <param name="polarity" type="select" label="Select polarity" refresh_on_change="true" display="radio" dynamic_options='filter_column(library_file,col_type)' help="" /> ... When searching the documentation/wiki I do not find a reference to this, but it would be a nice option to have ;) Question: is there any way I can force a refresh when the user selects another option from such a select box. As you can see in the example above, this is needed because the next select box has its dynamic options built up by a function that takes the value from the previous select (col_type - highlighted above) as an input parameter. Currently this tool only works by showing each select in its own <page> , which is a deprecated option and prevents the tool from being used in a workflow... :( Thanks for your help! Best regards, Pieter Lukasse Wageningen UR, Plant Research International Department of Bioinformatics (Bioscience) Wageningen Campus, Building 107, Droevendaalsesteeg 1, 6708 PB, Wageningen, the Netherlands T: +31-317481122; M: +31-628189540; skype: pieter.lukasse.wur http://www.pri.wur.nl<http://www.pri.wur.nl/>
On Fri, Aug 29, 2014 at 11:43 PM, Lukasse, Pieter <pieter.lukasse@wur.nl> wrote:
So I need to refresh on change....I see that if I have a conditional item in my form, this causes a refresh of the page and a (re)evaluation of my dynamic_options methods....so I could misuse this “feature”.
This is deliberate, although there has been talk of updating the conditional code to do the dependent parameters dynamically rather than server-side with a page refresh.
From your outline description, I think you should be using the Galaxy <conditional> tag.
However, it seems that when I have a <conditional> I must have a <when> entry for every item in my select box. There is no “when else” option?
I think you are right - I've asked in the past about this, e.g. this discussion which appears not to have been fully on the mailing list though: http://dev.list.galaxyproject.org/Multiple-values-in-lt-when-gt-tags-for-lt-... This probably deserves to be tracked with a Trello Card... Peter
Yes, adding a "<when else>" option would be nice. However, what I really would like to have is a way to tell in one select box which other select box(es) should be refreshed when its value is changed by the user. For example: <param name="cmb_col_type" type="select" label="Select column type" param_to_refresh_on_change="cmb_polarity" display="radio" dynamic_options='get_column_type(library_file)' help="" /> <param name="cmb_polarity" type="select" label="Select polarity" display="radio" dynamic_options='filter_column(library_file,cmb_col_type)' help="" /> So when cmb_col_type is changed, the dynamic_options of cmb_polarity are generated again by a new call to the function configured. I can create a Trello card, but I’m just wondering whether this is not already being planned by the team, especially with the Javascript/AJAX rework that is now planned/going on(?) for some time on the user interface? Regards, Pieter. -----Original Message----- From: Peter Cock [mailto:p.j.a.cock@googlemail.com] Sent: zaterdag 30 augustus 2014 0:58 To: Lukasse, Pieter Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options?? On Fri, Aug 29, 2014 at 11:43 PM, Lukasse, Pieter <pieter.lukasse@wur.nl<mailto:pieter.lukasse@wur.nl>> wrote:
So I need to refresh on change....I see that if I have a conditional
item in my form, this causes a refresh of the page and a
(re)evaluation of my dynamic_options methods....so I could misuse this “feature”.
This is deliberate, although there has been talk of updating the conditional code to do the dependent parameters dynamically rather than server-side with a page refresh. From your outline description, I think you should be using the Galaxy <conditional> tag.
However, it seems that when I have a <conditional> I must have a
<when> entry for every item in my select box. There is no “when else”
option?
I think you are right - I've asked in the past about this, e.g. this discussion which appears not to have been fully on the mailing list though: http://dev.list.galaxyproject.org/Multiple-values-in-lt-when-gt-tags-for-lt-... This probably deserves to be tracked with a Trello Card... Peter
Hm...and now I’m completely stuck because apparently a conditional cannot be set at runtime in a workflow...? Ideas anyone? Thanks, Pieter. From: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] On Behalf Of Lukasse, Pieter Sent: zaterdag 30 augustus 2014 14:22 To: 'Peter Cock' Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options?? Yes, adding a "<when else>" option would be nice. However, what I really would like to have is a way to tell in one select box which other select box(es) should be refreshed when its value is changed by the user. For example: <param name="cmb_col_type" type="select" label="Select column type" param_to_refresh_on_change="cmb_polarity" display="radio" dynamic_options='get_column_type(library_file)' help="" /> <param name="cmb_polarity" type="select" label="Select polarity" display="radio" dynamic_options='filter_column(library_file,cmb_col_type)' help="" /> So when cmb_col_type is changed, the dynamic_options of cmb_polarity are generated again by a new call to the function configured. I can create a Trello card, but I’m just wondering whether this is not already being planned by the team, especially with the Javascript/AJAX rework that is now planned/going on(?) for some time on the user interface? Regards, Pieter. -----Original Message----- From: Peter Cock [mailto:p.j.a.cock@googlemail.com] Sent: zaterdag 30 augustus 2014 0:58 To: Lukasse, Pieter Cc: galaxy-dev@lists.bx.psu.edu<mailto:galaxy-dev@lists.bx.psu.edu> Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options?? On Fri, Aug 29, 2014 at 11:43 PM, Lukasse, Pieter <pieter.lukasse@wur.nl<mailto:pieter.lukasse@wur.nl>> wrote:
So I need to refresh on change....I see that if I have a conditional
item in my form, this causes a refresh of the page and a
(re)evaluation of my dynamic_options methods....so I could misuse this “feature”.
This is deliberate, although there has been talk of updating the conditional code to do the dependent parameters dynamically rather than server-side with a page refresh. From your outline description, I think you should be using the Galaxy <conditional> tag.
However, it seems that when I have a <conditional> I must have a
<when> entry for every item in my select box. There is no “when else”
option?
I think you are right - I've asked in the past about this, e.g. this discussion which appears not to have been fully on the mailing list though: http://dev.list.galaxyproject.org/Multiple-values-in-lt-when-gt-tags-for-lt-... This probably deserves to be tracked with a Trello Card... Peter
Galaxy's handling of dynamic options has some restrictions for sure outlined here and it is true that conditional test parameters cannot be set at runtime in workflow execution (the workflow form doesn't have the ability to restructure itself based on the conditional the way the tool form does). Aysam has started work on the tool form rewrite and hopefully this will provide some opportunities for a greater amount of dynamism - but those dynamic_options present some problems for moving stuff to the client side - since they require a Python 'eval'. At any rate there is a lot of work to do - especially if the desired end game is to get such parameters to work with workflow execution. Sometimes one can get the same effect as the page construct by splitting the tool into two - one that generates a config file or something and one that actually performs the computation. This is an unsatisfying solution in many ways though. Anyway - I don't have any great ideas on this issue - I have created a Trello card for Peter's conditional ideas https://trello.com/c/Ud7uut7R (and to collect some other open ones). -John On Sat, Aug 30, 2014 at 8:42 AM, Lukasse, Pieter <pieter.lukasse@wur.nl> wrote:
Hm...and now I’m completely stuck because apparently a conditional cannot be set at runtime in a workflow...? Ideas anyone?
Thanks,
Pieter.
From: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] On Behalf Of Lukasse, Pieter Sent: zaterdag 30 augustus 2014 14:22 To: 'Peter Cock'
Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options??
Yes, adding a "<when else>" option would be nice. However, what I really would like to have is a way to tell in one select box which other select box(es) should be refreshed when its value is changed by the user. For example:
<param name="cmb_col_type" type="select" label="Select column type" param_to_refresh_on_change="cmb_polarity"
display="radio" dynamic_options='get_column_type(library_file)'
help="" />
<param name="cmb_polarity" type="select" label="Select polarity"
display="radio" dynamic_options='filter_column(library_file,cmb_col_type)'
help="" />
So when cmb_col_type is changed, the dynamic_options of cmb_polarity are generated again by a new call to the function configured. I can create a Trello card, but I’m just wondering whether this is not already being planned by the team, especially with the Javascript/AJAX rework that is now planned/going on(?) for some time on the user interface?
Regards,
Pieter.
-----Original Message----- From: Peter Cock [mailto:p.j.a.cock@googlemail.com] Sent: zaterdag 30 augustus 2014 0:58 To: Lukasse, Pieter Cc: galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options??
On Fri, Aug 29, 2014 at 11:43 PM, Lukasse, Pieter <pieter.lukasse@wur.nl> wrote:
So I need to refresh on change....I see that if I have a conditional
item in my form, this causes a refresh of the page and a
(re)evaluation of my dynamic_options methods....so I could misuse this “feature”.
This is deliberate, although there has been talk of updating the conditional code to do the dependent parameters dynamically rather than server-side with a page refresh.
From your outline description, I think you should be using the Galaxy <conditional> tag.
However, it seems that when I have a <conditional> I must have a
<when> entry for every item in my select box. There is no “when else”
option?
I think you are right - I've asked in the past about this, e.g.
this discussion which appears not to have been fully on the mailing list though:
http://dev.list.galaxyproject.org/Multiple-values-in-lt-when-gt-tags-for-lt-...
This probably deserves to be tracked with a Trello Card...
Peter
___________________________________________________________ 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/
Hi John, Thanks for the reply. I think that for the workflow it would be good to have the conditionals and dynamic options working at least in one of the places, i.e. either in the workflow editor (so that options can be chosen at design time) or in the workflow runner (so that options can be chosen at runtime). At this moment, neither of these really cover the functionality that you get with the normal tool form, which to me is not intuitive at all and a bit of a surprise (also surprised with myself that I only noticed this now ;). See also my screenshot showing that dynamic options are not presented in the workflow editor. So my initial proposal would be to at least show the dynamic options in the workflow design time, which would let the workflow design time tool functionality be the same as in the tool form, since the design time already supports restructuring itself based on conditionals for example. Best regards, Pieter. [cid:image001.jpg@01CFC76C.E5DEC110] -----Original Message----- From: John Chilton [mailto:jmchilton@gmail.com] Sent: dinsdag 2 september 2014 14:20 To: Lukasse, Pieter Cc: Peter Cock; galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options?? Galaxy's handling of dynamic options has some restrictions for sure outlined here and it is true that conditional test parameters cannot be set at runtime in workflow execution (the workflow form doesn't have the ability to restructure itself based on the conditional the way the tool form does). Aysam has started work on the tool form rewrite and hopefully this will provide some opportunities for a greater amount of dynamism - but those dynamic_options present some problems for moving stuff to the client side - since they require a Python 'eval'. At any rate there is a lot of work to do - especially if the desired end game is to get such parameters to work with workflow execution. Sometimes one can get the same effect as the page construct by splitting the tool into two - one that generates a config file or something and one that actually performs the computation. This is an unsatisfying solution in many ways though. Anyway - I don't have any great ideas on this issue - I have created a Trello card for Peter's conditional ideas https://trello.com/c/Ud7uut7R (and to collect some other open ones). -John On Sat, Aug 30, 2014 at 8:42 AM, Lukasse, Pieter <pieter.lukasse@wur.nl<mailto:pieter.lukasse@wur.nl>> wrote:
Hm...and now I’m completely stuck because apparently a conditional
cannot be set at runtime in a workflow...? Ideas anyone?
Thanks,
Pieter.
From: galaxy-dev-bounces@lists.bx.psu.edu<mailto:galaxy-dev-bounces@lists.bx.psu.edu>
[mailto:galaxy-dev-bounces@lists.bx.psu.edu] On Behalf Of Lukasse,
Pieter
Sent: zaterdag 30 augustus 2014 14:22
To: 'Peter Cock'
Cc: galaxy-dev@lists.bx.psu.edu<mailto:galaxy-dev@lists.bx.psu.edu>
Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE:
refresh_on_change : is this a valid attribute? Any other ideas/options??
Yes, adding a "<when else>" option would be nice. However, what I
really would like to have is a way to tell in one select box which
other select
box(es) should be refreshed when its value is changed by the user. For
example:
<param name="cmb_col_type" type="select" label="Select column type"
param_to_refresh_on_change="cmb_polarity"
display="radio"
dynamic_options='get_column_type(library_file)'
help="" />
<param name="cmb_polarity" type="select" label="Select polarity"
display="radio"
dynamic_options='filter_column(library_file,cmb_col_type)'
help="" />
So when cmb_col_type is changed, the dynamic_options of cmb_polarity
are generated again by a new call to the function configured. I can
create a Trello card, but I’m just wondering whether this is not
already being planned by the team, especially with the Javascript/AJAX
rework that is now planned/going on(?) for some time on the user interface?
Regards,
Pieter.
-----Original Message-----
From: Peter Cock [mailto:p.j.a.cock@googlemail.com]
Sent: zaterdag 30 augustus 2014 0:58
To: Lukasse, Pieter
Cc: galaxy-dev@lists.bx.psu.edu<mailto:galaxy-dev@lists.bx.psu.edu>
Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE:
refresh_on_change : is this a valid attribute? Any other ideas/options??
On Fri, Aug 29, 2014 at 11:43 PM, Lukasse, Pieter
<pieter.lukasse@wur.nl<mailto:pieter.lukasse@wur.nl>>
wrote:
So I need to refresh on change....I see that if I have a conditional
item in my form, this causes a refresh of the page and a
(re)evaluation of my dynamic_options methods....so I could misuse
this “feature”.
This is deliberate, although there has been talk of updating the
conditional code to do the dependent parameters dynamically rather
than server-side with a page refresh.
From your outline description, I think you should be using the Galaxy
<conditional> tag.
However, it seems that when I have a <conditional> I must have a
<when> entry for every item in my select box. There is no “when else”
option?
I think you are right - I've asked in the past about this, e.g.
this discussion which appears not to have been fully on the mailing
list
though:
http://dev.list.galaxyproject.org/Multiple-values-in-lt-when-gt-tags-f
or-lt-conditiona-gt-parameters-tc4659704.html#none
This probably deserves to be tracked with a Trello Card...
Peter
___________________________________________________________
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:
Pieter, Thanks for the detailed description of the problem. I have created a Trello card here - https://trello.com/c/H5u4HrC3. I think what you have laid out is reasonable - I am not sure how difficult it would be to implement but it sounds like a good first step. Not sure I will be able to find the time to work on it soon or that it is a tier 1 priority for the team - but it is definitely on my radar. -John On Wed, Sep 3, 2014 at 5:47 AM, Lukasse, Pieter <pieter.lukasse@wur.nl> wrote:
Hi John,
Thanks for the reply. I think that for the workflow it would be good to have the conditionals and dynamic options working at least in one of the places, i.e. either in the workflow editor (so that options can be chosen at design time) or in the workflow runner (so that options can be chosen at runtime). At this moment, neither of these really cover the functionality that you get with the normal tool form, which to me is not intuitive at all and a bit of a surprise (also surprised with myself that I only noticed this now ;). See also my screenshot showing that dynamic options are not presented in the workflow editor.
So my initial proposal would be to at least show the dynamic options in the workflow design time, which would let the workflow design time tool functionality be the same as in the tool form, since the design time already supports restructuring itself based on conditionals for example.
Best regards,
Pieter.
-----Original Message----- From: John Chilton [mailto:jmchilton@gmail.com] Sent: dinsdag 2 september 2014 14:20 To: Lukasse, Pieter Cc: Peter Cock; galaxy-dev@lists.bx.psu.edu Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE: refresh_on_change : is this a valid attribute? Any other ideas/options??
Galaxy's handling of dynamic options has some restrictions for sure outlined here and it is true that conditional test parameters cannot be set at runtime in workflow execution (the workflow form doesn't have the ability to restructure itself based on the conditional the way the tool form does).
Aysam has started work on the tool form rewrite and hopefully this will provide some opportunities for a greater amount of dynamism - but those dynamic_options present some problems for moving stuff to the client side - since they require a Python 'eval'. At any rate there is a lot of work to do - especially if the desired end game is to get such parameters to work with workflow execution.
Sometimes one can get the same effect as the page construct by splitting the tool into two - one that generates a config file or something and one that actually performs the computation. This is an unsatisfying solution in many ways though.
Anyway - I don't have any great ideas on this issue - I have created a Trello card for Peter's conditional ideas https://trello.com/c/Ud7uut7R (and to collect some other open ones).
-John
On Sat, Aug 30, 2014 at 8:42 AM, Lukasse, Pieter <pieter.lukasse@wur.nl> wrote:
Hm...and now I’m completely stuck because apparently a conditional
cannot be set at runtime in a workflow...? Ideas anyone?
Thanks,
Pieter.
From: galaxy-dev-bounces@lists.bx.psu.edu
[mailto:galaxy-dev-bounces@lists.bx.psu.edu <galaxy-dev-bounces@lists.bx.psu.edu>] On Behalf Of Lukasse,
Pieter
Sent: zaterdag 30 augustus 2014 14:22
To: 'Peter Cock'
Cc: galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE:
refresh_on_change : is this a valid attribute? Any other ideas/options??
Yes, adding a "<when else>" option would be nice. However, what I
really would like to have is a way to tell in one select box which
other select
box(es) should be refreshed when its value is changed by the user. For
example:
<param name="cmb_col_type" type="select" label="Select column type"
param_to_refresh_on_change="cmb_polarity"
display="radio"
dynamic_options='get_column_type(library_file)'
help="" />
<param name="cmb_polarity" type="select" label="Select polarity"
display="radio"
dynamic_options='filter_column(library_file,cmb_col_type)'
help="" />
So when cmb_col_type is changed, the dynamic_options of cmb_polarity
are generated again by a new call to the function configured. I can
create a Trello card, but I’m just wondering whether this is not
already being planned by the team, especially with the Javascript/AJAX
rework that is now planned/going on(?) for some time on the user interface?
Regards,
Pieter.
-----Original Message-----
From: Peter Cock [mailto:p.j.a.cock@googlemail.com <p.j.a.cock@googlemail.com>]
Sent: zaterdag 30 augustus 2014 0:58
To: Lukasse, Pieter
Cc: galaxy-dev@lists.bx.psu.edu
Subject: Re: [galaxy-dev] "when else" in <conditional> ? RE:
refresh_on_change : is this a valid attribute? Any other ideas/options??
On Fri, Aug 29, 2014 at 11:43 PM, Lukasse, Pieter
<pieter.lukasse@wur.nl>
wrote:
So I need to refresh on change....I see that if I have a conditional
item in my form, this causes a refresh of the page and a
(re)evaluation of my dynamic_options methods....so I could misuse
this “feature”.
This is deliberate, although there has been talk of updating the
conditional code to do the dependent parameters dynamically rather
than server-side with a page refresh.
From your outline description, I think you should be using the Galaxy
<conditional> tag.
However, it seems that when I have a <conditional> I must have a
<when> entry for every item in my select box. There is no “when else”
option?
I think you are right - I've asked in the past about this, e.g.
this discussion which appears not to have been fully on the mailing
list
though:
http://dev.list.galaxyproject.org/Multiple-values-in-lt-when-gt-tags-f
or-lt-conditiona-gt-parameters-tc4659704.html#none
This probably deserves to be tracked with a Trello Card...
Peter
___________________________________________________________
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:
participants (3)
-
John Chilton
-
Lukasse, Pieter
-
Peter Cock