[BioPython] Problem to obtain Hit length parsing with NCBIXML

Gabino Sanchez-Perez Gabino.Sanchez-Perez at Dal.Ca
Tue Aug 14 19:57:40 EDT 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