[Biopython-dev] Tweaking the SeqRecord class

Michiel de Hoon mdehoon at c2b2.columbia.edu
Thu Aug 17 01:39:12 UTC 2006


Peter wrote:
> First of all, is there any comment on my suggestion to add __str__ and
> __repr__ methods to the SeqRecord object, bug 2057:
> 
> http://bugzilla.open-bio.org/show_bug.cgi?id=2057
Here's a thought:
What if Seq were to inherit from str, and SeqRecord from Seq?
Then, you get these for free.

> Next, I'd like to check in some basic __doc__ strings for the
> SeqRecord class, e.g. something like this:
Sounds good to me. Pretty amazing, actually, that SeqRecord doesn't have 
documentation.

> If you recall, for the fastest parsers turning the data into SeqRecord
> and Seq objects imposed a fairly large overhead (compared to just
> using strings):
> 
> http://lists.open-bio.org/pipermail/biopython-dev/2006-July/002407.html
I wonder if this is still true if a Seq object and a SeqRecord object 
inherit from string. From the code, I don't see where the overhead comes 
from.


> The backwards compatibility if statement is a bit
> ugly - can we just assume Python 2.2 or later?
Biopython currently requires Python 2.3 or later.

--Michiel.



More information about the Biopython-dev mailing list