[Biopython] Alignment Scores?

Jan Kim jttkim at googlemail.com
Tue Feb 11 19:17:47 UTC 2014


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() ?

I haven't found anything in the documentation and a peek into a sample
object didn't reveal anything either:

    >>> p = Bio.AlignIO.parse('sa-needle.txt', 'emboss')
    >>> a = p.next()
    >>> a.__dict__.keys()
    ['_records', '_alphabet']

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.

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.

Best regards, Jan

[1] http://emboss.sourceforge.net/docs/themes/alnformats/align.srspair
-- 
 +- Jan T. Kim -------------------------------------------------------+
 |             email: jttkim at gmail.com                                |
 |             WWW:   http://www.jtkim.dreamhosters.com/              |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*



More information about the Biopython mailing list