This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Automating Gorilla And/Or Revigo Analysis

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

5 answers

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

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:

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

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.

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
};

Link broken for Gist! link

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.

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).

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.

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!

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.

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.

Here is an example that works with python 3

How do you embed a Gist in your post?

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

Log in to answer this question.