Question: Wrapping Webtools In Galaxy
gravatar for
7.3 years ago by
fcaramia.work50 wrote:


I'm trying write a Galaxy wrapper for Optimus Primer,

Is there any documentation or examples for wrapping web-tools ??


galaxy primer • 2.1k views
ADD COMMENTlink written 7.3 years ago by fcaramia.work50

Why would you want to wrap an existing web-based tool? The point of Galaxy is to make command-line tools easier to use by providing a web interface. You already have a web interface.

ADD REPLYlink modified 7.3 years ago • written 7.3 years ago by Neilfws48k

Yes, your point is valid, although it has been done (flymine, ratmine, etc), I guess the main advantage is to get the web-tool output into Galaxy for further analysis.

ADD REPLYlink written 7.3 years ago by fcaramia.work50
gravatar for Istvan Albert
7.3 years ago by
Istvan Albert ♦♦ 82k
University Park, USA
Istvan Albert ♦♦ 82k wrote:

It is possible but the way it works is very different from the typical tool wrapping. One would need to modify the original web interface so that it knows where to return the results. It works like this:

  1. A special tool needs to be installed that will redirect to a remote URL. When the user clicks this tool in Galaxy they are redirected to the web tool and behind the scenes a new (empty) data is created in the user's history that indicates that the tool is "runnning"
  2. the web tool (I will refer to it as server) will need to recognize a parameter called GALAXY_URL that is sent over by Galaxy via the request in step 1. This URL contains the location of the originating request plus a encrypted string that uniquely identifies the data that was generated. The server needs to associate this parameter with the current user and remember this url for the duration of the current user's session.
  3. the user browses the server's resources as they desire, this may be a multipage process
  4. at the moment when a file would be generated by the server then instead of producing it in the browser the server will need to perform a POST operation to Galaxy using that url that was stored in step 2. In addition the server needs to redirect to Galaxy. This is the moment when the data is actually deposited into Galaxy. Upon the post process more paramters can be sent to set some of the metadata associated with the history item.

A sounds a bit complicated but it takes all that. I actually came up with this protocol and implemented this way back many-many years ago, in 2006 most likely, the first source that this worked for was the BioMart. From a cursory examination it seems that this still works this way but I cannot guarantee it since I have not been involved with it for a number of years. See this for more details:

ADD COMMENTlink modified 7.3 years ago • written 7.3 years ago by Istvan Albert ♦♦ 82k

Thank you for your reply. The web-tool needs to support or "know about" galaxy then..

ADD REPLYlink written 7.3 years ago by fcaramia.work50
gravatar for Dan D
7.3 years ago by
Dan D7.0k
Dan D7.0k wrote:


Nice text overview

Good introductory video

These got me started. Once you're familiar with the basics, just dive into the Galaxy files. In the base Galaxy folder, there's a file called "tool_conf.xml" Open that up and you can find paths to tool wrappers. Then you can examine the wrapper of a tool that interests you.

Basically, simple tools can be wrapped with just an XML file. If you need something more sophisticated, you call a script (usually written in python) and pass parameters to it from your XML wrapper. That script constructs the command line for the tool and then executes it. I haven't seen this approach documented, but it's easy enough to figure out if you know a scripting language and take a few minutes to investigate. These secondary scripts are used with Picard and the tuxedo suite, among other tools.

Let me know if you need more info. I've written a ton of wrappers in Galaxy.

ADD COMMENTlink modified 7.3 years ago • written 7.3 years ago by Dan D7.0k

Thanks for the reply. I'm looking into a wrapping web-tools such as optimus primer or primer3 (the tool can only be accessed via http, as is not installed in the Galaxy environment), I'd like to know if galaxy is able to handle "get, post" etc. There are a few examples for it, but it seems such webtools support Galaxy access (ratmine, flymine)

ADD REPLYlink modified 7.3 years ago • written 7.3 years ago by fcaramia.work50

primer3 can be run from the command line.

ADD REPLYlink written 7.3 years ago by Pierre Lindenbaum126k

yes it can, it is just an example....

ADD REPLYlink written 7.3 years ago by fcaramia.work50
Please log in to add an answer.


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