[BioPython] Parse bit score with NCBIXML module from BLAST output

Michiel De Hoon mdehoon at c2b2.columbia.edu
Fri Dec 23 12:26:29 EST 2005


Hi everybody,

Christof has sent me a patch to NCBIXML.py for this bug, which is in CVS now.
Thanks again, Christof!

--Michiel.

Michiel de Hoon
Center for Computational Biology and Bioinformatics
Columbia University
1150 St Nicholas Avenue
New York, NY 10032



-------- Message d'origine--------
De: biopython-bounces at portal.open-bio.org de la part de Christof Winter
Date: jeu. 12/22/2005 6:17
À: biopython at biopython.org
Objet : [BioPython] Parse bit score with NCBIXML module from BLAST output
 
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


_______________________________________________
BioPython mailing list  -  BioPython at biopython.org
http://biopython.org/mailman/listinfo/biopython





More information about the BioPython mailing list