Hi Evan Yes, this is possible with "dynamic_options" e.g.: <tool ... <inputs> <param name="year" type="select" label="from which year" display="radio" refresh_on_change="true" > <option value="/2017" selected="true">2017</option> <option value="/2016">2016</option> <option value="/2015">2015</option> </param> <param name="file" type="select" label="select a run" display="radio" dynamic_options="ds_readFiles(year)"/> </inputs> <outputs> ... </outputs> <help> ... </help> <code file="more_code.py" /> </tool> The python function "ds_readFiles" is defined in a extra code file "more_code.py", which is stored in the same directory as the tool definition file. The function returns all files with a matching file name (i.e.year), and could look like: rDir = "/data/" def ds_readFiles(year): l = os.listdir(rDir) p = re.compile('^%s_[09]{4}_M[09]{5}_[09]'%year) l.sort() path = rDir filesoptions = [(s) for s in l if os.path.exists(path + s)] files = [(s,s,False) for s in filesoptions if p.match(s)] return files a similar case is also described here: http://dev.list.galaxyproject.org/Dynamic-Tool-Parameter-Lists-td4175828.htm... Hope this helps, Hans-Rudolf On 11/23/2017 06:02 PM, Evan Clark wrote:
Is it possible to execute a script within a tool xml confit to retrieve some data and append to the ui depending on the requested data. I.e if I wanted to get a list of files and provide them as select options before hitting the execute button.
--- Sent from VMware Boxer
___________________________________________________________ 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/