Ok, when I remove "interpreter = C++" from <command>, and keep it empty or 
write  "interpreter = "bash" instead, I have no more this error message. Galaxy 
says "The following job has been successfully added to the queue",and I can 
show its progression on the history.
Thank you Ross !

But now I have a new error message that I can't solve  :
An error occurred running this job: failure preparing job
Details are:
Traceback (most recent call last): File 
"/home/myName/work/galaxy-dist/lib/galaxy/jobs/runners/local.py", line 59, in 
run_job job_wrapper.prepare()
File "/home/myName/work/galaxy-dist/lib/galaxy/jobs/__init__.py", line 429, in 
prepare
    self.command_line = self.tool.build_command_line( param_dict ) 
File "/home/myName/work/galaxy-dist/lib/galaxy/tools/__init__.py", line 1971, 
in build_command_line
    command_line = fill_template( self.command, context=param_dict )
File "/home/myName/work/galaxy-dist/lib/galaxy/util/template.py", line 9, in 
fill_template
    return str( Template( source=template_text, searchList=[context] ) ) 
File 
"/home/myName/work/galaxy-dist/eggs/Cheetah-2.2.2-py2.7-linux-x86_64-ucs4.egg/Cheetah/Template.py",
 line 1004, in __str__
    return getattr(self, mainMethName)()
  File "cheetah_DynamicallyCompiledCheetahTemplate_1338392112_91_81444.py", 
line 83, in respond NotFound: cannot find 'HOME'

I've tried to put an erroneous path/to/myTool in <command> in order to see if 
my original path is right. It indeed gives me another error message saying "An 
error occurred running this job: /bin/sh: 1: path/to/myTool: not found" , which 
makes sense since the path is erroneous.

I've also tried to put some erroneous data in the XML file (for example wrong 
names in <param>) to see if it influences the error message, but I still have 
the same. (that is to say : NotFound: cannot find 'HOME')

With Hans' help, my XML file is bettered that way :

<tool id="mytool" name="My Tool">
   <description> description </description>
   <command > /home/myName/myToolRepository/bin/myTool
     -i = $genome_index
     -r = $input
     -k = $kmer_length
   </command>

   <inputs>
      <param name="genome_index" type="select" label="Genome index"> 
         <option value="E.coli"> /path/to/indexEcoli </option>
         <option value="Human"> path/to/indexHuman </option>
      </param>

      <param format="txt, raw, doc, fastq" name="input" type="data" 
label="Source File" help="Select a file"/>   

     <param name="kmer_length" type="integer" min="15" max="150" value="21" 
label="k-mer length"/>              
   </inputs>

   <outputs>
      <data format="sam" name="crac_outfile" label="crac outfile" />
   </outputs>
   <tests>
      <test>
      </test>
   </tests>
   <help>
   </help>
</tool>

Regards,
Marine



________________________________
 De : Hans-Rudolf Hotz <h...@fmi.ch>
À : Marine Rohmer <marine.roh...@yahoo.fr> 
Cc : "galaxy-dev@lists.bx.psu.edu" <galaxy-dev@lists.bx.psu.edu> 
Envoyé le : Mercredi 30 mai 2012 14h22
Objet : Re: Re : [galaxy-dev] Error executing tool: cannot find 'database'
 
Hi Marine

In addition to Ross' comment earlier, there are a few points in the xml 
I think they are wrong or at least I would code them differently - see 
my comments in between your text below

On 05/30/2012 12:32 PM, Marine Rohmer wrote:
> Hi Hans,
>
> Here is my XML file in a simplificated version (no <conditionnal>
> parameters) , -i -r and -k are the mandatory arguments of my tool,
> written in C++:
>
>
> <tool id="myTool" name="myTool">
>
> <description> the description </description>
>
> <command interpreter="C++">
> /home/myName/work/galaxy-dist/tools/NGStools/myTool
> -i="${genome_index}"
> -r="${input}"
> -k="${kmer_length}"
> -o="${output_name}"
> </command>
>

There is no variable ${genome_index}, ${input},${output_name}. You 
defined them as: "$i", "$r", and "$o" .

Hence, I would write:

    <command> /home/myName/work/galaxy-dist/tools/NGStools/myTool
      -i="$i"
      -r="$r"
      -k="$kmer_length"
      -o="$o"
    </command>cd

