[Biopython-dev] Re: Blast parser

Jeong Joung j.joung at AptusGenomics.com
Fri Sep 28 09:36:02 EDT 2001

Thank you so much for your responses. The changes work really well.


-----Original Message-----
From: Jeffrey Chang [mailto:jchang at SMI.Stanford.EDU]
Sent: Thursday, September 27, 2001 7:16 PM
To: Brad Chapman; Jeong Joung
Cc: biopython-dev at biopython.org
Subject: [Biopython-dev] Re: Blast parser

Great!  Thanks a lot.  The patch looks good really good.  The only
thing is, can you change the try: except: to an explicit test for the
end of the stream?  That would be more robust to changes in the error

             read_and_call(uhandle, consumer.blast_cutoff, start='S2')
         except SyntaxError, reason:
             assert str(reason) == "Unexpected end of stream.", \
               "Unexpected reason: '%s'" % reason


if uhandle.peekline():
   attempt_read_and_call(uhandle, consumer.blast_cutoff, start='S2')


At 5:02 PM -0400 9/27/01, Brad Chapman wrote:
>Hi Jeong;
>I'm ccing this message to biopython-dev at biopython.org. By the way,
>asking your questions there is probably a better place than asking
>me directly, as there are lots of people there to help.
>>  Hello, I would like to know if the blast standalone parser supports
>>  of the BLASTX results. When I use blast standalone parser to parse
>>  results, I get an error message of the following:
>>  SyntaxError: Line does not start with 'length of query':
>>  length of database: 27,975,647
>Yup, it looks like the blastx output format has changed somewhat
>since the last time it was used/tested with blastx. The specific
>things that have changed are the lack of the following lines in
>blastx output:
>'length of query'
>'effective length of query'
>'effective search space:'
>I've fixed Bio/Blast/NCBIStandalone.py so that it works again on
>blastx. The diff to this file is attached. Jeff, if you have a
>chance could you give me the okay on this before I check it in? The
>current regression tests all pass with these changes. When I check
>it in, I can also add the blastx example file I used to fix this.
>Jeong, thanks for the bug report! Please let us know if this fix
>doesn't get things working again for you.
>PGP public key available from http://pgp.mit.edu/
>Attachment converted: Macintosh HD:NCBIStandalone.py.diff
>(TEXT/text) (0015B4C0)

More information about the Biopython-dev mailing list