Hi!<br>
this a simple perl script using soap for getting and coloring genes involved in a kegg path :<br>
you specify the gene you want to see by giving it's geneID (genbank id see the example "$H" ).<br>
here i give an example for the "cbl" gene for human and there is also a GI for "jun" gene in mouse if you want to try it.<br>
the kegg identifier for genes is given by the sepcies code (hsa for homo sapiens) + ":" + GI (867) : e.g "hsa:867" for cbl.<br>
you can use this script in your cgi-bin by passing to it from a form
the needed parameter $H or $M and of course you can modify it in order
to be adapted to the species you want.<br>
as a result you will get links to two kinds of images (clickable and not).<br>
to run this code you should install all needed perl modules (CPAN : <a href="http://www.cpan.org/">http://www.cpan.org/</a> ) and of course the SOAP module.<br>
<br>
<br>
<br>
#! /usr/bin/env perl<br>
use SOAP::Lite;<br>
use CGI qw(:standard);<br>
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);<br>
print "Content-type: text/html\r\n\r\n";<br>
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', "\n";<br>
print "<html><head><title>Kegg test</title>\n";<br>
print "</head><body>\n";<br>
#GI number H for human and M for mouse<br>
#cbl gene<br>
my $H = 867;<br>
#jun gene (try $M = 16476 and $H = "")<br>
my $M = "";<br>
#print "$H : Human <br>";<br>
$wsdl = '<a href="http://soap.genome.jp/KEGG.wsdl">http://soap.genome.jp/KEGG.wsdl</a>';<br>
#set the soap service<br>
$serv = SOAP::Lite -> service($wsdl);<br>
$wsdl = '<a href="http://soap.genome.jp/KEGG.wsdl">http://soap.genome.jp/KEGG.wsdl</a>';<br>
#get the definition of the gene from kegg<br>
if ($H ) {<br>
print "$H : Human <br>";<br>
$keggID = $serv -> btit('"'."hsa:".$H.'"');<br>
} elsif ($M) {<br>
print "$M : Mouse <br>";<br>
$keggID = $serv -> btit('"'."mmu:".$M.'"');<br>
}<br>
@def = split(/ /,$keggID);<br>
#kegg id is now in $def[0]<br>
$genes = SOAP::Data->type(array => [$def[0]]);<br>
#set colors for the kegg graph<br>
$fg_list = SOAP::Data->type(array => ['gray', '#00ff00', 'blue']);<br>
$bg_list = SOAP::Data->type(array => ['#ff0000', 'yellow', 'orange']);<br>
#get pathways by genes<br>
$result = $serv -> get_pathways_by_genes($genes);<br>
<br>
foreach $hit (@{$result}) {<br>
print "$hit : <br>";<br>
#get web link to marked static pathways<br>
$colored = $serv -> mark_pathway_by_objects($hit, $genes);<br>
#get web link to clickable kegg pathways<br>
$link = $serv -> get_html_of_colored_pathway_by_objects($hit,$genes,$fg_list,$bg_list);<br>
#print links<br>
if ($colored or $link) {<br>
print "<b><u>"."<a
href=".'"'.$colored.'"'.">".$colored."</a></u></b>"
."<br>";<br>
print "<b><u>"."<a
href=".'"'.$link.'"'.">".$link."</a></u></b>"."<br>";<br>
}<br>
};<br>
print "Done! <br>";<br>
print "</body></html>\n";<br>
<br>