The answer for this is available here:

http://dev.list.galaxyproject.org/Question-about-using-dynamic-options-and-refresh-on-change-for-rendering-2-associated-select-lists-td4667950.html#none


> On Sep 20, 2015, at 9:56 PM, Greg Von Kuster <g...@bx.psu.edu> wrote:
> 
> Thanks Sam,
> 
> I’ll repost my original question to see if someone can provide an answer.
> 
> Greg Von Kuster
> 
>> On Sep 18, 2015, at 4:20 PM, Aysam Guerler <aysam.guer...@gmail.com 
>> <mailto:aysam.guer...@gmail.com>> wrote:
>> 
>> Hi Greg,
>> 
>> I am not sure which data source would be the most suitable for your use case 
>> (maybe someone else can help here) but either should work and refresh 
>> properly if filtered properly.
>> 
>> Thanks,
>> Sam
>> 
>> On Fri, Sep 18, 2015 at 11:02 AM, Greg Von Kuster <g...@bx.psu.edu 
>> <mailto:g...@bx.psu.edu>> wrote:
>> Hi Sam,
>> 
>> I have another related question that I’m hoping you can help with.  In my 
>> case, the dataset contains the information I need as the contents of the 
>> test_select_options.txt file, so that file is not static.  The values that 
>> are needed to provide the options in my select list 2 would have to come 
>> from the metadata generated for the dataset.  I investigted using the 
>> dynamic otions “from_file” approach, but looking at the current tools that 
>> use that approach (e.g., maf tools), it seems like it is not quite geared 
>> toward what I need.
>> 
>> Thans again!
>> 
>> Greg
>> 
>> 
>> 
>>> On Sep 18, 2015, at 10:41 AM, Greg Von Kuster <g...@bx.psu.edu 
>>> <mailto:g...@bx.psu.edu>> wrote:
>>> 
>>> Hi Sam,
>>> 
>>> Thanks for the pointer to the Trello card.  I noticed the card is kind of 
>>> old (I think it predates data tables), so I just wanted to confirm the 
>>> approach.  For my tool, should I use the existing from_file option for 
>>> dynamic options (call the file test_select_options.txt”) with the file 
>>> located in a tool-data directory within a TS repo?  The current TS install 
>>> process would then install test_select_options.txt into the 
>>> ~/shed_tool_data directory within the Galaxy root.  Is this still the 
>>> advised approach, or should the tool that requries test_select_options.txt 
>>> be of type “manage_data”?
>>> 
>>> Thanks!
>>> 
>>> Greg
>>> 
>>> 
>>>> On Sep 18, 2015, at 9:42 AM, Aysam Guerler <aysam.guer...@gmail.com 
>>>> <mailto:aysam.guer...@gmail.com>> wrote:
>>>> 
>>>> Hi Greg,
>>>> 
>>>> The tool form supports multiple dynamic fields which depend on each other. 
>>>> You may want to take a look at this: 
>>>> https://trello.com/c/NOmjJxCi/428-305-potential-bug-in-dynamic-options-filters
>>>>  
>>>> <https://trello.com/c/NOmjJxCi/428-305-potential-bug-in-dynamic-options-filters>.
>>>> 
>>>> Hope this helps,
>>>> Sam
>>>> 
>>>> On Fri, Sep 18, 2015 at 8:30 AM, Greg Von Kuster <g...@bx.psu.edu 
>>>> <mailto:g...@bx.psu.edu>> wrote:
>>>> 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/ <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/ <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