[BioPython] codons and complements

Thomas.Sicheritz@molbio.uu.se Thomas.Sicheritz@molbio.uu.se
Mon, 11 Oct 1999 09:34:13 +0100 (WET DST)


Andrew Dalke writes:
 > I've been thinking about how to do translations and complements of
 > sequences.  I've got an idea about how to do them "nicely" that I
 > want to propose.
 > 
 > I'll start with translation.  Given a nucleotide sequence and
 > a codon table, return a protein sequence.  The translation will
 > always be 3 nucleotides to 1 amino acid.  The DNA/RNA and the
 > protein will have their own alphabets.

Why not hardcoding the Universal alphabet plus some frequent variants, like
standard mitochondria and chloroplasts. For other alphabets, I think the
user/programmer knows best what to choose and when -  so she/he could
pass an optional parameter (dictionary, list, flag) containing the
information about the differing codons.
(e.g. Under some special conditions, UGA can code for selenocysteine
instead for Stop, but only the user knows when :-)

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

A translation call should ONLY translate and not try to guess about
biological meanings. A stop codon should be translated into a '*' - at
least I am expecting that. But I also know situations where I'd like to
raise an exception if the sequence shows up to contain stop codons.
Another flag ? translate(seq,'-forceCDS') ?.

 >   o  what do you do if the input size is not a factor of 3?  Ignore
 > the last 1 or 2, or raise an error?
IMHP ignore the rest unless -forceCDS given.

Next question should we use 'clever' translation ? (or greedy translation?)
Synonymous codons, like CTA, CTT, CTG and gives Leucine(L). Should CTN
(maybe from a sequencing error) recognize the codon family and translate
CIN to L ? 


jm2c's
-thomas
-- 
Sicheritz Ponten Thomas E.  Linnaeus Centre for Bioinformatics
blippblopp@linux.nu         BMC, Uppsala University
BMC:  +46 18 4714214        BOX 590 S-751 24 UPPSALA Sweden
Fax   +46 18  557723        http://evolution.bmc.uu.se/~thomas
Molecular Python:  http://evolution.bmc.uu.se/~thomas/python
Molecular Linux: http://evolution.bmc.uu.se/~thomas/mol_linux

	De Chelonian Mobile ... The Turtle Moves ...