[BioPython] Re: Is the bug still there??

Iddo Friedberg idoerg at burnham.org
Tue Feb 22 13:03:21 EST 2005


Eirik,

I can't seem to duplicate your bug. Can you email me (not the list) your 
FASTA file ?

I am very sorry for your frustration. Thanks for your patience and for 
testing this.


Best,

Iddo

Eirik Sønneland wrote:

> Hi!
>
> Thanks for new release of biopython. Still trying to do a "simpel" 
> Blast search using qblast and the exampel code given in documentation 
> at biopython.org:
> *******************
> import sys
> from Bio.Blast import NCBIWWW
> from Bio import Fasta
>
> file_for_blast = open('Fastaformat.txt', 'r')
> f_iterator = Fasta.Iterator(file_for_blast)
> f_record = f_iterator.next()
>
> b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>
> b_record = NCBIWWW.BlastParser().parse_str(b_results)
>
> E_VALUE_THRESH = 0.04
>
> for alignment in b_record.alignments:
>    for hsp in alignment.hsps:
>        if hsp.expect < E_VALUE_THRESH:
>            print '****Alignment****'
>            print 'sequence:', alignment.title
>            print 'length:', alignment.length
>            print 'e value:', hsp.expect
>            print hsp.query[0:75] + '...'
>            print hsp.match[0:75] + '...'
>            print hsp.sbjct[0:75] + '...'
> ****************
> This gives following error message(what have I done wrong? Is the bug 
> still there??):
>
>
> Warning (from warnings module):
>  File "C:\Python24\lib\site-packages\Bio\Blast\NCBIWWW.py", line 1062
>    warnings.warn("qblast works only with blastn and blastp for now.")
> UserWarning: qblast works only with blastn and blastp for now.
>
> Traceback (most recent call last):
>  File "C:\Python24\MyWorkspace.py", line 23, in -toplevel-
>    b_results = NCBIWWW.qblast('blastn', 'nr', f_record).read()
>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 1081, 
> in qblast
>    rid, rtoe = _parse_qblast_ref_page(handle)
>  File "C:\Python24\Lib\site-packages\Bio\Blast\NCBIWWW.py", line 1152, 
> in _parse_qblast_ref_page
>    return rid, int(rtoe)
> ValueError: invalid literal for int(): 1.1 200 OK
>
> Date: Tue, 22 Feb 2005 08:28:44 GMT
>
> Server: Apache/1.3.27 (Unix) mod_fastcgi/2.4.0
>
> Content-Type: text/html
>
> Via: 1.1 www.ncbi.nih.gov
>
> X-Cache: MISS from www.ncbi.nih.gov
>
> Connection: cl
> ********************
> Please advice!
>
> Regards,
> Eirik
>
>


-- 
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
==========================
The First Automated Protein Function Prediction SIG
Detroit, MI June 24, 2005
http://ffas.burnham.org/AFP



More information about the BioPython mailing list