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-tp3786745p3852979.html -- Message: 12 Date: Fri, 23 Mar 2012 18:41:11 -0400 From: Jeremy Goecks jeremy.goe...@emory.edu To: Greg Von Kuster g...@bx.psu.edu Cc: Gubian, Sylvain sylvain.gub...@pmi.com, Galaxy Dev galaxy-...@bx.psu.edu Subject: Re: [galaxy-dev] refresh_on_change is broken? Message-ID: 302260d0-f8b3-4c09-ad59-aeb6239c8...@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. ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
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. ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
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. On Mar 22, 2012, at 12:15 PM, Greg Von Kuster wrote: It's always best to look at examples in the code base for technical details like this rather than the wiki. You probably will need a combination of a conditional constructor along with a select list item in your tooll There are many tools that include these types of constructors that refresh the page when a when condition is met. One example is the extract_genomic_dna.xml tool config, which includes the following tag sets. inputs param format=interval,gff name=input type=data label=Fetch sequences for intervals in/ param name=interpret_features type=select label=Interpret features when possible help=Only meaningful for GFF, GTF datasets. option value=yesYes/option option value=noNo/option /param conditional name=seq_source param name=index_source type=select label=Source for Genomic Data option value=cachedLocally cached/option option value=historyHistory/option /param when value=cached /when when value=history param name=ref_file type=data format=fasta label=Using reference file / /when /conditional param name=out_format type=select label=Output data type option value=fastaFASTA/option option value=intervalInterval/option /param /inputs Sorry, but I don't have the time to get too much more involved in this than I have - as always, I'm stretched as thin as can be. Good luck! On Mar 22, 2012, at 5:09 AM, Leandro Hermida wrote: Dear Greg, On Wed, Mar 21, 2012 at 3:20 PM, Greg Von Kuster g...@bx.psu.edu wrote: Leandro, For refresh_on_change to work you need a set of optional selections and a set of refresh_on_change values, so in your example, the type should probably be a select instead of data. You'll also need the select list options to be generated based on your history items (at least that's what I think you're attempt here), so your list of refresh_on_change values will be attributes of those history items. Greg Von Kuster Could you show an example of this functionality that you described? This is new to me I really apologize and I looked for things on the Galaxy wiki but couldn't find. How would one do the simple example I illustrated in this thread: inputs param type=data format=txt name=dataset label=Select a text file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs Where in the tool form if the user changes the first drop-down menu to select a different file of a particular format from their history it will cause a refresh of the page so that the dynamic_options function in the second menu can be re-executed using the new file name as a parameter then generating new options in this second menu? regards, Leandro On Mar 21, 2012, at 9:27 AM, Leandro Hermida wrote: Here's one example: inputs param type=data name=dataset refresh_on_change=true label=Select a file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs If the user changes their selection of data from their history it should refresh the page and call the dynamic options again to load the other select menu with the choices from the new file. Currently you have to do this with repeat or pages tags which is really cumbersome for the user in the UI or doesn't allow workflowing, respectively. Page should refresh automatically when dataset is changed and dynamic options are used. If not, it's a bug. Ok, not sure what this means, the above example I wrote doesn't work so is this a bug or is there another way to write the above example so that it will work? regards, Leandro ___ 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/ ___ 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/ ___ 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/ ___
Re: [galaxy-dev] refresh_on_change is broken?
Dear Greg, On Wed, Mar 21, 2012 at 3:20 PM, Greg Von Kuster g...@bx.psu.edu wrote: Leandro, For refresh_on_change to work you need a set of optional selections and a set of refresh_on_change values, so in your example, the type should probably be a select instead of data. You'll also need the select list options to be generated based on your history items (at least that's what I think you're attempt here), so your list of refresh_on_change values will be attributes of those history items. Greg Von Kuster Could you show an example of this functionality that you described? This is new to me I really apologize and I looked for things on the Galaxy wiki but couldn't find. How would one do the simple example I illustrated in this thread: inputs param type=data format=txt name=dataset label=Select a text file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs Where in the tool form if the user changes the first drop-down menu to select a different file of a particular format from their history it will cause a refresh of the page so that the dynamic_options function in the second menu can be re-executed using the new file name as a parameter then generating new options in this second menu? regards, Leandro On Mar 21, 2012, at 9:27 AM, Leandro Hermida wrote: Here's one example: inputs param type=data name=dataset refresh_on_change=true label=Select a file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs If the user changes their selection of data from their history it should refresh the page and call the dynamic options again to load the other select menu with the choices from the new file. Currently you have to do this with repeat or pages tags which is really cumbersome for the user in the UI or doesn't allow workflowing, respectively. Page should refresh automatically when dataset is changed and dynamic options are used. If not, it's a bug. Ok, not sure what this means, the above example I wrote doesn't work so is this a bug or is there another way to write the above example so that it will work? regards, Leandro ___ 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/ ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
It's always best to look at examples in the code base for technical details like this rather than the wiki. You probably will need a combination of a conditional constructor along with a select list item in your tooll There are many tools that include these types of constructors that refresh the page when a when condition is met. One example is the extract_genomic_dna.xml tool config, which includes the following tag sets. inputs param format=interval,gff name=input type=data label=Fetch sequences for intervals in/ param name=interpret_features type=select label=Interpret features when possible help=Only meaningful for GFF, GTF datasets. option value=yesYes/option option value=noNo/option /param conditional name=seq_source param name=index_source type=select label=Source for Genomic Data option value=cachedLocally cached/option option value=historyHistory/option /param when value=cached /when when value=history param name=ref_file type=data format=fasta label=Using reference file / /when /conditional param name=out_format type=select label=Output data type option value=fastaFASTA/option option value=intervalInterval/option /param /inputs Sorry, but I don't have the time to get too much more involved in this than I have - as always, I'm stretched as thin as can be. Good luck! On Mar 22, 2012, at 5:09 AM, Leandro Hermida wrote: Dear Greg, On Wed, Mar 21, 2012 at 3:20 PM, Greg Von Kuster g...@bx.psu.edu wrote: Leandro, For refresh_on_change to work you need a set of optional selections and a set of refresh_on_change values, so in your example, the type should probably be a select instead of data. You'll also need the select list options to be generated based on your history items (at least that's what I think you're attempt here), so your list of refresh_on_change values will be attributes of those history items. Greg Von Kuster Could you show an example of this functionality that you described? This is new to me I really apologize and I looked for things on the Galaxy wiki but couldn't find. How would one do the simple example I illustrated in this thread: inputs param type=data format=txt name=dataset label=Select a text file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs Where in the tool form if the user changes the first drop-down menu to select a different file of a particular format from their history it will cause a refresh of the page so that the dynamic_options function in the second menu can be re-executed using the new file name as a parameter then generating new options in this second menu? regards, Leandro On Mar 21, 2012, at 9:27 AM, Leandro Hermida wrote: Here's one example: inputs param type=data name=dataset refresh_on_change=true label=Select a file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs If the user changes their selection of data from their history it should refresh the page and call the dynamic options again to load the other select menu with the choices from the new file. Currently you have to do this with repeat or pages tags which is really cumbersome for the user in the UI or doesn't allow workflowing, respectively. Page should refresh automatically when dataset is changed and dynamic options are used. If not, it's a bug. Ok, not sure what this means, the above example I wrote doesn't work so is this a bug or is there another way to write the above example so that it will work? regards, Leandro ___ 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/ ___ 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/ ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
Maybe we don't understand the feature in the documentation, but this isn't the refresh_on_change functionality. In the Tophat tool XML there are no refresh_on_change=true attributes, you are talking about a conditional tag which when changing will refresh the page in order to expose different parts of a form depending on then value chosen, this is a different use case. The conditional tag has refresh_on_change added automatically and is used by Javascript accordingly. The feature we thought exists from the wiki docs is a utility refresh_on_change=true attribute that you can put on any input param tag which will cause the page to refresh with the changed state when you change the param. It's supposed to replace the deprecated pages tags. Unless there is undocumented functionality, refresh_on_change cannot be explicitly used: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax Once we started needing to make more complex form logic you realize that this is not just very useful but necessary. Here's one example: inputs param type=data name=dataset refresh_on_change=true label=Select a file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs If the user changes their selection of data from their history it should refresh the page and call the dynamic options again to load the other select menu with the choices from the new file. Currently you have to do this with repeat or pages tags which is really cumbersome for the user in the UI or doesn't allow workflowing, respectively. Page should refresh automatically when dataset is changed and dynamic options are used. If not, it's a bug. J. Does this feature I describe to replace the deprecated pages tags not exist or just isn't fully implemented yet? regards, Leandro Some questions that should shed light on your issues: *Does the Tophat tool refresh on the main server? If not, this is probably a browser issue. *Are you seeing any errors in the Javascript console? *Can you be more specific about what problems you're seeing and whether you can reproduce with known tools? Thanks, J. On Mar 20, 2012, at 9:28 AM, Leandro Hermida wrote: Hi everyone, Sorry to ping again, having the refresh_on_change functionality not working in Galaxy has us making tool forms in ways we really don't want to, no one needs to use refresh_on_change or am I the only one that finds it's broken? We've started to look at what Galaxy is trying to do, seems like you are using jQuery to bind a custom Javascript refresh_on_change function but when you look at that function it doesn't do any form reloading, maybe just the feature is unfinished? sincerely, Leandro On Wed, Feb 29, 2012 at 10:34 AM, Leandro Hermida soft...@leandrohermida.com wrote: Hello, Seems like the refresh_on_change functionality is broken in the latest galaxy-dist. If you apply it to an input parameter it doesn't seem to refresh the page when you change the selection of that parameter. Does anyone else also have the problem? regards, Leandro ___ 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/ ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
Dear Jeremy, On Wed, Mar 21, 2012 at 1:37 PM, Jeremy Goecks jeremy.goe...@emory.edu wrote: Maybe we don't understand the feature in the documentation, but this isn't the refresh_on_change functionality. In the Tophat tool XML there are no refresh_on_change=true attributes, you are talking about a conditional tag which when changing will refresh the page in order to expose different parts of a form depending on then value chosen, this is a different use case. The conditional tag has refresh_on_change added automatically and is used by Javascript accordingly. This is understood, we use conditionals all the time, just was trying to explain that conditionals are only for certain use cases when you need to expose/hide different form elements depending on changing of a parameter. Yet there are other use cases when you need refresh_on_change functionality and not a conditional. The feature we thought exists from the wiki docs is a utility refresh_on_change=true attribute that you can put on any input param tag which will cause the page to refresh with the changed state when you change the param. It's supposed to replace the deprecated pages tags. Unless there is undocumented functionality, refresh_on_change cannot be explicitly used: http://wiki.g2.bx.psu.edu/Admin/Tools/Tool%20Config%20Syntax Once we started needing to make more complex form logic you realize that this is not just very useful but necessary. Here's one example: inputs param type=data name=dataset refresh_on_change=true label=Select a file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs If the user changes their selection of data from their history it should refresh the page and call the dynamic options again to load the other select menu with the choices from the new file. Currently you have to do this with repeat or pages tags which is really cumbersome for the user in the UI or doesn't allow workflowing, respectively. Page should refresh automatically when dataset is changed and dynamic options are used. If not, it's a bug. Ok, not sure what this means, the above example I wrote doesn't work so is this a bug or is there another way to write the above example so that it will work? regards, Leandro J. Does this feature I describe to replace the deprecated pages tags not exist or just isn't fully implemented yet? regards, Leandro Some questions that should shed light on your issues: *Does the Tophat tool refresh on the main server? If not, this is probably a browser issue. *Are you seeing any errors in the Javascript console? *Can you be more specific about what problems you're seeing and whether you can reproduce with known tools? Thanks, J. On Mar 20, 2012, at 9:28 AM, Leandro Hermida wrote: Hi everyone, Sorry to ping again, having the refresh_on_change functionality not working in Galaxy has us making tool forms in ways we really don't want to, no one needs to use refresh_on_change or am I the only one that finds it's broken? We've started to look at what Galaxy is trying to do, seems like you are using jQuery to bind a custom Javascript refresh_on_change function but when you look at that function it doesn't do any form reloading, maybe just the feature is unfinished? sincerely, Leandro On Wed, Feb 29, 2012 at 10:34 AM, Leandro Hermida soft...@leandrohermida.com wrote: Hello, Seems like the refresh_on_change functionality is broken in the latest galaxy-dist. If you apply it to an input parameter it doesn't seem to refresh the page when you change the selection of that parameter. Does anyone else also have the problem? regards, Leandro ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
Leandro, For refresh_on_change to work you need a set of optional selections and a set of refresh_on_change values, so in your example, the type should probably be a select instead of data. You'll also need the select list options to be generated based on your history items (at least that's what I think you're attempt here), so your list of refresh_on_change values will be attributes of those history items. Greg Von Kuster On Mar 21, 2012, at 9:27 AM, Leandro Hermida wrote: Here's one example: inputs param type=data name=dataset refresh_on_change=true label=Select a file from you history / param type=select multiple=true name=dataset_values dynamic_options=get_options_from_file(dataset.file_name) / /inputs If the user changes their selection of data from their history it should refresh the page and call the dynamic options again to load the other select menu with the choices from the new file. Currently you have to do this with repeat or pages tags which is really cumbersome for the user in the UI or doesn't allow workflowing, respectively. Page should refresh automatically when dataset is changed and dynamic options are used. If not, it's a bug. Ok, not sure what this means, the above example I wrote doesn't work so is this a bug or is there another way to write the above example so that it will work? regards, Leandro ___ 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/ ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
Hi everyone, Sorry to ping again, having the refresh_on_change functionality not working in Galaxy has us making tool forms in ways we really don't want to, no one needs to use refresh_on_change or am I the only one that finds it's broken? We've started to look at what Galaxy is trying to do, seems like you are using jQuery to bind a custom Javascript refresh_on_change function but when you look at that function it doesn't do any form reloading, maybe just the feature is unfinished? sincerely, Leandro On Wed, Feb 29, 2012 at 10:34 AM, Leandro Hermida soft...@leandrohermida.com wrote: Hello, Seems like the refresh_on_change functionality is broken in the latest galaxy-dist. If you apply it to an input parameter it doesn't seem to refresh the page when you change the selection of that parameter. Does anyone else also have the problem? regards, Leandro ___ 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/
Re: [galaxy-dev] refresh_on_change is broken?
Leandro, refresh_on_change is used quite a bit throughout the tool UI and appears to work fine both on a local instance and on the public instance. E.g. look at Tophat and change settings from 'Use Defaults' to 'Full Parameter List' -- the refresh_on_change works on reload the tool with more parameters. Some questions that should shed light on your issues: *Does the Tophat tool refresh on the main server? If not, this is probably a browser issue. *Are you seeing any errors in the Javascript console? *Can you be more specific about what problems you're seeing and whether you can reproduce with known tools? Thanks, J. On Mar 20, 2012, at 9:28 AM, Leandro Hermida wrote: Hi everyone, Sorry to ping again, having the refresh_on_change functionality not working in Galaxy has us making tool forms in ways we really don't want to, no one needs to use refresh_on_change or am I the only one that finds it's broken? We've started to look at what Galaxy is trying to do, seems like you are using jQuery to bind a custom Javascript refresh_on_change function but when you look at that function it doesn't do any form reloading, maybe just the feature is unfinished? sincerely, Leandro On Wed, Feb 29, 2012 at 10:34 AM, Leandro Hermida soft...@leandrohermida.com wrote: Hello, Seems like the refresh_on_change functionality is broken in the latest galaxy-dist. If you apply it to an input parameter it doesn't seem to refresh the page when you change the selection of that parameter. Does anyone else also have the problem? regards, Leandro ___ 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/ ___ 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/