[BioPython] Problem to obtain Hit length parsing with NCBIXML
Christof Winter
winter at biotec.tu-dresden.de
Wed Aug 15 07:36:47 UTC 2007
Gabino Sanchez-Perez wrote:
> 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.
I can confirm what Michiel wrote:
alignment.length = total length of the unaligned hit sequence
HTH,
Christof
More information about the Biopython
mailing list