[BioPython] Help a clueless newbie with BLAST queries?

dubious@2xtreme.net dubious@2xtreme.net
Mon, 4 Jun 2001 10:25:41 -0700


On Sunday 03 June 2001 22:58, you wrote:
> >>> 2)I can't seem to get the optional settings to work (I'm trying to
> >>> limit the number of 'hits' returned from the BLAST search).  Setting
> >>> alignment=10 and descriptions=10 in the NCBIWWW.blast instantiation
> >>> seems
> >>> to be ignored, and trying to set an "expect" value causes the script to
> >>> die with "no PID found".
> >>
> >> I'll look into this... may take longer...
[...]
> Yep.  The format changed on us again.  I've updated the code to work with
> the new format.  I've checked it into CVS, and it should propogate to the
> anonymous server in a few hours.  Please try this and let me know if it
> works for you.
>
> The server now also respects the optional parameters.

Thanks for the help and info.  Unfortunately, though, now I'm getting "RID 
not found" whether I put any of the optional values in or not, with the code
from CVS:

bash-2.04$ cat sequences.seq | python blasttest.py
Opened file for reading
 
Defined f_iterator
 
read first f_record
entering While loop
 
Getting BLAST results
 
Traceback (most recent call last):
  File "blasttest.py", line 16, in ?
    b_results = NCBIWWW.blast('blastn', 'nr', f_record)
  File "/usr/lib/python2.0/site-packages/Bio/Blast/NCBIWWW.py", line 680, in 
blast
    ref_cgi, ref_params = _parse_blast_ref_page(handle)
  File "/usr/lib/python2.0/site-packages/Bio/Blast/NCBIWWW.py", line 755, in 
_parse_blast_ref_page
    raise SyntaxError, "Error getting BLAST results: RID not found"
SyntaxError: Error getting BLAST results: RID not found
bash-2.04$

There doesn't happen to be a "debug" or "verbose" option that would show me
what the NCBI server is sending back, is there?

Oh, and just to confirm that I'm passing the optional values correctly, the 
line should read something like:

b_results = 
NCBIWWW.blast('blastn','nr',f_record,alignments='10',descriptions='10')

right?

Thanks again!
-- 
"Given the pace of technology, I propose we leave math to the machines
and go play outside." - Calvin