If you've a closer look at the
WSDL file describing the REPuter
webservice, you can see two pairs of methods belonging
together.
request
and response
request_orig and
response_orig
Bioinformatic programs often
perform computation on large data sets and therefore require
much CPU time. This can cause problems like http connection
timeouts (usually after 5 minutes) during online usage. To
avoid such problems when using REPuter WebService we use a
technique called
Request and Reply with polling based on
BiBiWS. First the client side (e.g. your program) requests a
REPuter job submitting the necessary data (parameter and data)
and gets an
id after the job is started. Afterwards the
client can request the result by calling the corresponding
response method with the
id returned earlier. If the
REPuter job is not finished, the user gets a status code with
an enhanced description of current status back (see
HOBIT status
codes for more information).
request
The request method gets three parameters as input - a parameter
array with key/value pairs as described in the following table
, a (multiple) sequence file in FASTA format and a email
address (optional) - and returns either a unique id or in case
of an error a fault message.
| key |
value |
description |
| sequencetype |
dna|protein|smap |
type of input sequences |
| smap |
String |
optional |
| direct |
true|false |
compute direct matches |
| palindromic |
true|false |
computes palindromic (reverse complemented)
matches |
| length |
> 7 |
minimal match length |
| hamming |
0..5 |
allowed hamming distance |
| edit |
0..5 |
allowed edit distance |
| best |
≤5000 |
show the best matches |
| content |
true|false |
show the alignment of matching sequences |
| identity |
60..100 |
minimum identity of match |
| evalue |
double |
maximum E-value of a match |
response
The response method gets the id returned by the
request method as input parameter and returns the calculated
result as EBI application xml document (http://www.ebi.ac.uk/schema/ApplicationResult.xsd
aware). The current version of the schema defines some tags as
"must have", which are not needed by REPuter:
- xml output is generated from REPuter output on the fly,
so the attribut total of tag hits contains -1
and NOT the real number of computed repeats
- Without switch content (see above table), the tags
querySeq, pattern and matchSeq contain
no sequence/pattern data
- If switch content is set (see above table) and the repeat
identity is 100%, only querySeq is returned to save space
(pattern and matchSeq contains no data)
request_orig
The request_orig method has the same parameter and
return value as the request method.
response_orig
The response_orig gets the id returned by the
request_orig method as input parameter returns the result as
original ascii text.
The example perl client implementation for both methods
request and
response is based on
SOAP::Lite.
REPuter_request
(download)
The implementation of the request method is quite simple. The
sequence data and all necessary parameters are hard coded in
the script - we search for all direct and palindromic repeats
of length 8 with hamming distance of 1. The returned id will be
printed to STDOUT.
REPuter_response
(download)
The response method gets the previous returned id and returns
an xml document containing the result or, if the job is not
finished yet, a statuscode with description.
sample run
>./REPuter_request.pl
ID - bibiwsserv_2005-03-02_123113_D0oFZ
>./REPuter_response.pl bibiwsserv_2005-03-02_123113_D0oFZ
Statuscode:soapenv:Server
Description:602: PreProcessing
>./REPuter_response.pl bibiwsserv_2005-03-02_123113_D0oFZ
Statuscode:soapenv:Server
Description:603: Processing: Pending
>./REPuter_response.pl bibiwsserv_2005-03-02_123113_D0oFZ
Statuscode:soapenv:Server
Description:604: Processing: Running
>./REPuter_response.pl bibiwsserv_2005-03-02_123113_D0oFZ
<?xml version="1.0"?>
<EBIApplicationResult xmlns="http://www.ebi.ac.uk/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ebi.ac.uk/schema/ApplicationResult.xsd">
<Header>
...