> <inputs>
> <param name="i" type="select" label="Genome index">
> <option value="Human"> path/to/Human </option>
> <option value="E.coli"> path/to/Escherichia coli </option>
> </param>
>
> <param format="txt" name="r" type="data" label="Source File"
> help="Select a file"/>
> <param format="raw" name="r" type="data" label="Source File"
> help="Select a file"/>
> <param format="doc" name="r" type="data" label="Source File"
> help="Select a file"/>
> <param format="fastq" name="r" type="data" label="Source File"
> help="Select a file"/>
>

I would write this in one line:

<param format="txt,raw,doc,fastq" name="r" type="data" label="Source 
File" help="Select a file"/>

Also, have you defined the 'raw' and the 'doc' format?

> <param name="kmer_length" type="integer" min="15" max="150" value="21"
> label="k-mer length"/>
>
>
> <param name="o" type="text" optional="true" label="Output name"/>
>
>
> </inputs>
>
> <outputs>
> <data format="sam" name="myTool_outfile" label="myTool on
> ${database.value_label}" />
> </outputs>
>

How about:

<data format="sam" name="myTool_outfile" label="myTool on $o" />

> <tests>
> <test>
> </test>
> </tests>
>
> <help>
>
>
>
> </help>
>
> </tool>
> </tool>
>

there is one "</tool>" too much



Hope this helps, Hans


