[Biopython-dev] BioPython Design

Albert Krewinkel krewink at inb.uni-luebeck.de
Tue Jul 11 17:23:14 EDT 2006

Am 11.07.2006 um 18:01 schrieb Marc Colosimo:

> It appears that most people (myself included) use plain strings instead
> of Seq objects (= string + Alphabet). We should check on the biopython
> mailing list if anybody really needs alphabets, and if not get rid of
> them (after the upcoming Brooklyn-release (1.42) though).

There are some good points about Seq objects in the discussion
last year:

Personaly, I would prefere to keep Alphabets as a part of Seq,
but make it behave more like python strings, i.e.:
str(seq_obj) == seq_obj.data == seq_obj.tostring() == seq_obj[:]

Furthermore, alphabets could be more usefull with an __init__
method looking like

def __init__(self, data, alphabet, validate=False)

This way, sequences could be checked for consistency on demand.

To make Alphabets more usable, it would be nice to have some kind
of dictionary interface to map different alphabets:
e.g. Alphabet.Alphabets['protein'] == Bio.Alphabet.IUPAC.protein


Albert Krewinkel
University of Luebeck
phone: +49 (451) 500 5516
email: krewink at inb.uni-luebeck.de

More information about the Biopython-dev mailing list