Question: Need help setting up a virtual environment to write a python wrapper from tool shed?
1
gravatar for rlee03
2.8 years ago by
rlee0350
United States
rlee0350 wrote:

Hi,

I was wondering if anyone knows how I can use ubuntu, python editor like komodo, and command line, with the galaxy toolshed to write a tool for our galaxy platform? 

My level of expertise is extremely novice. If you can be very clear or recommend a resource that's in basic english (like 3rd grade language), I would be grateful. I am working off a mac air. I do not have admin rights to galaxy, but perhaps I can make a clone of galaxy?

galaxy • 1.1k views
ADD COMMENTlink modified 2.8 years ago by Martin Čech ♦♦ 4.2k • written 2.8 years ago by rlee0350
3
gravatar for Bjoern Gruening
2.8 years ago by
Bjoern Gruening4.8k
Germany
Bjoern Gruening4.8k wrote:

Hi,

you can start developing Galaxy tools with any editor out there. All what you need is to write an XML file. You should test your tool, for this you need a Galaxy instance :)

You can start for example here: https://wiki.galaxyproject.org/Admin/Tools/AddToolTutorial

Or you can try to work on already existing tools and improve them:

If you have any question or need a concrete small example task let me know and we will get you started!

Bjoern

ADD COMMENTlink written 2.8 years ago by Bjoern Gruening4.8k

may you send me a concrete example (step by step ) of something that's already been done? And also list softwares that I need? The more examples = better :-). I'm a real novice. If there's a youtube video you can even recommend that would be great.

Thanks!!!!!!!!!!

ADD REPLYlink written 2.8 years ago by rlee0350

The link to the Galaxy Wiki that Bjoern provided has small and easy to understand examples of tools. Go and read about it. :)

ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by Martin Čech ♦♦ 4.2k
3
gravatar for marcoalbuquerque.sfu
2.8 years ago by
Canada
marcoalbuquerque.sfu50 wrote:

Hi rlee03,

I was new to Galaxy a few months back. I learned through the galaxy wiki's. 

But here is a brief to-do on how to make a tool!


CHECK IF TOOL ALREADY EXISTS:

Just to make sure we don't jump the gun, you should always check if the tool already exists in the galaxy toolshed or testtoolshed. This will save you alot of time and effort:

toolshed.g2.bx.psu.edu

testtoolshed.g2.bx.psu.edu

If the tool exists, ask your admin to add the tool to the galaxy instance you are working from. Otherwise follow the steps to creating your tool.


INSTALLING TOOL:

Wrapping an executable:

First you need to install your tool and keep track of any dependencies you needed when installing. In other words, install from the command line WITHOUT:

sudo apt-get install X

but rather:

wget 'tool.link'           (and then following the installation instructions)

Keep track of these links, they become useful when automating the installation of the tool into galaxy

Perl or Python tool:

Keep track of all the libraries required to run the tool


CREATE TOOL INTERFACE FILE:

Next you need to create the configuration for you python wrapper. This is the xml which will provide users with a graphical interface for running the tool on galaxy.
Galaxy tutorials on how to do this:

https://wiki.galaxyproject.org/Admin/Tools/AddToolTutorial

Here is all the possible tags for the xml code:

https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax

USE GITHUB BY RESPECTED USERS TO CREATE GOOD TOOLS:

I recommend searching the code base by the user bgruening on github, helps me out all the time.


CREATE TOOL INSTALLATION FILE:

This is the files which tells galaxy how to install the tool. So remember that list of dependencies you needed, you are going to incorporate them into this file.

https://wiki.galaxyproject.org/Admin/Config/ToolDependencies

Again, refer to github if you are having issues finding examples.


TEST TEST TEST:

Finally you need to test if the tool works. I recommend installing a personal instance if you will not be granted administrator rights to your galaxy instance. 

You can upload your tool to the testtoolshed, you can add the testtoolshed to the list of toolsheds you galaxy instance will install tools from. Follow the following tutorial:

https://wiki.galaxyproject.org/Admin/Tools/AddToolFromToolShedTutorial

Once you have tested the tool (you should test this tool not only on your personal instance but also the instance you lack admin access to), you can attempt to add the tool to the public galaxy toolshed.

The reason you should test on both is because you want to minimize the amount of hidden dependencies that weren't identified which you installed locally. In other words, if you have already have some of the requirements for a tool because they have been previously installed and are included in your PATH, galaxy will not be able to distinguish between these tools and those you are adding as requirements. So, best to just try on multiple galaxy instances if you lack a computer which has minimal binaries already installed.


GOOGLE:

You should be able to find all you need to create a tool online, I wish you luck!

Welcome to the galaxy community!

ADD COMMENTlink modified 2.8 years ago by Martin Čech ♦♦ 4.2k • written 2.8 years ago by marcoalbuquerque.sfu50

Great intro. Thanks for sharing!

ADD REPLYlink modified 2.8 years ago • written 2.8 years ago by Martin Čech ♦♦ 4.2k
2
gravatar for Martin Čech
2.8 years ago by
Martin Čech ♦♦ 4.2k
United States
Martin Čech ♦♦ 4.2k wrote:

Hello,

tools for Galaxy are not written in Python but rather in XML, explanation:

You basically need two things: the actual program you want Galaxy to run (like a Python script, or Perl, Ruby, Java etc.) and a Galaxy Tool (sometimes called wrapper). The Tool is basically an XML file that specifies how the form presented to the user within galaxy should look like and how it should map to the actual program calling. You can read a tutorial on how to write a tool here: https://wiki.galaxyproject.org/Admin/Tools/AddToolTutorial and you can browse examples of some tools in here: https://github.com/galaxyproject/tools-devteam/tree/master/tools

Publishing of a tool to the Tool Shed is a separate process. You don't need to use Tool Shed at all when you are starting to write a Galaxy Tool.

And yes, it would be smart to develop and test the tool within your own clone of Galaxy not used by users.

ADD COMMENTlink written 2.8 years ago by Martin Čech ♦♦ 4.2k
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: 97 users visited in the last hour