Re: [galaxy-dev] refresh_on_change is broken?
Hi, The Extract GFF Features doesn't use dynamic options and I don't think that's really the question here. Let me give an example of something that I do. I have the user select a file after which I, using dynamic_options, extract the column names and present those to the user with a select input parameter. With the selected column name I then present a new select input parameter with all the unique values of the selected column. To get this to work I am now using three pages since it is really dynamic, thus after each parameter (that uses dynamic_options) I need to make a new page to use the selected item, thus: <page> <param name="input_dataset" type="data" format="tabular, txt" label="Input dataset" /> </page> <page> <param name="colfilter" type="select" multiple="False" label="Select Filtering Column" dynamic_options="get_columns( input_dataset )" /> </page> <page> <param name="filter_values" type="select" multiple="True" label="Select Filtering Values" dynamic_options="get_filter( input_dataset, colfilter, 2 )" /> </page> .... This works fine, however it requires three pages which is deprecated. The documentation says 'use refresh_on_change' which is an undocumented feature (please (please!!) fix this!) with no examples anywhere on how to replace common <page> usage. So given above example (which is similar to what the original requester asked), where to place the refresh_on_change option to get it working? I've of course tried to place it within both dynamic_option parameters but this doesn't update the 'filter_values' parameter depending on the 'colfilter' parameter.. Kind regards, Marcel http://lists.bx.psu.edu/ </quote> Quoted from: http://gmod.827538.n3.nabble.com/refresh-on-change-is-broken-tp3786745p38529... ------------------------------ Message: 12 Date: Fri, 23 Mar 2012 18:41:11 -0400 From: Jeremy Goecks <jeremy.goecks@emory.edu> To: Greg Von Kuster <greg@bx.psu.edu> Cc: "Gubian, Sylvain" <Sylvain.Gubian@pmi.com>, Galaxy Dev <galaxy-dev@bx.psu.edu> Subject: Re: [galaxy-dev] refresh_on_change is broken? Message-ID: <302260D0-F8B3-4C09-AD59-AEB6239C8FC3@emory.edu> Content-Type: text/plain; charset="us-ascii" A final pointer: to see tools that use dynamic options, take a look at "Extract GFF features" and "Filter GFF dataset by feature count" Good luck, J. ________________________________ De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht. The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message.
Let me give an example of something that I do. I have the user select a file after which I, using dynamic_options, extract the column names and present those to the user with a select input parameter. With the selected column name I then present a new select input parameter with all the unique values of the selected column.
To get this to work I am now using three pages since it is really dynamic, thus after each parameter (that uses dynamic_options) I need to make a new page to use the selected item, thus:
<page> <param name="input_dataset" type="data" format="tabular, txt" label="Input dataset" /> </page> <page> <param name="colfilter" type="select" multiple="False" label="Select Filtering Column" dynamic_options="get_columns( input_dataset )" /> </page> <page> <param name="filter_values" type="select" multiple="True" label="Select Filtering Values" dynamic_options="get_filter( input_dataset, colfilter, 2 )" /> </page> ....
This works fine, however it requires three pages which is deprecated. The documentation says 'use refresh_on_change' which is an undocumented feature (please (please!!) fix this!) with no examples anywhere on how to replace common <page> usage.
refresh_on_change is not meant to be used explicitly in a tool's config file; it is an internal feature used by Galaxy to refresh pages as necessary, such as for conditionals. Also, dynamic_options has been deprecated in favor of the <options> tag.
So given above example (which is similar to what the original requester asked), where to place the refresh_on_change option to get it working?
If I'm reading your code right, this should be possible using the <options> tag only. First, select the dataset and then use something like for subsequent parameters: <options from_dataset="input_dataset"> <column name="name" index="0"/> <column name="value" index="0"/> <filter type="unique_value" name="unique" column="0"/> </options> Best, J.
participants (2)
-
Jeremy Goecks
-
Kempenaar, M (med)