Automate GeneTrail with iMacros

GeneTrail is a comprehensive web-based application to perform Gene Ontology and pathway analysis, with a user-friendly graphical interface. It is not possible, however, to access it programmatically, which can be cumbersome when processing more than a few datasets. It is nevertheless possible to automate interactions with the graphical interface using iMacros, which works as an add-on to web browsers such as Firefox.

iMacros is very simple to use:

  1. Once installed, open iMacros in Firefox.
  2. Click on “Record” and perform all the tasks you normally do on GeneTrail, including upload and download. Stop recording when done.
  3. The macro is now saved and you should see it in the iMacros panel. Right click on it and edit as follows:
    • Locate the name of the file to be uploaded and replace it by a new file name.
    • Add “WAIT SECONDS=120″ before the line starting with “ONDOWNLOAD”. If necessary, replace 120 with a number of seconds greater than the time GeneTrail takes to process results, so iMacros waits long enough before to try downloading.
    • Edit the line starting with “ONDOWNLOAD” to indicate the folder and file names (e.g. “ONDOWNLOAD FOLDER=/home/sebastien/imacrosresults FILE=result1.zip WAIT=YES”). Delete other lines starting with “ONDOWNLOAD”, if any.
  4. Click on play. To replay with different upload and download file names, edit the script as indicated above.

iMacros can also be called from the command line, and it is possible to automate further, both on Linux and Windows.

Advertisements