Making Connections to the Skypainter from Your Web Pages



Introduction

The SkyPainter is a tool that allows you to overlay lists of genes, proteins or small compounds on a graphical display of the pathways in Reactome - see the user guide for a full description. It works by sending a POST request to the SkyPainter, where identifiers and any associated values are transmitted as hidden parameters. Three parameters are required:

  • DB. This specifies the name of the Reactome database that you will be accessing. This will typically be "gk_current" if you are accessing our central web server (www.reactome.org).
  • SUBMIT. You should set this to 1.
  • QUERY. Contains the data you want to send. See below for information on the required format.

The Skypainter has two modes:

  • Identifiers mode. If you send simply a list of identifiers, a short statistical analysis will be presented, followed by a reaction map, showing reactions colored by number of genes/proteins/small compounds participating in the reaction. The format of the QUERY parameter in this case should be a newline separated list of identifiers.
  • Microarray mode. If you send a list of identifiers plus values, a reaction map will be shown, with reactions colored according to the mean expression level of all the genes/proteins/small compounds participating in the reaction. The QUERY parameter will need to contain a header line, plus one data line per identifier. The header line should start with a hash (#), followed by the term that you name your identifiers by (e.g. "Probeset"), followed by a space-separated list of experiment names (e.g. "10h 14h 18h 24h"). The data lines will contain an identifier followed by a space, followed by a space-separated list of values, e.g. "1053_at 8.04 7.14 6.70 6.79 7.47".

The POST request will need to be issued from within an HTML form. You will need to supply the following parameters to the form:

  • Action. Set this to: "http://www.reactome.org/cgi-bin/skypainter2"
  • Enctype. Set this to: "multipart/form-data"

You will find examples in the following section.

Working Directly with HTML

You can create raw HTML to send POST requests, e.g. from a CGI script. An example for HTML that sends a POST request to get an identifiers mode SkyPainter page might look like this:
<form method="post" action="http://www.reactome.org/cgi-bin/skypainter2" enctype="multipart/form-data" enctype="multipart/form-data" name="skypainter">
<input type="hidden" name="QUERY" value="143E_HUMAN
1C06_HUMAN
2AAB_HUMAN
2ABB_HUMAN
2B11_HUMAN
2B14_HUMAN
2B17_HUMAN
MCAT_HUMAN
"/>
<input type="hidden" name="DB" value="gk_current"  />
<input type="hidden" name="SUBMIT" value="1"  />
</form>
      
HTML for getting a microarray mode SkyPainter page might look like this:
<form method="post" action="http://www.reactome.org/cgi-bin/skypainter2" enctype="multipart/form-data" enctype="multipart/form-data" name="skypainter">
<input type="hidden" name="QUERY" value="#Probeset 10h_control 10h 14h 18h 24h
1053_at 8.040078 7.147358 6.706705 6.794622 7.475157
1729_at 6.869688 6.99104 7.129922 7.112222 7.04721
1861_at 6.437999 6.620092 6.20117 6.407735 5.717815
200000_s_at 9.381569 9.710802 9.874874 9.934639 9.495911
200002_at 12.555275 12.511045 12.564419 12.538642 12.439174
200003_s_at 12.401259 12.054083 12.275169 12.206342 12.015476
200005_at 9.609852 9.099299 9.73072 9.530097 9.194303
200012_x_at 12.486269 12.402275 12.302666 12.256543 12.282444
209531_at 6.703946 6.86502 6.53264"  />
<input type="hidden" name="DB" value="gk_current"  />
<input type="hidden" name="SUBMIT" value="1"  />
</form>
      

Working from a Perl CGI

If you are using the perl CGI module (available free from www.cpan.org) for creating web pages, you can quite easily make links to Reactome's SkyPainter. E.g, if you wanted to get an identifiers mode SkyPainter, your code might look something like this:
my $CGI = CGI->new();
my $out="";

# Your web page initialization stuff goes here

# Creates the form
my $value = "143E_HUMAN\n1C06_HUMAN\n2AAB_HUMAN\n2ABB_HUMAN";
my $action = "http://www.reactome.org/cgi-bin/skypainter2";
$out = $CGI->start_form(-name => 'skypainter', -method => 'POST', -action => $action, -enctype => "multipart/form-data");	
$out .= $CGI->hidden(-name => 'QUERY', -value => $value);
$out .= $CGI->hidden(-name => 'DB', -value => 'gk_current');
$out .= $CGI->hidden('SUBMIT',1);	
$out .= $CGI->end_form;

# Your web page building stuff goes here

# Creates the link
my $out = qq{<A ONCLICK="document.skypainter.submit(); return false">Reactome</A>};

# You finish off the web page here

$out .=  $CGI->end_html;

print $out;
      

If you have questions about the material on this page, or if you encounter problems when trying to implement the link, please contact us.