[Biopython] Fwd: Qblast : no hits

Peter biopython at maubp.freeserve.co.uk
Mon Apr 26 10:02:24 UTC 2010


Hi Karthik,

On Mon, Apr 26, 2010 at 9:38 AM, Karthik Raja <cloudycrimson at gmail.com> wrote:
> Hello Peter,
>
> I tried out what you suggested and it works perfectly. I checked the result
> XML file and there was no problem at all.

That's good :)

> But I still have one more small issue that I am sure you can help me with.
> The main reason i wanted to use python was that I could put all the query
> sequences in a file and blast it.

I wouldn't recommend that approach.

For a modest number of queries, I would suggest doing one online BLAST
query at a time. This will spread out the load on the NCBI, and means each
time your XML results won't be too big. Trying to do too many queries at
risks hitting an NCBI CPU limit, or having problems downloading a very
large XML result file.

For a large number of queries, I would suggest using standalone BLAST
(installed and run locally) - especially if you want to use very lenient
parameters giving lots of results (meaning large output files).

> So when I tried the above code to blast a
> sequence that I have put in a fasta file, it gives an error. Same kinda
> error. Below are the code and traceback.
>
>>>> fasta_string = open("test.fasta").read()
>>>> result_handle = NCBIWWW.qblast("blastp", "nr",
> fasta_string,entrez_query='(none)', expect=200000, hitlist_size=50,
> word_size=2, alignments=500, descriptions=500,format_type='XML')
>
> *Traceback (most recent call last):
> ...
> ValueError: No RID and no RTOE found in the 'please wait' page. (there was
> probably a problem with your request)
>
> Please let me know if you could sense in the problem with the code.
>
> Sincerely,
> Karthik

The code works fine - I just tried it using a FASTA file with four proteins.
I would guess there is a problem with your FASTA file - perhaps there
is a bad sequence in it, or too many sequences. Since you don't have
the latest code we can't see the NCBI error message in the traceback,
which would help a lot.

I see you are running on Windows, so the easiest way to try this is
to backup C:\Python26\lib\site-packages\Bio\Blast\NCBIWWW.py
and replace it with the new version from our repository:
http://biopython.open-bio.org/SRC/biopython/Bio/Blast/NCBIWWW.py
or:
http://github.com/biopython/biopython/raw/master/Bio/Blast/NCBIWWW.py

Or, could you send me the FASTA file to try it here (please send it to me
directly, not the mailing list).

Regards,

Peter



More information about the Biopython mailing list