[BioPython] PSIBlastParser behavior

Jer-Yee John Chuang jchuang8 at itsa.ucsf.edu
Wed Apr 21 21:00:07 EDT 2004


Hi,

I am observing an unexpected behavior using the PSIBlastParser.  I am
doing a simple PSI-Blast run:

Code:
--------------------------------------------------------
blastOut, errorInfo= NCBIStandalone.blastpgp(myBlastExe,myBlastDB,
                                             myBlastFile,
                                             expectation=myEValue,
                                             npasses=myNPasses)
myParser= NCBIStandalone.PSIBlastParser()
myRecord= myParser.parse(blastOut)


Error message:
--------------------------------------------------------
Traceback (most recent call last):
  File "locateHomologuesPsi_post.py", line 49, in ?
    myRecord= myParser.parse(myFile)
  File "c:\python23\lib\site-packages\Bio\Blast\NCBIStandalone.py", line
557, in
 parse
    self._scanner.feed(handle, self._consumer)
  File "c:\python23\lib\site-packages\Bio\Blast\NCBIStandalone.py", line 98, in
feed
    self._scan_database_report(uhandle, consumer)
  File "c:\python23\lib\site-packages\Bio\Blast\NCBIStandalone.py", line
413, in
 _scan_database_report
    read_and_call(uhandle, consumer.database, start='  Database')
  File "c:\python23\lib\site-packages\Bio\ParserSupport.py", line 300, in 
read_a
nd_call
    raise SyntaxError, errmsg
SyntaxError: Line does not start with '  Database':
Results from round 1


I wrote the PSI-Blast report to file, then tried deleting lines then
calling the PSIBlastParser on the remaining.  I found that the parser is
expecting a line beginning with the work "Searching" before the line
"Results from round" (this is defined in NCBIStandalone _Scanner class in 
def _scan_descriptions).  Once I correct this (manually adding the
"Searching" line in the PSI-Blast report or commenting out the relevant
lines in NCBIStandalone.py), the PSIBlastParser works fine.  However, the 
blastpgp report doesn't contain this "Searching" line in the report it
generates.  Is there something that I am missing here??

Thank you for your time.

Cheers,
John


-----------
John Chuang
UCSF, MB S516JJ 
500 16th St.
San Francisco, CA 94143
jchuang8 at itsa.ucsf.edu




More information about the BioPython mailing list