|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.biojava3.ws.alignment.qblast.NCBIQBlastService
public class NCBIQBlastService
Provides a simple way of submitting BLAST request to the QBlast service at NCBI.
NCBI provides a Blast server through a CGI-BIN interface. This service simply encapsulates an access to it by giving users access to get/set methods to fix sequence, program and database as well as advanced options.
The philosophy behind this service is to disconnect submission of Blast requests from collection of Blast results. This is done so to allow a user to submit multiple Blast requests while allowing recovery of the reports at a later time.
Presently, only blastall programs are accessible.
| Field Summary | |
|---|---|
static long |
WAIT_INCREMENT
Number of milliseconds by which expected job execution time is incremented if it is not finished yet. |
| Constructor Summary | |
|---|---|
NCBIQBlastService()
|
|
| Method Summary | |
|---|---|
java.io.InputStream |
getAlignmentResults(java.lang.String id,
RemotePairwiseAlignmentOutputProperties outputProperties)
Extracts the actual Blast report for given request id according to options provided in outputProperties
argument. |
java.lang.String |
getEmail()
Get the email for QBlast. |
java.lang.String |
getRemoteBlastInfo()
A simple method to check the availability of the QBlast service. |
java.lang.String |
getTool()
Get the tool identifier for QBlast. |
boolean |
isReady(java.lang.String id)
Wrapper method for isReady(String, long), omitting unnecessary present property. |
boolean |
isReady(java.lang.String id,
long present)
Checks for completion of request. |
java.lang.String |
sendAlignmentRequest(int gid,
RemotePairwiseAlignmentProperties rpa)
Converts given GenBank GID to String and calls sendAlignmentRequest(String, RemotePairwiseAlignmentProperties) |
java.lang.String |
sendAlignmentRequest(Sequence<Compound> seq,
RemotePairwiseAlignmentProperties rpa)
Converts given sequence to String and calls sendAlignmentRequest(String, RemotePairwiseAlignmentProperties) |
java.lang.String |
sendAlignmentRequest(java.lang.String query,
RemotePairwiseAlignmentProperties alignmentProperties)
Sends the Blast request via the Put command of the CGI-BIN interface. |
void |
sendDeleteRequest(java.lang.String id)
Sends a delete request for given request id. |
void |
setEmail(java.lang.String email)
Set the email for QBlast. |
void |
setTool(java.lang.String tool)
Set the tool identifier for QBlast. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long WAIT_INCREMENT
isReady(String, long) method will return false until at least this much time passes.
| Constructor Detail |
|---|
public NCBIQBlastService()
| Method Detail |
|---|
public java.lang.String getRemoteBlastInfo()
throws java.lang.Exception
Info command to QBlast
java.lang.Exception - if unable to connect to the NCBI QBlast service
public java.lang.String sendAlignmentRequest(Sequence<Compound> seq,
RemotePairwiseAlignmentProperties rpa)
throws java.lang.Exception
sendAlignmentRequest(String, RemotePairwiseAlignmentProperties)
sendAlignmentRequest in interface RemotePairwiseAlignmentServicejava.lang.Exception
public java.lang.String sendAlignmentRequest(int gid,
RemotePairwiseAlignmentProperties rpa)
throws java.lang.Exception
sendAlignmentRequest(String, RemotePairwiseAlignmentProperties)
java.lang.Exception
public java.lang.String sendAlignmentRequest(java.lang.String query,
RemotePairwiseAlignmentProperties alignmentProperties)
throws java.lang.Exception
alignmentProperties (parameters PROGRAM and DATABASE are required).
sendAlignmentRequest in interface RemotePairwiseAlignmentServicequery - : a String representing a sequence or Genbank IDalignmentProperties - : a RemotePairwiseAlignmentProperties object representing alignment properties
java.lang.Exception - if unable to connect to the NCBI QBlast service or if no sequence or required parameters
PROGRAM and DATABASE are not set
public boolean isReady(java.lang.String id)
throws java.lang.Exception
isReady(String, long), omitting unnecessary present property.
java.lang.ExceptionisReady(String, long)
public boolean isReady(java.lang.String id,
long present)
throws java.lang.Exception
isReady in interface RemotePairwiseAlignmentServiceid - : request id, which was returned by sendAlignmentRequest methodpresent - : is not used, can be any value
java.lang.Exception - if the ID does not exist.
public java.io.InputStream getAlignmentResults(java.lang.String id,
RemotePairwiseAlignmentOutputProperties outputProperties)
throws java.lang.Exception
outputProperties
argument.
If the results are not ready yet, sleeps until they are available. If sleeping is not desired, call this method
after isReady returns true
getAlignmentResults in interface RemotePairwiseAlignmentServiceid - : request id, which was returned by sendAlignmentRequest methodoutputProperties - : an object specifying output formatting options
InputStream of results
java.lang.Exception - if it is not possible to recover the resultspublic void sendDeleteRequest(java.lang.String id)
id - request id, as returned by sendAlignmentRequest methodpublic void setTool(java.lang.String tool)
tool - the new identifierpublic java.lang.String getTool()
public void setEmail(java.lang.String email)
email - the new emailpublic java.lang.String getEmail()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||