[BioPython] BLAST XML problem?
Iddo Friedberg
idoerg at gmail.com
Wed Jan 11 00:13:36 EST 2006
Not sure what we're doing wrong here...
Using the cookbook example, biopython 1.41, python 2.2 (our Zope needs
that Python version, sorry):
from Bio.Blast import NCBIXML
b_parser = NCBIXML.BlastParser()
b_record = b_parser.parse(blast_out)
Breaks on "Alejandro Schäefer", in the XML <BlastOutput_reference> tag.
The ä seems to cause the error. Replace it with a regular "a" everything
is hunky-dory
Huh?
[idoerg at hotdog:~/results/jafa]> ./try_blast.py star_human.fasta
/home/idoerg/biopy_cvs/biopython/Bio/Blast/NCBIWWW.py:1070: UserWarning:
qblast works only with blastn and blastp for now.
warnings.warn("qblast works only with blastn and blastp for now.")
Traceback (most recent call last):
File "./try_blast.py", line 19, in ?
b_record = b_parser.parse(open('my_blast.out'))
File "/home/idoerg/biopy_cvs/biopython/Bio/Blast/NCBIXML.py", line
112, in parse
self._parser.parse(handler)
File "/usr/lib/python2.3/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.3/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.3/xml/sax/expatreader.py", line 211, in feed
self._err_handler.fatalError(exc)
File "/usr/lib/python2.3/xml/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: my_blast.out:6:81: not
well-formed (invalid token)
Iddo
--
Iddo Friedberg, Ph.D.
Burnham Institute for Medical Research
10901 N. Torrey Pines Rd.
La Jolla, CA 92037
Tel: (858) 646 3100 x3516
Fax: (858) 713 9949
http://iddo-friedberg.org
More information about the BioPython
mailing list