Hi,

I'm putting my own tool into Galaxy. Suppose I have an command line option
that is designated by a switch. Such as

$executable.py -a option input output

The "-a option" is an optional argument. I want to make sure when the option
is not given, "-a option" is entirely taken out.

I tried Cheetah script like this (this fails):

<command interpreter="python">executable #if $option != None
                                                 -a $option
                                                 #end if
                                                 $input $output</command>

This $option is suppose to be an optional tabular file and is written within
<param> as:
 <param name="option" type="data" format="tabular" label="XXX"
optional="true"/>

Somehow "-a None" is always printed (as seen from the server
print-to-screen). But I thought I checked explicitly for it to be anything
but None.

Then I realized that type($option)  <class
'galaxy.tools.DatasetFilenameWrapper'>. So I coerced both that and NoneType
into string prior to checking for equality. Is this the proper way to do it?

Timothy
___________________________________________________________
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:

  http://lists.bx.psu.edu/

Reply via email to