A modular dynamic web page for bioinformatics searches

An example module for use with this page of bioinformatics web APIs. This one searches the PDB for the keyword $query and returns a list of results.

sub pdb{
    my $query = shift;
    my $service = SOAP::Lite->service('http://xml.nig.ac.jp/wsdl/SRS.wsdl');
    my $response = $service->searchSimple("[PDB-AllText:$query]");
 
    my $items;
    while ( $response =~ m/PDB\:(\w*)/g ){
        $items .= qq|<li><a href="http://pdbbeta.rcsb.org/pdb/explore.do?structureId=$1">$1</a></li>|;
    }
 
    my $result = qq|<ul>$items</ul>|;
    return $result;
}
 
bioinformatics_web_api_modules.txt · Last modified: 2007/08/20 13:27 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki