Hi Li,

Thanks for your support, tophat_wrapper.xml was a very good example and I can now build my command line using Cheetah syntax. 

We really appreciate the developers community involvement to help users understand how to use galaxy.

Have a good day 

2010/7/12 Kanwei Li <kanwei@gmail.com>
Hi Sébastien,

If you look in tools/ngs_rna/tophat_wrapper.xml you will see a good
example similar to what you are trying to do. Instead of generating a
long "cmd" string you can simply have if statements to naturally add
more arguments to the command. You also have a typo (use $chromo twice
instead of $start). Also I don't think the ucsc.py line should have a
#.

We don't have a forum, but you can search our mailing archives in
google: "site:http://lists.bx.psu.edu/pipermail/ cheetah".

-K

2010/7/12 Sébastien HARISPE <harispe.sebastien@gmail.com>:
> Hi,
> Thanks for your reply Li, I was under the impression that Cheetah syntax was
> reserved for conditional parameters use.
> Cheetah is not really simple to debug (Tricks ?).
> Can someone help me with the following command definition ?
>   <command interpreter="python">
>   #set $cmd = ''
>   #if $chromo != ''
>   #$cmd = ' $cmd -c $chromo '
>   #end if
>   #if $start != ''
>   #$cmd = ' $cmd -s $chromo '
>   #end if
>   #if $end != ''
>   #$cmd = ' $cmd -e $end '
>   #end if
>   #if $DB != ''
>   #$cmd = ' $cmd -d $DB '
>   #end if
>   #if $conf_file != ''
>   #$cmd = ' $cmd -f $conf_file '
>   #end if
>   # ucsc.py  $cmd -o $out -l $log -p $log_C -f  -u $useConf
>   </command>
>
> Error:
> /usr/bin/python: can't find '__main__.py' in
> '/xxxxx/galaxy/galaxy_dist/tools/'
> Is there a forum or another way to found old related posts ?
> Best regards
>
>
>
>
>
> 2010/7/9 Kanwei Li <kanwei@gmail.com>
>>
>> Hi Sébastien,
>>
>> You can use regular Cheetah syntax in our xml configs, like such:
>>
>> #if $source.source_select=="database" #blat_wrapper.py 0 $source.dbkey
>> $input_query $output1 $iden $tile_size $one_off
>>
>> #else #blat_wrapper.py 1 $source.input_target $input_query $output1
>> $iden $tile_size $one_off
>>
>> #end if
>>
>> The above was extracted from the wiki page you linked, although we
>> don't seem to have explicit Cheetah definitions
>>
>> -Kanwei
>>
>> 2010/7/9 Sébastien HARISPE <harispe.sebastien@gmail.com>:
>> > Hi,
>> > I am trying to integrate some tools into Galaxy but I have encountered
>> > some
>> > difficulties in attempting to understand how the XML tool definition
>> > works
>> > exactly ... despite the XML tag documentation available at
>> > http://bitbucket.org/galaxy/galaxy-central/wiki/ToolConfigSyntax .
>> > Imagine a case where the presence of certain arguments depends on:
>> > - its value e.g we don't want to include it if its value is undefined
>> >   - other arguments' values e.g if the value of x is greater than the y
>> > value we don't want to include the x argument on the command line
>> > How can I specify it using the XML definition?
>> > A simplified case:
>> > A tool needs arguments A and B or an input file F
>> > We want to propose two modes to configure it
>> > - [1] a basic mode where we can graphically set A and B values using
>> > fields
>> > such as text value...
>> > - [2] an advanced mode where we can specify a file containing complex
>> > configuration to upload
>> > tool command line:
>> > for [1] tool.py -A arg1 -B arg2
>> >    [2] tool.py -F confile
>> >
>> > I don't want to include the -F command line argument if -A and -B are
>> > defined
>> > I currently manage these cases using wrappers...quite boring
>> >
>> > Where can we find:
>> >        - advanced documentation for XML definition
>> >        - commented advanced examples
>> >        - related discussions
>> >
>> > Best regards
>> > Seb
>> > [sorry for the bad english]
>> > _______________________________________________
>> > galaxy-dev mailing list
>> > galaxy-dev@lists.bx.psu.edu
>> > http://lists.bx.psu.edu/listinfo/galaxy-dev
>> >
>> >
>
>