[Biopython] hsp.identities

Mike Williams dmikewilliams at gmail.com
Mon Aug 10 21:42:08 UTC 2009


On Mon, Aug 10, 2009 at 4:43 PM, Peter<biopython at maubp.freeserve.co.uk> wrote:
> This is one of the quirks of the XML parser (integer) versus the
> plain text parser (tuple of two integers, the number of identities
> and the alignment length). In general they are interchangeable
> but there are a couple of accidents like this which we've left in
> place rather than breaking existing scripts. See Bug 2176 for
> more details.
> http://bugzilla.open-bio.org/show_bug.cgi?id=2176
>
> For plain text, from memory you needed this:
> abs(x.identities[0]-x.identities[1]) or, abs(x.identities[0]-x.align_length)
> For XML you'll need: abs(x.identities - x.align_length)
>

Thanks for the reply, Peter.  I actually found the solution and posted
that fact a couple hours ago, although the additional information was
helpful.

I do think that, at least, the documentation should be changed to
mention the difference between the standalone and xml parsers.  If
that had been done it would have saved me a lot of time.

Peace,

Mike



More information about the Biopython mailing list