Hello all,

I’m working on adding support to the Galaxy framework for datatypes in the 
constructive solid geometry (CSG) space and I have several working Galaxy tools 
and a visualization plugin that deal with 3d shapes in this environment.  All 
of this work will soon be contributed to open source.

For one of the tools, I need to provide 2 select lists on the tool form that 
are associated in such a way that when an option in select list 1 is chosen, 
the options in select list 2 are altered and re-rendered.  This behavior would 
probably use a combination of dynamic options and refresh_on_change between the 
2 associated select lists.

I’ve not seen a tool that does this precisely, so I’m hoping that if it is 
currently possible to do this within Galaxy tools, someone will point me to an 
example.

If it is not currently possible, I will contribute a PR for supporting it, but 
would like some input as to how it should be done.

Dynamic options are currently rendered using 4 approaches; from_file, 
from_dataset, from_parameter and from_data_table.  One or more of several 
filters can then be applied to the options to alter them if desired.  

Since these CSG tools involve new datatypes, I have flexibility into how the 
metadata elements are set up that are needed to render these 2 select lists.  A 
dictionary may work where the metadata element contents look like this:

{a: [‘1’, ‘2’], b: [‘3’, ‘4’] }

The options in select list 1 would be ‘a’ and ‘b’.  When ‘a’ is selected, 
select list 2 would have options ‘1’ and ‘2’, and when ‘b’ is selected, select 
list 2 would have options ‘3’ and ‘4’.

To support this approach, perhaps dynamic options could be enhanced to include 
a from_dict option.  There would be some complxity involved in associating the 
lists using refresh_on_change so that select list 2 is refreshed with the 
correct options when select list one is changed.  I haven’t yet worked out 
these details.

Also, using a dictionary will not keep order for the options, so perhaps a list 
of tuples would be better?

[ [ ‘a’, [‘1’, ‘2’]], [‘b’, [‘3’, ‘4’]]]

Can someone let me know if this is currently possible, and if so, an example 
tool that does it?  If it’s not possible, does the above approach seem 
reasonable, or is there a better way?

Thanks very much,

Greg Von Kuster
___________________________________________________________
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:
 https://lists.galaxyproject.org/ <https://lists.galaxyproject.org/>

To search Galaxy mailing lists use the unified search at:
 http://galaxyproject.org/search/mailinglists/ 
<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:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to