[Biopython] Alignment Scores?

Peter Cock p.j.a.cock at googlemail.com
Tue Feb 11 18:25:44 UTC 2014


On Tue, Feb 11, 2014 at 7:17 PM, Jan Kim <jttkim at googlemail.com> wrote:
> Dear All,
>
> the EMBOSS "srspair" alignment format includes identity, similarity and
> gap statistics as well as the alignment score, see [1]. Is this info
> available from alignment objects as returned by Bio.AlgnIO.parse(...).next() ?

Not currently, no.

> Obviously availability of properties such as (percent) identity etc.
> will vary with aligment format and type (e.g. some apply only to pairwise
> alignment), so I was looking for something perhaps like a dictionary
> of optional additional data, somewhat like the letter_annotations in the
> SeqRecord class.

There's an open issue to do for something like that for the alignment
object... some of the AlignIO parsers hide this kind of thing under
a private attribute as a short term hack. However, read on.

> I'll probably start rolling my own simplistic solution based on a few
> regular expressions for now -- if this is a crude re-invention of a wheel
> that's been polished before please let me know, though.

You could tweak the AlignIO parser, but this would fit better as part of
EMBOSS pair format support in (the quite new) SearchIO module,
where this kind of attribute is expected: http://biopython.org/wiki/SearchIO

Regards,

Peter



More information about the Biopython mailing list