[galaxy-dev] Boolean options in toolconfigs: yes/no vs. give/omit flag.
Peter Cock
p.j.a.cock at googlemail.com
Mon Aug 22 21:47:29 EDT 2011
On Mon, Aug 22, 2011 at 5:29 PM, Samuel Lampa
<samuel.lampa at scilifelab.uu.se> wrote:
> Hi,
>
> I'm trying to parse the XML toolconfig format, for generating a lightweight
> command config wizard in an Eclipse based product.
>
> I wonder: Boolean parameters for some tools (such as the emboss/textsearch
> one), seems to allow always giving the parameter's flag at all times, and
> just change the following value between "yes" and "no" for these params,
> like:
>
> textsearch -caseinsensitive yes
> or
> textsearch -caseinsensitive no
>
> On the other hand, I guess there are many tools which tell such boolean
> options just by giving the flag itself, so it would by analogy be:
>
> textsearch -caseinsensitive
> or
> textsearch
>
> My question is, how can I see the difference between these two cases, in the
> tool config file? (Unfortunately I don't know any of the wrapped tools good
> enough to know where to look for a flag of the latter kind).
That will be hard - there are several ways to write such a wrapper in Galaxy.
e.g. a select showing the user text like "Case sensitive" and "Case insensitive"
with values "yes" and "no" where the cheetah template contains:
textsearch -caseinsensitive $case
Or, a boolean select where the values are again "yes" and "no" with the
same template. See for example "ntoa" in the BowTie wrapper, file:
tools/sr_mapping/bowtie_wrapper.xml
If the Unix tool expected a switch (present/absent) rather than an argument
with a value (yes/no) then you might use a select with two options "Case
sensitive" and "Case insensitive" with values "yes" and "no" where the
cheetah template contains:
textsearch
#if $case=="yes"
-caseinsensitive
#end if
Or, you might prefer to use values of "-caseinsensitive" and "" then the
cheetah becomes just:
textsearch $case
Again, the above hypothetical select parameter $case could be a boolean
parameter. e.g. See the "filter_query" option in the blastn wrapper, file
tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml
Peter
More information about the galaxy-dev
mailing list