On Fri, Feb 15, 2013 at 4:57 PM, Greg Von Kuster <g...@bx.psu.edu> wrote:
> On Feb 15, 2013, at 11:45 AM, Peter Cock wrote:
>> Actually for the example I am working on, the motif.py script would be
>> the tool executable, called from motif.xml like this:
>> <command interpreter="python">motif.py $fasta_file $tabular_file</command>
>> i.e. A completely self contained Galaxy tool consisting of four files:
>> motif.xml - Galaxy tool definition
>> motif.txt - README file
>> motif.py - Python script which is the tool
>> motif.dat - Data file used by the Python script
>> I am hoping that no further XML configuration files are needed in
>> order to handle the data file.
>> Peter
> In this case, your motif.xml file can be configured with the following:
> <command interpreter="python">
>     motif.py $fasta_file $tabular_file
> </command>
> <requirements>
>     <requirement type="set_environment">MOTIF_DAT_PATH</requirement>
> </requirements>
> and your repository will need to include the following tool_dependencies.xml 
> file:
> <?xml version="1.0"?>
> <tool_dependency>
>     <set_environment version="1.0">
>         <environment_variable name="MOTIF_DAT_PATH" 
> action="set_to">$REPOSITORY_INSTALL_DIR</environment_variable>
>     </set_environment>
> </tool_dependency>

That seems overly complicated. Would I not be able to assume that
the motif.xml, motif.py, motif.dat etc are all in the same folder (then
I can just use a relative path to find the data file - nice and easy).

If not, how about simply defining $REPOSITORY_INSTALL_DIR within
the XML language so I can do this:

<command interpreter="python">motif.py $fasta_file $tabular_file

And/or defining $REPOSITORY_INSTALL_DIR as an environment variable
which I can then use in the script (be it Python, Perl, shell, etc)?


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:


Reply via email to