[BioPython] Blast parser problem

Karl Schmid schmid@ice.mpg.de
20 Jun 2002 14:30:24 +0200


Hi,

I have a blast parsing problem to which I can not find a solution.

When I run Blast from a python script, the Biopython blast parser gets
stuck during the parsing of the HSPs. Killing the process (on LInux):
gives the following output:

[1/4061] Blasting yapH
Traceback (most recent call last):
  File "/home/schmid/python/scripts/sql_blast.py", line 175, in ?
    main()
  File "/home/schmid/python/scripts/sql_blast.py", line 169, in main
    blastRecord = run_blast(cl, id, sequence)
  File "/home/schmid/python/scripts/sql_blast.py", line 94, in run_blast
    blastRecord = blastParser.parse(blastOutput)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 516, in parse
    self._scanner.feed(handle, self._consumer)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 84, in feed
    self._scan_rounds(uhandle, consumer)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 140, in _scan_rounds
    self._scan_alignments(uhandle, consumer)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 259, in _scan_alignments
    self._scan_pairwise_alignments(uhandle, consumer)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 269, in _scan_pairwise_alignments
    self._scan_one_pairwise_alignment(uhandle, consumer)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 281, in _scan_one_pairwise_alignment
    self._scan_hsp(uhandle, consumer)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 309, in _scan_hsp
    self._scan_hsp_alignment(uhandle, consumer)
  File "/usr/lib/python2.2/site-packages/Bio/Blast/NCBIStandalone.py",
line 341, in _scan_hsp_alignment
    read_and_call(uhandle, consumer.align, start='     ')
  File "Bio/ParserSupport.py", line 328, in read_and_call
  File "Bio/ParserSupport.py", line 440, in safe_readline
  File "Bio/File.py", line 45, in readline
KeyboardInterrupt


It always gets stuck on the same line 45.

Interestingly, when I do the blast manually with the following command:

schmid@blossom:~/work/xan> blastall -p blastp -d xac -i yapH.fas >
blast.out

there is a lot of output on stderr:
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1275) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1275) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1285) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1295) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1296) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1322) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1337) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1363) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1384) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1388) >=
len(1114)
[blastall] ERROR: ncbiapi [000.000]  SeqPortNew: lcl|xadA start(1408) >=
len(1114)

and so on.

The output file from this blast run seems to be OK and show no unusal
text or structure.

I am using Python2.2.1 and checked out the Biopython code from the CVS
tree about two weeks ago, so it should be more or less up to date.

Any hints on how to solve this problem would be very welcome!

Karl

-- 
------------------------------------------------------------------------
Karl Schmid                              Phone:     + 49 3641 571465
Department of Genetics and Evolution         Fax:       + 49 3641 571402
Max-Planck-Institute of Chemical Ecology     Email:    schmid@ice.mpg.de
Beutenberg Campus, Winzerlaer Str. 10        Web: www.ice.mpg.de/~schmid
07745 Jena, Germany
========================================================================