Whatizit API

·

Whatizit is a text mining web service from the EBI. You post text, the service returns either XML or HTML with the recognised items (genes, proteins, Gene Ontology terms, chemical entities, etc) marked up. It's not close to 100% accurate, but it's probably the best available.

The service uses SOAP, so here's an example in PHP5:


$whatizit = new SoapClient('http://www.ebi.ac.uk/webservices/whatizit/ws?wsdl');
try{
  $result = $whatizit->contact(array(
    'pipelineName' => 'whatizitSwissprotGo2',
    'text' => $argv[1],
    'convertToHtml' => false,
    ));
} catch (SoapFault $exception) { return FALSE; }
if ($xml = simplexml_load_string($result->return)){
  $xml->registerXPathNamespace('z', 'http://www.ebi.ac.uk/z');
  $proteins = $xml->xpath('//z:uniprot');
}
print_r($proteins);

The text to process is passed in as a command line argument; the pipelineName is chosen from the list in this select box.