[Biopython-dev] [Bug 2351] Make SeqRecord subclass Seq subclass string?

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Aug 27 22:12:53 UTC 2007


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





------- Comment #1 from biopython-bugzilla at maubp.freeserve.co.uk  2007-08-27 18:12 EST -------
Created an attachment (id=735)
 --> (http://bugzilla.open-bio.org/attachment.cgi?id=735&action=view)
Patch to Bio.Seq and Bio.SeqRecord

(1) Makes __str__ return the full sequence as a string for Seq, Mutable and
SeqRecord. I think this is essential for making the objects more
interchangeable, but left as-is could cause some confusion to beginners because
it is now a little bit harder to work out which type of object they are dealing
with. We may want to mention something like this in the tutorial: print
x.__class__

(2) Adds __iter__ to SeqRecord, which is passed to the Seq object, allowing
iteration over the sequence as single character strings. Arguably this should
be in a separate patch.

(3) Updates docstrings - e.g. Seq and Mutable method .tostring() is considered
deprecated.

Still lots of things to discuss before we can implement the full subclassing
hierachy, for example should SeqRecord splicing (__getitem__) return a Seq or a
SeqRecord? If a SeqRecord, then how should the annotation be handled.


-- 
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