Wrapping Webtools In Galaxy
2
1
Entering edit mode
12.0 years ago

Hi,

I'm trying write a Galaxy wrapper for Optimus Primer, http://op.pgx.ca/

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

Thanks.

galaxy primer • 3.1k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
3
Entering edit mode
12.0 years ago

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:

https://bitbucket.org/galaxy/galaxy-dist/src/12fcd068b12eb844d7eded11bd70826c4275021c/tools/data_source/biomart.xml?at=default

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
2
Entering edit mode
12.0 years ago
Dan D 7.4k

Yes!

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 COMMENT
0
Entering edit mode

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 REPLY
1
Entering edit mode

primer3 can be run from the command line.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1361 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6