[BioPython] Parse bit score with NCBIXML module from BLAST output
Christof Winter
winter at biotec.tu-dresden.de
Thu Dec 22 06:17:35 EST 2005
Hi all,
I just tried to parse a BLAST XML output. To my surprise, the parser
always returns None for the bit scores (hsp.bits), whereas raw scores
(hsp.score) are fine. Is this a known issue? Or a problem with my
installation? This is my code:
from Bio.Blast import NCBIXML
parser = NCBIXML.BlastParser()
record = parser.parse(open("blastout.xml"))
for alignment in record.alignments:
for hsp in alignment.hsps:
print hsp.score
print hsp.bits
print
The relevant part from blastout.xml looks like this:
<Hit>
<Hit_num>1</Hit_num>
<Hit_id>gi|56554556|pdb|1XI5|I</Hit_id>
<Hit_def>Chain I, Clathrin D6 Coat</Hit_def>
<Hit_accession>1XI5-I</Hit_accession>
<Hit_len>1630</Hit_len>
<Hit_hsps>
<Hsp>
<Hsp_num>1</Hsp_num>
<Hsp_bit-score>3254.54</Hsp_bit-score>
<Hsp_score>8437</Hsp_score>
<Hsp_evalue>0</Hsp_evalue>
...
</Hsp>
</Hit_hsps>
</Hit>
The corresponding output of my script is:
8437.0
None
I checked the 1.41 version of Bio.Blast.NCBIXML.BlastParser() and could
not find any evidence for parsing of the <Hsp_bit-score> tag. Any solution?
Thanks,
Christof
More information about the BioPython
mailing list