Automating Gorilla And/Or Revigo Analysis
5
7
Entering edit mode
8.6 years ago

I have a ranked list of genes for my organism and experiment of interest. I have many such experiments, however.

Is there a way to easily automate use of GOrilla and/or REViGO tools to generate analysis results; particularly, if I can run the tools locally, that would help me prevent putting unnecessary load on their servers.

Is this commonly done, or do people populate "faked-out", reverse-engineered web forms with wget or curl and retrieve results that way?

go • 8.3k views
ADD COMMENT
9
Entering edit mode
8.6 years ago
Stephen 2.8k

A local version of their tools would be optimal but Aaron Mackey here has written a script to do this:

ADD COMMENT
2
Entering edit mode

Thanks, this script worked very well.

After retrieving the ${id} value, curl or wget can be used to retrieve these eight files into their own sub-folder:

GOCOMPONENT.png
GOFUNCTION.png
GOPROCESS.png
GOResults.html
GOResultsCOMPONENT.html
GOResultsFUNCTION.html
GOResultsPROCESS.html
top.html

These results can be loaded by a local web-browser by loading GOResults.html, and they can be kept indefinitely.

Here are my modifications to this script, which put the GO analysis results in the folder specified with --outputDir:

ADD REPLY
1
Entering edit mode

Thanks for the script! Save me a lot of manual work. Here are few modifications of a couple of lines which I believe are not correct. I am not a Perl guy but it seems it's working better after the changes.

Line 80 should be

$mech->set_fields("background_file_name" => $background);

instead of

$mech->set_file("background_file_name" => $background);

Lines 110-113 should be

my $excelUri = "${GOrillaURL}/GOrilla/${id}/GO${page}.xls";
my $excelFn = "$outputDir/GO${page}.xls";
my $connected = eval {
    $mech->get($excelUri, ':content_file' => $excelFn);
    1
};

instead of

my $excel = "${GOrillaURL}/GOrilla/${id}/GO${page}.xls";
my $connected = eval {
    $mech->get($excel);
    1
};
ADD REPLY
0
Entering edit mode

this does not capture the Excel output. How can this be modified so the 3 excel files can be saved?

ADD REPLY
0
Entering edit mode

Perhaps I can help modify this to add a few more GETs, assuming I understand your question correctly. What are their filenames? I just haven't looked at this in some years, so filenames would be useful.

ADD REPLY
0
Entering edit mode

Link broken for Gist! linkĀ 

ADD REPLY
2
Entering edit mode
8.6 years ago
Ryan Dale 5.0k

For REVIGO, there's an API provided -- see http://revigo.irb.hr/invokeRevigoAndFillFields.html. But this is really just a mechanism for uploading the data. On the results pages they provide links to R scripts, but I think you'd have to screen-scrape to get these.

EDIT:

Using mechanize, it's actually pretty straightforward to get the R scripts -- here's a complete example that submits example data, downloads the R scripts for the molecular function treemap and scatter plot, and generates the PDFs.

ADD COMMENT
0
Entering edit mode

Thanks for that link. Unfortunately, it doesn't look like there's a way to retrieve the R script that makes the treemap (or even the data that go into making the treemap).

ADD REPLY
0
Entering edit mode

Thanks! The follow_link URLs in your script did not work and returned mechanize._mechanize.LinkNotFoundError errors, but after changing them from *?table=3 to *?table=1 I was able to get treemap and scatterplot PDF files.

ADD REPLY
0
Entering edit mode

I was almost imagining just automating the R script itself instead of scraping the R script that they provide, but then I remembered that they do GO term reduction and other things. Good post!

ADD REPLY
1
Entering edit mode
8.6 years ago
Woa ★ 2.9k

I wrote a script to get output from Revigo. Here's the link. I possibly parsed the raw output using Perl's HTML::Table, but can't remember now.

ADD COMMENT
0
Entering edit mode

Thanks for that link. As mentioned in the comment by Daler, unfortunately, it doesn't look like there's a way to retrieve the R script or data that make the treemap from the response HTML.

ADD REPLY
0
Entering edit mode
4.3 years ago

Here is an example that works with python 3

How do you embed a Gist in your post?

ADD COMMENT
0
Entering edit mode
4.3 years ago
EagleEye 7.2k

GeneSCF analysis with batch mode (multiple list in one go).

ADD COMMENT

Login before adding your answer.

Traffic: 1152 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