Retrieving Results Using Blast Soap Api
1
0
Entering edit mode
11.9 years ago
Reyhaneh ▴ 530

Hi ;

I have a problem with using Blast SOAP API. Previously, I used the downloadable version of blast in which I balstp against PDB using the following command line:

"blasp.exe -query input.txt -db pdbaa -evalue 0.01 -out output.txt"

Now I am moving to using the SOAP API (in C# language). I query using the following method using Blast4queuesearchrequestlite:

        public static string SubmitSearchLite(){
        Blast4queuesearchrequestlite blreq = new Blast4queuesearchrequestlite();
        blreq.databasename = "pdb";
        blreq.query = @">MyData KKAVINGEQIRSISDLHQTLKKELALPEYYGENLDALWDCLTGWVEYPLVLEWRQFEQSKQLTENGAESVLQVFREAKAEGADITIIL"
        blreq.options = new Blast4queuesearchrequestliteOptions();
        blreq.options.Blast4optionslite = new Blast4optionslite();    
        blreq.options.Blast4optionslite.task = "blastp";
        blreq.options.Blast4optionslite.options = new Blast4optionsliteOptions();
        blreq.options.Blast4optionslite.options.Blast4commonoptions = new Blast4commonoptions();
        blreq.options.Blast4optionslite.options.Blast4commonoptions.evalue = 0.01;

        Blast4queuesearchreply reply = m_WebService.SubmitSearchLite(blreq);
        x_HandleVerboseOutput(blreq, reply);}

My first problem is that this works but the evalue is not working. It returns all the proteins with any evalues up to 10.(which is the default).

Then, I try to get the results as below:

  public static void GetResults(String RID)
        {
            Blast4getsearchresultsrequest blreq = new Blast4getsearchresultsrequest();
            blreq.requestid = RID;
            Blast4getsearchresultsreply reply = m_WebService.GetSearchResults(blreq);
            x_HandleVerboseOutput(blreq, reply);
            const String fname = @"results.xml";
            x_SerializeAsXml(fname, reply);
        }

My second problem is that, what I get as result is an XML which does not contain any information about the PDB codes of the results in hit table: such as which i used to get with command line:

 pdb|1A19|A  Chain A, Barstar (Free), C82a Mutant >pdb|1A19|B Chai...   182    3e-047 
 pdb|3DA7|C  Chain C, A Conformationally Strained, Circular Permut...   181    1e-046 
 pdb|1AY7|B  Chain B, Ribonuclease Sa Complex With Barstar >pdb|1B...   180    1e-046

Can you please guide me on these 2 problems: 1) setting the evalue in query 2) Retrieving the hit table (with pdb codes as result.)

Thanks;

blast api protein • 3.1k views
ADD COMMENT
0
Entering edit mode

Look at Blast inside Biopython.

ADD REPLY
1
Entering edit mode

The problem is that I have a huge program in C# and in one part i am using Blast. that is why i want to work in C#.

ADD REPLY
0
Entering edit mode
11.6 years ago
Hamish ★ 3.3k

Having played with the NCBI's SOAP API for BLAST, I think I see what is going on. The issue with an E-value on the initial search being ignored looks to be a change in the service (see "Setting E-Value In Blast") and I suspect has something to do with NCBI wanting to be able to use reformatting and filtering of the results to handle thresholding. So you would run a BLAST which would use an E-value threshold of 10.0, and in the results you filter down to the specific hits of interest by using a lower E-value threshold for display, while still having the option of more hits if required.

The results issue is a bit more problematic. From the documentation it appears that the BLAST SOAP API is based on the protocol used by BLAST to perform remote queries. This is designed to interface with the internals of the BLAST programs, so they handle display/output. As a consequence, the interface does not work in the way you would normally expect.

For basic BLAST usage this API does not appear to be a good fit. You would likely be better off looking at alternative BLAST services providing access to the features and databases you require. For example:

  1. QBLAST URL API: the traditional NCBI BLAST service API

  2. EMBL-EBI's Sequence Similarity Search web services: a range of sequence searching methods across databases provided by EMBL-EBI (includes PDB) with both REST and SOAP based services.

  3. Other BLAST services in the public registries, see http://www.ebi.ac.uk/Tools/webservices/tutorials/05_registries for a list.

Since you are using C# you may be interested in .NET Bio which includes APIs for a number of BLAST services. Alternativly since you were already using the command-line tools, you could just add the '-remote' option to the command-line to run the search at NCBI instead of locally.

ADD COMMENT

Login before adding your answer.

Traffic: 2515 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6