[BioPython] codons and complements

Jeffrey Chang jchang@SMI.Stanford.EDU
Tue, 12 Oct 1999 10:22:38 -0700 (PDT)


Ack!  Before I could finish writing this, a whole slew of other emails
were sent out, making most of my message obsolete.  I guess that's a good
thing.

Anyway, I agree with Andrew's that code should be make as strict as
possible, with the possibility of adding leniency when required.  Even if
the default behavior is lenient, it would still be beneficial to design
things strict, for the reason, as Andrew pointed out, that once you have
something lenient, it's hard to go back and tighten things up.


>   o  what do you do with stop codons?  Produce multiple proteins
> or just stop translating?  Or raise an error?

My feeling is that we should allow some mechanism (like the one Andrew
pointed out earlier) for allowing translation to continue.  Having done
some sequence analysis, a lot of times I still want to the information
past a stop codon just to "see what's there".  The stop codon may be an
artifact of a sequencing error, and not meaningful.



> there may problems with imports, if the
> standard DNA and protein sequence definitions are done in the same
> module (say, Bio.Seq), then it will import the translation tables
> module (say, Bio.TransTables), which will import Bio.Seq to get the
> proteins.

Ooh, this is kind of yucky.


> There are several solutions to this problem.  1) I think Python
> allows this, so long as the import is not actually used to get
> data from a partially loaded module, 

Python allows this, and some suggestions for how to do it are in the FAQ
(http://www.python.org/doc/FAQ.html#4.37). 


> 2) Split the DNA and protein sequences into their own modules, 

I like this solution.  It seems to be the cleanest way to do it.  We could
still have a Bio.Seq module that imports the protein and dna sequence
functionality and publishes appropriate interfaces to them.


Jeff