[Biopython-dev] Rethinking Seq objects

Frédéric Sohm Frederic.Sohm at iaf.cnrs-gif.fr
Fri Apr 29 04:03:56 EDT 2005

I am ready to do some performance testing, if you want. I am looking for a
replacement for the DNA object I have written and could well switch to the
biopython Seq object if it is faster. 


Michael Hoffman wrote:
> On Thu, 28 Apr 2005, Frédéric Sohm wrote:
>> 1) get rid of MutableSeq and make all Seq mutable.
>> Will it not be a problem for some people there? I mean I only use 
>> MutableSeq so
>> noproblem there for me but I assume that someone uses non-mutable Seq 
>> or is it a
>> feature which is not needed?
> In the rest of CPython, immutable have two benefits: they are more
> memory-efficient (and sometimes space-efficient), and they are
> hashable. I don't think Seqs are usefully hashable right now, and
> Michiel says he will code the new Seq such that there won't be a
> significant performance impact.

Would you be willing to test the performance of a new Seq class? I haven't 
actually written any code yet, but I could send it to you when it's done before 
including it in Biopython. Note also that a mutable Seq class avoids the need 
for calls to tomutable and toseq, so there may be an overall performance gain. 
But it would be better to test this on a real-life case.


Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Biopython-dev mailing list
Biopython-dev at biopython.org

Frédéric Sohm
Equipe INRA U1126 "Morphogenèse du système nerveux des Chordés"
Institut de Neurosciences A. Fessard
1 Avenue de la Terrasse
Phone: +33 (0) 1 69 82 34 12
Fax:+33 (0) 1 69 82 34 47

More information about the Biopython-dev mailing list