galaxy / galaxy-central
Main development repository for Galaxy. Active development happens here, and this repository is thus intended for those working on Galaxy development. See http://bitbucket.org/galaxy/galaxy-dist/ for a more stable repository intended for end-users.
$ hg clone http://bitbucket.org/galaxy/galaxy-central/
Adding tools to GALAXY
(Watch Screencast)
0. Write and test your tool outside GALAXY:
Suppose one has written a simple PERL script (called toolExample.pl) for computing the GC content of a sequence in the FASTA format, which looks like this:
To integrate this tool into GALAXY we will follow these steps:
1. Put tool into GALAXY's tools directory:
To begin the tool integration process we need to add our PERL script to the tools/ directory, where all tool-related files are stored. In this example we will create a new subdirectory called myTools within tools/. So cd to your GALAXY installation and type these commands:
Now one needs to copy the script (in this case toolExample.pl) into the tools/myTools/ directory.
2. Create Tool Definition File:
At this point toolExample.pl resides within the tools/myTools/ directory, but GALAXY still does not know how to run this tool. To let GALAXY know the execution details of our new tool, we need to write a tool configuration file, which, in this case, will be called toolExample.xml. For this particular example open a text editor of your choice and create the toolExample.xml file within the tools/myTools directory. This file looks like this:
Note how this file specifies command line parameters, links them to input and output, and provides help information using the restructured text format. Once you are done, the tools/myTools directory will contain two files toolExample.pl and toolExample.xml.
3. Make GALAXY aware of the new tool:
Now the tool and its configuration file are ready. The final step makes GALAXY aware of the new tools. GALAXY knows about installed tools (and also what to display on the left pane) from the tool_conf.xml tool-registry file. Thus, letting GALAXY know about our new tool is as easy as adding these lines to the tool_conf.xml file located in the root directory of the GALAXY distribution:
5. Start it up:
At this point, start Galaxy by typing sh run.sh from within GALAXY's root directory and point your browser to http://localhost:8080. The interface of the new tool will look like this:

Note the correspondence between elements of the toolExample.xml file (Step 2) and the interface elements shown above. The "Compute GC for" dropdown reads "no data has the proper type" because the history pane contains no data in the FASTA format (it is empty).
This revision is from 2010-02-06 06:34
