|
|||||||||
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 | |
---|---|
InputStream |
getAlignmentResults(String id,
RemotePairwiseAlignmentOutputProperties outputProperties)
Extracts the actual Blast report for given request id according to options provided in outputProperties
argument. |
String |
getEmail()
Get the email for QBlast. |
String |
getRemoteBlastInfo()
A simple method to check the availability of the QBlast service. |
String |
getTool()
Get the tool identifier for QBlast. |
boolean |
isReady(String id)
Wrapper method for isReady(String, long) , omitting unnecessary present property. |
boolean |
isReady(String id,
long present)
Checks for completion of request. |
String |
sendAlignmentRequest(int gid,
RemotePairwiseAlignmentProperties rpa)
Converts given GenBank GID to String and calls sendAlignmentRequest(String, RemotePairwiseAlignmentProperties) |
String |
sendAlignmentRequest(Sequence<Compound> seq,
RemotePairwiseAlignmentProperties rpa)
Converts given sequence to String and calls sendAlignmentRequest(String, RemotePairwiseAlignmentProperties) |
String |
sendAlignmentRequest(String query,
RemotePairwiseAlignmentProperties alignmentProperties)
Sends the Blast request via the Put command of the CGI-BIN interface. |
void |
sendDeleteRequest(String id)
Sends a delete request for given request id. |
void |
setEmail(String email)
Set the email for QBlast. |
void |
setTool(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 String getRemoteBlastInfo() throws Exception
Info
command to QBlast
Exception
- if unable to connect to the NCBI QBlast servicepublic String sendAlignmentRequest(Sequence<Compound> seq, RemotePairwiseAlignmentProperties rpa) throws Exception
sendAlignmentRequest(String, RemotePairwiseAlignmentProperties)
sendAlignmentRequest
in interface RemotePairwiseAlignmentService
Exception
public String sendAlignmentRequest(int gid, RemotePairwiseAlignmentProperties rpa) throws Exception
sendAlignmentRequest(String, RemotePairwiseAlignmentProperties)
Exception
public String sendAlignmentRequest(String query, RemotePairwiseAlignmentProperties alignmentProperties) throws Exception
alignmentProperties
(parameters PROGRAM and DATABASE are required).
sendAlignmentRequest
in interface RemotePairwiseAlignmentService
query
- : a String
representing a sequence or Genbank IDalignmentProperties
- : a RemotePairwiseAlignmentProperties
object representing alignment properties
Exception
- if unable to connect to the NCBI QBlast service or if no sequence or required parameters
PROGRAM and DATABASE are not setpublic boolean isReady(String id) throws Exception
isReady(String, long)
, omitting unnecessary present
property.
Exception
isReady(String, long)
public boolean isReady(String id, long present) throws Exception
isReady
in interface RemotePairwiseAlignmentService
id
- : request id, which was returned by sendAlignmentRequest
methodpresent
- : is not used, can be any value
Exception
- if the ID does not exist.public InputStream getAlignmentResults(String id, RemotePairwiseAlignmentOutputProperties outputProperties) throws 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 RemotePairwiseAlignmentService
id
- : request id, which was returned by sendAlignmentRequest
methodoutputProperties
- : an object specifying output formatting options
InputStream
of results
Exception
- if it is not possible to recover the resultspublic void sendDeleteRequest(String id)
id
- request id, as returned by sendAlignmentRequest
methodpublic void setTool(String tool)
tool
- the new identifierpublic String getTool()
public void setEmail(String email)
email
- the new emailpublic String getEmail()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |