[BioPython] Problem to obtain Hit length parsing with NCBIXML

Michiel De Hoon mdehoon at c2b2.columbia.edu
Wed Aug 15 00:45:26 UTC 2007


This should work:

>>> for alignment in brecord.alignments:
...      print alignment.length

If it doesn't, please send us the exact code you are using, and the exact
error message that you got.

--Michiel.


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



-----Original Message-----
From: biopython-bounces at lists.open-bio.org on behalf of Gabino Sanchez-Perez
Sent: Tue 8/14/2007 7:57 PM
To: biopython at lists.open-bio.org
Subject: [BioPython] Problem to obtain Hit length parsing with NCBIXML
 
Hi

I'm parsing a blastp output in XML format using NCBIXML, but my problem is
that
I don't know how to get the Hit length (not alignment length), even though is
defined in the parser:

    def _end_Hit_len(self):
        self._hit.length = int(self._value)

So in my script when I iterate

 for alignment in brecord.alignments:
      for hsp in alignment.hits:

it seems that is not defined and the error message is that hit.length does
not
exist.

Thanks in advance

Gabino
_______________________________________________
BioPython mailing list  -  BioPython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython





More information about the Biopython mailing list