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


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.5k views
ADD COMMENTlink modified 3.8 years ago by Martin Čech ♦♦ 4.9k • written 3.8 years ago by rlee0350
gravatar for Bjoern Gruening
3.8 years ago by
Bjoern Gruening5.1k
Bjoern Gruening5.1k wrote:


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:

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!


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

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.


ADD REPLYlink written 3.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 3.8 years ago • written 3.8 years ago by Martin Čech ♦♦ 4.9k
gravatar for marcoalbuquerque.sfu
3.8 years ago by
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!


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:

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.


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 ''           (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


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:

Here is all the possible tags for the xml code:


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


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.

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


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:

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.


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 3.8 years ago by Martin Čech ♦♦ 4.9k • written 3.8 years ago by marcoalbuquerque.sfu50

Great intro. Thanks for sharing!

ADD REPLYlink modified 3.8 years ago • written 3.8 years ago by Martin Čech ♦♦ 4.9k
gravatar for Martin Čech
3.8 years ago by
Martin Čech ♦♦ 4.9k
United States
Martin Čech ♦♦ 4.9k wrote:


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: and you can browse examples of some tools in here:

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 3.8 years ago by Martin Čech ♦♦ 4.9k
Please log in to add an answer.


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