Question: Adding a new tool
0
gravatar for mike.thon
3.0 years ago by
mike.thon30
University of Salamanca, Spain
mike.thon30 wrote:

I have a new local install of Galaxy on my own server and I'm trying to define a new tool for a command line program. I'm following the Add Tool Tutorial and I'm at the point where I need to let my galaxy installation know about my new tool. in galaxy/config I copied tool_conf.xml.sample to tool_conf.xml. Then I edited this file and added the following block:

  <section name="MyTools" id="mTools">
    <tool file="hgtfinder/hgtfinder.xml" />
   </section>
</toolbox>

 

my tool and xml file are in galaxy/tools/hgtfinder. When I start up galaxy I don't see my new tool in the list. What did I do wrong?

Here is my hgtfinder.xml:

<tool id="hgt_finder" name="HGT Finder" version="0.1.0">
  <description>Find horizontally transferred genes</description>
  <command >hgt-finder/HGTFinder -d $nrBlast -s $selfBlast -t $taxId -o HGT -r 0.5</command>
  <inputs>
    <param format="tabular" name="nrBlast" type="data" label="BLAST to nr database"/>
    <param format="tabular" name="selfBlast" type="data" label="Self BLAST"/>
    <param name="taxId" type="integer" label="NCBI Taxonomy ID"/>
  </inputs>
  <outputs>
    <data format="tabular" name="output" />
  </outputs>

  <help>
    This tool finds HGT.
  </help>

</tool>
tools • 1.1k views
ADD COMMENTlink modified 3.0 years ago by Hotz, Hans-Rudolf1.8k • written 3.0 years ago by mike.thon30
3
gravatar for Hotz, Hans-Rudolf
3.0 years ago by
Switzerland
Hotz, Hans-Rudolf1.8k wrote:

Hi Mike

Just to be on the safe side, I would delete "integrated_tool_panel.xml" first, and then restart your server.

If the new tool still doesn't show up, then most likely you have an error in your  "hgtfinder.xml" file. Have a close look at any errors after you restart your server. In particular, check for the lines containing "Loading section:" and/or "Loaded tool id:"

 

Hans-Rudolf

 

 

ADD COMMENTlink written 3.0 years ago by Hotz, Hans-Rudolf1.8k

I deleted integrated_tool_panel.xml and restarted the server but my tool still does not appear in the tools list. Just to be sure, I'm expecting a heading to appear called "MyTools" under which should be my tool with the name "HGT Finder", right? I included my hgtfinder.xml file in my questions. It looks ok to me except perhaps the command line. I assume though that as long as its valid xml it should at least be displayed in the UI.

ADD REPLYlink written 3.0 years ago by mike.thon30

Yes indeed there is a problem with my xml file:

galaxy.tools.toolbox.base ERROR 2015-11-17 15:20:45,069 Error reading tool from path: hgtfinder/hgtfinder.xml
Traceback (most recent call last):
  File "/home/galaxy/galaxy/lib/galaxy/tools/toolbox/base.py", line 602, in _load_tool_tag_set
    tool = self.load_tool( os.path.join( tool_path, path ), guid=guid, repository_id=repository_id )
  File "/home/galaxy/galaxy/lib/galaxy/tools/toolbox/base.py", line 736, in load_tool
    tool = self.create_tool( config_file=config_file, repository_id=repository_id, guid=guid, **kwds )
  File "/home/galaxy/galaxy/lib/galaxy/tools/__init__.py", line 159, in create_tool
    tool = ToolClass( config_file, tool_source, self.app, guid=guid, repository_id=repository_id, **kwds )
  File "/home/galaxy/galaxy/lib/galaxy/tools/__init__.py", line 505, in __init__
    raise e
ValueError: The settings for the field named 'taxId' require a 'value' setting and optionally a default value which must be an integer

ADD REPLYlink written 3.0 years ago by mike.thon30
1
gravatar for Hotz, Hans-Rudolf
3.0 years ago by
Switzerland
Hotz, Hans-Rudolf1.8k wrote:

Hi Mike

 

try: 

 <param name="taxId" type="integer" value="0" label="NCBI Taxonomy ID"/>

see also:   https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#type_Attribute_Values_and_Dependent_Attributes

 

 

Hans-Rudolf

 

ADD COMMENTlink written 3.0 years ago by Hotz, Hans-Rudolf1.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 169 users visited in the last hour