Webservices

Web service

The GPCRDB web service offers you a way to include the GPCRDB in your own software code.
For more information about webservices, look at this wikipedia article.

You can query the GPCRDB using the SOAP protocol.
At the moment there are a number of data retrieval functions available through this interface; you can retrieve families, proteins, sequences, residues and secondary structure elements. In the future, we will extend the webservice functionality to provide you with computational tools as well.

The WSDL is located here:
http://www.gpcr.org/7tm/webservice/?wsdl

Usage

Python

If you use python as a programming language, we strongly advise you to use suds (https://fedorahosted.org/suds/) to access the GPCRDB SOAP services. To get suds to work you need to do the following:

#import the suds client module
from suds import client

#create a client from the GPCRDB WSDL
GPCRDBClient = client.Client("http://www.gpcr.org/7tm/webservice/?wsdl")

#you can use this to get an overview of the methods and types you can use:
print GPCRDBClient

#retrieve a protein
GPCRDBClient.service.getProtein('adrb2_human')

Perl

#!/usr/bin/perl

use strict;
use warnings;

use XML::Compile::WSDL11;
use XML::Compile::SOAP11;
use XML::Compile::Transport::SOAPHTTP;

use Data::Dumper;

my $wsdl = XML::LibXML->new->parse_file('http://www.gpcr.org/7tm/webservice/?wsdl')
	or die "no WSDL";
my $proxy = XML::Compile::WSDL11->new($wsdl);
my $getProtein = $proxy->compileClient('getProtein');

my ($answer, $trace) = $getProtein->(proteinId => 'adrb2_human')
	or die "no protein\n";

if (defined $answer) {
	print Dumper($answer->{parameters}->{'protein'});
}

Workflows

The GPCRDB can be used from workflow management tools such as Taverna. We have prepared a number of example workflows that illustate a number of basic usages such as using the BLAST service, creating custom alignments and retrieving data types such as proteins.

You can find these workflows here http://www.myexperiment.org/tags/2003.html on the myExperiment web portal.