I’m in the process of developing an application that utilizes information from protein-protein interaction databases. One specific database I am working with is BIND, the Biomolecular Interaction Network Database. As my application will be looking at a large number of genes I had to figure out how to write an application that interacted with the database.
The solution I found was BIND SOAP, an API designed to help developers interface with BIND using either C, Perl, Java, or VB .NET. SOAP or the Simple Object Access Protocol provides a basic messaging framework which allows for communication between applications across the interenet.
After some research I decided that Perl was the best way to go as there was already a Perl module available for use with SOAP, conveninetly named SOAP::Lite. If you have the CPAN module installed on your system the best way to get the SOAP::Lite module on Linux systems is to start the CPAN shell:
[root]# perl -MCPAN -e shellOnce the shell is started, run:
cpan> install SOAP::LiteIf you are having problems installing the module or installing from another system you can go here [soaplite.com] for additional instructions.
Upon successful installion of the module you can start using the API as described here. Also on this page are some links to download simple client examples. For Perl, using the following code I was able to get a BIND SOAP service proxy:
my $service = SOAP::Lite
-> service(’http://soap.bind.ca/bind.wsdl’)
-> proxy(’http://soap.bind.ca/services/BINDSOAP’,
cookie_jar => HTTP::Cookies->new(ignore_discard => 1));To test if the connection is active or not you can run the accessor method isServiceAlive() on the $service object
$service->isServiceAlive()returning a 0 or 1 depending whether the service is alive or not.
The idSearch() is the main accessor method for searching through BIND taking the following form:
idSearch(id, idType, returnType)
Where id refers to the query you are searching for, idType for the type of id you are looking for (i.e. Entrez, Swissprot, BIND, etc), and returnType for how you want your results returned. For more information look at the BIND API. The following is an example BIND query:
$resultBean = $service->idSearch("13383","entrezgene","gipair");
$line = $resultBean->{’records’};
If you print this line you get the following mess of information:
BINDID,MolNameA,MolTypeA,GIA,GeneA,TaxName,MolNameB,MolTypeB,GIB,GeneB,TaxName,PMIDs
151914,"SAP97",protein,40254642,13383,Mus musculus,"DLG2",protein,18702315,23859,Mus musculus,12351654
151915,"SAP97",protein,40254642,13383,Mus musculus,"CASK",protein,6753276,12361,Mus musculus,11865057
316167,"SAP97",protein,40254642,13383,Mus musculus,"GluR1",protein,34328128,14799,Mus musculus,16007085
151888,"mLIN-7C",protein,6755973,22343,Mus musculus,"SAP97",protein,40254642,13383,Mus musculus,12351654
151890,"DLG3",protein,7949129,53310,Mus musculus,"SAP97",protein,40254642,13383,Mus musculus,12351654
130406,"KIF1B-alpha",protein,33469083,16561,Mus musculus,"SAP97",protein,40254642,13383,Mus musculus,12097473
258368,"Mapk12",protein,7305253,29857,Mus musculus,"Dlgh1",protein,40254642,13383,Mus musculus,15729360
Each return has column headers to prevent confusion. Specifically these column headers refer to a BIND id for the interaction pair and the Gene Symbol, Molecule type, NCBI’s GI number, Entrez ID, and Taxon ID for each gene in the pair. As you can tell one id query may return several lines of results. To handle this, I used Perl’s split functionto split the lines into an array and then used the Text::CSV module to easily split the comma separated results into another array, allowing for easy access to each field in the return results.
@split_line = split '\n', $line;
for $k (1 … (@split_line - 1)){
if ($csv->parse($split_line[$k])){
@field = $csv->fields;
That covers enough to get started using the BIND SOAP API, feel to leave comments if there are any questions.
0 Responses to “BIND and SOAP”