[Biopython-dev] [Bug 1944] Align.Generic adding iterator and more
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Thu Nov 2 21:38:01 UTC 2006
http://bugzilla.open-bio.org/show_bug.cgi?id=1944
------- Comment #2 from biopython-bugzilla at maubp.freeserve.co.uk 2006-11-02 16:38 -------
While working on bug 2059, I've been tempted to make some similar changes to
Marc's suggestions about handling the SeqRecord's id/name/description, and the
addition of an "add SeqRecord" method.
I like the idea of adding a method to iterate over the sequences. How about
something a little simpler (which I haven't tested yet):
def __iter__(self):
"""Iterate over the SeqRecord objects making up the alignment"""
return iter(self._records)
i.e. Use the fact that self._records is a list, and will support iteration
itself. This avoids having to keep track of the current iteration position in
our own next method.
Also, would anyone else like to be able to iterate over the columns?
--
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