Question: How to Use a Dependency in a Custom Tool
0
gravatar for mccoykg
3.4 years ago by
mccoykg80
United States
mccoykg80 wrote:

Hi all. I've got a custom tool that relies on Biopython, and Biopython's installed under the "dependencies" folder. I've also got some lines in my code that try to tell Galaxy it needs to use Biopython (shown below) in my tool's xml file:

<requirements>
  <requirement type="package" version="1.65">biopython</requirement>
</requirements>

However, that doesn't seem to be enough to get the tool access to biopython. Biopython's documentation mentioned a file called "repository_dependencies.xml" that also needs to be edited, but that's for toolshed tools and not custom tools. I'm assuming I'm missing a parallel step required for custom tools, but I'm not sure what that would be. Thanks much.

dependencies • 1.1k views
ADD COMMENTlink modified 3.4 years ago by Bjoern Gruening5.1k • written 3.4 years ago by mccoykg80
1
gravatar for Bjoern Gruening
3.4 years ago by
Bjoern Gruening5.1k
Germany
Bjoern Gruening5.1k wrote:

You need to add a `tool_dependencies.xml` file into your package. For example this one: https://github.com/bgruening/galaxytools/blob/master/tools/augustus/tool_dependencies.xml but adjusted to biopython.

ADD COMMENTlink written 3.4 years ago by Bjoern Gruening5.1k

Thanks! I assume I'd be putting this in my myTools folder, right?

EDIT: I've tried this, and still get an error indicating that my tool can't find biopython. Currently my pathway to biopython is /home/galaxy/galaxy/dependencies/biopython, and my pathway to myTools which contains the tool dependent on biopython is /home/galaxy/galaxy/tools/myTools. I've put the tool_dependencies.xml file in the myTools folder and written it like so:

<?xml version="1.0"?>
<tool_dependency>
    <package name="myTools">
        <repository name="biopython"/>
    </package>
</tool_dependency>

ADD REPLYlink modified 3.4 years ago • written 3.4 years ago by mccoykg80

You need to specify the 'owner' as well. Please try to mimic the example above.

ADD REPLYlink written 3.4 years ago by Bjoern Gruening5.1k

I'll add that in. What would the owner be, my username when using galaxy?
 

ADD REPLYlink written 3.4 years ago by mccoykg80

According to: https://toolshed.g2.bx.psu.edu/view/biopython/package_biopython_1_65/ the owner is biopython. This is a ToolShed group maintaining this package.

ADD REPLYlink written 3.4 years ago by Bjoern Gruening5.1k

I've fixed up the tool_dependencies.xml file, but my tool still can't find biopython. Right now it reads:

<?xml version="1.0"?>
<tool_dependency>
  <package name="myTools">
    <repository name="package_biopython_1_61" owner="biopython"/>
  </package>
</tool_dependency>

Is there anything else that could be wrong with this?

ADD REPLYlink written 3.3 years ago by mccoykg80

Can you point me to your entire tool? Is is on github/bitbucket?

ADD REPLYlink written 3.3 years ago by Bjoern Gruening5.1k

It's not available online anywhere yet for security reasons; I'll try to list out the relevant pathways if that will help. Thanks for being so patient with this.

The custom tool is called calc_fitness.py and its corresponding xml file is calc_fitness.xml. It, along with other custom tools, are located in /home/galaxy/galaxy/tools/myTools. calc_fitness.py relies on biopython in that it uses the SeqIO module.

My tool_dependencies.xml file is also located in the myTools folder, and is written as I posted just above.

I have biopython version 1.61 located under /home/galaxy/galaxy/dependencies/biopython and called "1.61".

I hope that's helpful! Sorry it's not on github.

ADD REPLYlink written 3.3 years ago by mccoykg80

can you send it to me privately ...

ADD REPLYlink written 3.3 years ago by Bjoern Gruening5.1k

I'm afraid I can't... however, my server admin may have figured out a work-around where he installs biopython, so I think we're good. Thanks for all your help.

ADD REPLYlink written 3.3 years ago by mccoykg80
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: 171 users visited in the last hour