On Wed, Sep 22, 2010 at 10:03 AM, Peter <peter@maubp.freeserve.co.uk> wrote:
On Tue, Sep 21, 2010 at 2:34 PM, Jesse Erdmann <jerdmann@umn.edu> wrote:
An easy way to do this is using conditionals and a select parameter. The select would have two (or more) options like "Default Options" and "Advanced Options". When "Advanced Options" is selected, then display the previously hidden options.
On Tue, Sep 21, 2010 at 8:13 PM, Jeremy Goecks <jeremy.goecks@emory.edu> wrote:
The Bowtie and Tophat wrappers--which are included in the Galaxy distribution--provide nice examples of this approach. J.
Thanks for the tip - it is a bit of a hack, but it will do the job :)
To keep this simple, I'm initially making one option semi-hidden, the dust argument for blastn which I set to either "yes" (default) or "no". Starting from something like this: <command>blastn ... -dust $filter_query</command> ... <param name="filter_query" type="boolean" label="Filter out low complexity regions (with DUST)" truevalue="yes" falsevalue="no" checked="true" /> I could make the dust option conditional like so: <command>blastn ... -dust $adv_opts.filter_query</command> ... <conditional name="adv_opts"> <param name="adv_opts_selector" type="select" label="Advanced Options"> <option value="basic" selected="True">Hide Advanced Options</option> <option value="advanced">Show Advanced Options</option> </param> <when value="basic"> <param name="filter_query" type="hidden" value="yes" /> </when> <when value="advanced"> <param name="filter_query" type="boolean" label="Filter out low complexity regions (with DUST)" truevalue="yes" falsevalue="no" checked="true" /> </when> </conditional> It took me a while to realise the template name had to be changed in the <command> definition to include the conditional name prefix. Looking at the examples people pointed to, for example bowtie_wrapper.xml, bwa_wrapper.xml, velvetg.xml or fastq_groomer.xml, they don't try and define default hidden values when in "basic" mode. Instead there is some "magic" in the <command> definition. Is that documented somewhere? It isn't covered in http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax Which approach is preferable and why? Peter