>
>
> Regards,
> Marine
>
>
>
> ------------------------------------------------------------------------
> *De :* Hans-Rudolf Hotz <h...@fmi.ch>
> *À :* Marine Rohmer <marine.roh...@yahoo.fr>
> *Cc :* "galaxy-dev@lists.bx.psu.edu" <galaxy-dev@lists.bx.psu.edu>
> *Envoyé le :* Mercredi 30 mai 2012 11h42
> *Objet :* Re: [galaxy-dev] Error executing tool: cannot find 'database'
>
> Hi Marine
>
> Could you please provide the tool definition xml file. Otherwise it is
> going to be difficult to guess, what is going wrong
>
> Regards, Hans
>
>
> On 05/30/2012 11:10 AM, Marine Rohmer wrote:
>  > Hi everyone,
>  >
>  > I'm trying with all my best to add an NGS tool into my local Galaxy
>  > instance.
>  > I've added my tool in tool_conf.xml, and made a XML file with all the
>  > <command>, <param> etc... I think it's pretty ok, and everything is
>  > correctly displayed on the Galaxy interface.
>  >
>  > However, when I execute my tool, Galaxy says to me :
>  >
>  > Error executing tool: cannot find 'database'
>  >
>  >
>  > And in my shell, I can see :
>  >
>  > 127.0.0.1 - - [30/May/2012:10:47:01 +0200] "GET
>  > /tool_runner?tool_id=myTool HTTP/1.1" 200 -
>  > "http://localhost:8080/root/tool_menu"; "Mozilla/5.0 (X11; Ubuntu; Linux
>  > x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"
>  > galaxy.tools ERROR 2012-05-30 10:47:07,424 Exception caught while
>  > attempting tool execution:
>  > Traceback (most recent call last):
>  > File "/home/myName/work/galaxy-dist/lib/galaxy/tools/__init__.py", line
>  > 1345, in handle_input
>  > _, out_data = self.execute( trans, incoming=params, history=history )
>  > File "/home/myName/work/galaxy-dist/lib/galaxy/tools/__init__.py", line
>  > 1661, in execute
>  > return self.tool_action.execute( self, trans, incoming=incoming,
>  > set_output_hid=set_output_hid, history=history, **kwargs )
>  > File
>  > "/home/myName/work/galaxy-dist/lib/galaxy/tools/actions/__init__.py",
>  > line 333, in execute
>  > data.name = fill_template( output.label, context=params )
>  > File "/home/myName/work/galaxy-dist/lib/galaxy/util/template.py", line
>  > 9, in fill_template
>  > return str( Template( source=template_text, searchList=[context] ) )
>  > File
>  >
> "/home/myName/work/galaxy-dist/eggs/Cheetah-2.2.2-py2.7-linux-x86_64-ucs4.egg/Cheetah/Template.py",
>  > line 1004, in __str__
>  > return getattr(self, mainMethName)()
>  > File "DynamicallyCompiledCheetahTemplate.py", line 83, in respond
>  > NotFound: cannot find 'database'
>  > 127.0.0.1 - - [30/May/2012:10:47:07 +0200] "POST /tool_runner/index
>  > HTTP/1.1" 200 - "http://localhost:8080/tool_runner?tool_id=myTool";
>  > "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101
>  > Firefox/12.0"
>  >
>  > I'm a beginner in computer sciences, so I can't understand since over 1
>  > week what's happening ... Any idea what's wrong with this ?
>  > (I'm using Ubuntu LTS 12.04)
>  >
>  > All help will be very very appreciated !
>  >
>  > Thank you,
>  >
>  > Marine
>  >
>  >
>  > ___________________________________________________________
>  > 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/
>
>
>
> ------------------------------------------------------------------------
> *De :* Hans-Rudolf Hotz <h...@fmi.ch>
> *À :* Marine Rohmer <marine.roh...@yahoo.fr>
> *Cc :* "galaxy-dev@lists.bx.psu.edu" <galaxy-dev@lists.bx.psu.edu>
> *Envoyé le :* Mercredi 30 mai 2012 11h42
> *Objet :* Re: [galaxy-dev] Error executing tool: cannot find 'database'
>
> Hi Marine
>
> Could you please provide the tool definition xml file. Otherwise it is
> going to be difficult to guess, what is going wrong
>
> Regards, Hans
>
>
> On 05/30/2012 11:10 AM, Marine Rohmer wrote:
>  > Hi everyone,
>  >
>  > I'm trying with all my best to add an NGS tool into my local Galaxy
>  > instance.
>  > I've added my tool in tool_conf.xml, and made a XML file with all the
>  > <command>, <param> etc... I think it's pretty ok, and everything is
>  > correctly displayed on the Galaxy interface.
>  >
>  > However, when I execute my tool, Galaxy says to me :
>  >
>  > Error executing tool: cannot find 'database'
>  >
>  >
>  > And in my shell, I can see :
>  >
>  > 127.0.0.1 - - [30/May/2012:10:47:01 +0200] "GET
>  > /tool_runner?tool_id=myTool HTTP/1.1" 200 -
>  > "http://localhost:8080/root/tool_menu"; "Mozilla/5.0 (X11; Ubuntu; Linux
>  > x86_64; rv:12.0) Gecko/20100101 Firefox/12.0"
>  > galaxy.tools ERROR 2012-05-30 10:47:07,424 Exception caught while
>  > attempting tool execution:
>  > Traceback (most recent call last):
>  > File "/home/myName/work/galaxy-dist/lib/galaxy/tools/__init__.py", line
>  > 1345, in handle_input
>  > _, out_data = self.execute( trans, incoming=params, history=history )
>  > File "/home/myName/work/galaxy-dist/lib/galaxy/tools/__init__.py", line
>  > 1661, in execute
>  > return self.tool_action.execute( self, trans, incoming=incoming,
>  > set_output_hid=set_output_hid, history=history, **kwargs )
>  > File
>  > "/home/myName/work/galaxy-dist/lib/galaxy/tools/actions/__init__.py",
>  > line 333, in execute
>  > data.name = fill_template( output.label, context=params )
>  > File "/home/myName/work/galaxy-dist/lib/galaxy/util/template.py", line
>  > 9, in fill_template
>  > return str( Template( source=template_text, searchList=[context] ) )
>  > File
>  >
> "/home/myName/work/galaxy-dist/eggs/Cheetah-2.2.2-py2.7-linux-x86_64-ucs4.egg/Cheetah/Template.py",
>  > line 1004, in __str__
>  > return getattr(self, mainMethName)()
>  > File "DynamicallyCompiledCheetahTemplate.py", line 83, in respond
>  > NotFound: cannot find 'database'
>  > 127.0.0.1 - - [30/May/2012:10:47:07 +0200] "POST /tool_runner/index
>  > HTTP/1.1" 200 - "http://localhost:8080/tool_runner?tool_id=myTool";
>  > "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:12.0) Gecko/20100101
>  > Firefox/12.0"
>  >
>  > I'm a beginner in computer sciences, so I can't understand since over 1
>  > week what's happening ... Any idea what's wrong with this ?
>  > (I'm using Ubuntu LTS 12.04)
>  >
>  > All help will be very very appreciated !
>  >
>  > Thank you,
>  >
>  > Marine
>  >
>  >
>  > ___________________________________________________________
>  > 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/
>
>
___________________________________________________________
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