[BioPython] Problem to obtain Hit length parsing with NCBIXML

Gabino Sanchez-Perez Gabino.Sanchez-Perez at Dal.Ca
Tue Aug 14 23:57:40 UTC 2007


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



More information about the Biopython mailing list