[BioPython] Congrats (and code contribution)!

Dinu C. Gherman gherman@darwin.in-berlin.de
Tue, 14 Sep 1999 15:15:48 +0200


Hi and congratulations to your idea of creating Biopython!!!

Your project reminds me of some initial efforts along similar
lines that I was thinking about with other folks while I was
at EMBL-Heidelberg. I hope now the time has finally come! I'm 
quite out of these circles nowadays, but I know there was much 
stuff around that people worked on "behind the scenes".

As you are begging for source code I thought you might be in-
terested in a little silly project of mine. But be warned: it
is neither fast nor ingenious, neither really clean nor docu-
mented. And of course it's not "standardized" or whatsoever!
It might still have bugs and is perhaps right away useless, 
so you might consider creating a "junk corner" on your site 
if you're ever going to place it there (maybe a good idea any-
way...). 

What it is? Ah, it's some sort of a sequence alignment algo-
rithm I converted from C code (written by Gene Myers et al.) 
to Python. I'm not sure it always does what it should, but it 
seemed to do it most of the time, so I attributed the other 
cases (where an asymmetry with respect to the input occured) 
to my "lack of understanding" of the matter as such. Maybe 
you'll find some pleasure in further investigating the prob-
lem if it is one?

In any case, at the beginning I thought this alignment might 
be useful for (Python) sequence comparisons in a broader con-
text, and maybe it is...? What do you think? Anyway, before 
you say you want that all all, look at the output from a test 
function:

Empty lists

In-List 1:  []
In-List 2:  []
Out-List 1: []
Out-List 2: []
Partitions: ([], [], [])
Cost:       0

Empty list

In-List 1:  []
In-List 2:  [1, 2, 3]
Out-List 1: [None, None, None]
Out-List 2: [1, 2, 3]
Partitions: ([], [], [1, 2, 3])
Cost:       3.0

Same list

In-List 1:  [1, 2, 3]
In-List 2:  [1, 2, 3]
Out-List 1: [1, 2, 3]
Out-List 2: [1, 2, 3]
Partitions: ([], [1, 2, 3], [])
Cost:       0.0

Overlapping

In-List 1:  [1, 2, 3, 4, 5, 6, 7, 8, 9]
In-List 2:  [3, 4, 20, 21, 5, 6, 7, 10, 11]
Out-List 1: [1, 2, 3, 4, None, None, 5, 6, 7, 8, 9]
Out-List 2: [None, None, 3, 4, 20, 21, 5, 6, 7, 10, 11]
Partitions: ([1, 2, 8, 9], [3, 4, 5, 6, 7], [20, 21, 10, 11])
Cost:       6.0

Overlapping

In-List 1:  [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
In-List 2:  [1, 3, 5, 7, 9]
Out-List 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Out-List 2: [None, 1, None, 3, None, 5, None, 7, None, 9]
Partitions: ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9], [])
Cost:       5.0

Non-overlapping

In-List 1:  [1, 3, 5, 7, 9]
In-List 2:  [2, 4, 6, 8, 10]
Out-List 1: [1, 3, 5, 7, 9]
Out-List 2: [2, 4, 6, 8, 10]
Partitions: ([1, 3, 5, 7, 9], [], [2, 4, 6, 8, 10])
Cost:       5.0

Strings

In-List 1:  ['a', 'c', 'c', 'g', 't', 'a', 'c', 'c', 'g']
In-List 2:  ['a', 'g', 't', 'a', 'c', 'c', 'c', 'c', 'g']
Out-List 1: ['a', 'c', 'c', 'g', 't', 'a', 'c', 'c', None, None, 'g']
Out-List 2: ['a', None, None, 'g', 't', 'a', 'c', 'c', 'c', 'c', 'g']
Cost:       4.0

Strings, more complex

In-List 1:  ['a', 'a', 'c', 'c', 'g', 't', 'a', 'c', 'g', 'g', 't']
In-List 2:  ['a', 'g', 't', 'g', 'g']
Out-List 1: ['a', 'a', 'c', 'c', 'g', 't', 'a', 'c', 'g', 'g', 't']
Out-List 2: ['a', None, None, None, 'g', 't', None, None, 'g', 'g',
None]
Cost:       6.0
Asymmetric behaviour:
In-List 1:  ['a', 'g', 't', 'g', 'g']
In-List 2:  ['a', 'a', 'c', 'c', 'g', 't', 'a', 'c', 'g', 'g', 't']
Out-List 1: ['a', None, None, None, 'g', 't', None, None, 'g', None]
Out-List 2: ['a', 'a', 'c', 'c', 'g', 't', 'a', 'c', 'g', 'g']
Cost:       6.0

Again, good luck for Bio-Python! Just one more thing: as Skip 
mentioned already, having the web site implemented with Zope 
would add even more excitement to this project, but maybe 
later...?

Regards,

Dinu

-- 
Dinu C. Gherman

................................................................
"An average of more than 15 % of adults in 12 industrialized 
countries are functionally illiterate; in Ireland, the United 
Kingdom and the United States, the rates are over 20 %."

  (The State of the World's Children 1999,
   UNICEF, http://www.unicef.org/sowc99)