Question: Wrapping Webtools In Galaxy
1
gravatar for fcaramia.work
6.5 years ago by
fcaramia.work50 wrote:

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 • 2.0k views
ADD COMMENTlink written 6.5 years ago by fcaramia.work50
1

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 6.5 years ago • written 6.5 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 6.5 years ago by fcaramia.work50
3
gravatar for Istvan Albert
6.5 years ago by
Istvan Albert ♦♦ 80k
University Park, USA
Istvan Albert ♦♦ 80k 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:

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

ADD COMMENTlink modified 6.5 years ago • written 6.5 years ago by Istvan Albert ♦♦ 80k

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

ADD REPLYlink written 6.5 years ago by fcaramia.work50
2
gravatar for Dan D
6.5 years ago by
Dan D6.7k
Tennessee
Dan D6.7k wrote:

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 COMMENTlink modified 6.5 years ago • written 6.5 years ago by Dan D6.7k

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 6.5 years ago • written 6.5 years ago by fcaramia.work50
1

primer3 can be run from the command line.

ADD REPLYlink written 6.5 years ago by Pierre Lindenbaum119k

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

ADD REPLYlink written 6.5 years ago by fcaramia.work50
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 2.3.0
Traffic: 1138 users visited in the last hour