[Biopython-dev] [Bug 1944] Align.Generic adding iterator and more

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sun Aug 19 14:34:09 UTC 2007


http://bugzilla.open-bio.org/show_bug.cgi?id=1944





------- Comment #6 from mdehoon at ims.u-tokyo.ac.jp  2007-08-19 10:34 EST -------
Whereas I am largely happy with this patch, one thing keeps bothering me:

> align[r,:] or align[r,c1:c2] gives all or part of a row as a Seq
> align[:,c] or align[r1:r2,c] gives all or part of a column as a Seq

A Seq is a string with an alphabet attached. I think it is not advisable to
require that all sequences in an alignment have the same alphabet. For example,
one sequence may be IUPACUnambiguousDNA, another one IUPACAmbiguousDNA. Or, one
is IUPACProtein, and an another one the generic Alphabet because the user did
not explicitly specify the alphabet when creating the Seq object. I don't see
anything fundamentally wrong with that.

So, if we cannot guarantee that all rows in the alignment have the same
alphabet, then we cannot really return a column of the alignment as a Seq -- we
won't know the appropriate alphabet. From this viewpoint, align[:,c] or
align[r1:r2,c] returning a string seems more natural, and then I'd expect
align[r,:] or align[r,c1:c2] also to return a string.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list