[Biopython-dev] back_table in Bio.Data.CodonTable
Jeff Hussmann
jeff.hussmann at gmail.com
Tue Jul 31 15:07:42 EDT 2012
It seems desirable to have each amino acid's list of codons be given
in a deterministic order. I have been sorting lexicographically using
the ordering 'TCAG'. This is referred to as the 'conventional
ordering' in CodonTable.__str__. The most flexible solution would be
to take the ordering from self.nucleotide_alphabet.letters, but this
would give 'GATC' for any CodonTable using IUPAC.unambiguous_dna as
its nucleotide alphabet. Are there any Biopython-wide conventions
here?
On Tue, Jul 31, 2012 at 4:06 AM, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> On Mon, Jul 30, 2012 at 11:03 PM, Jeff Hussmann <jeff.hussmann at gmail.com> wrote:
>> Hello all -
>>
>> Bio.Data.CodonTable currently has a variable back_table that provides
>> a mapping from an amino acid to single (arbitrary?) codon that encodes
>> the amino acid.
>
> The current code (which I doubt is widely used) does pick an arbitrary
> codon (using a sort to ensure this is consistent between Python versions).
> As noted in the comments, there are more useful alternatives - but the
> example of doing this on usage frequency is organism specific so
> can't be hard coded.
>
>> Is there any interest in adding a full_back_table (or some other
>> suitable name) that would provide a mapping from an amino acid to a
>> list of all codons that encode it? If so, I will submit a pull
>> request. I have been using this myself for some projects on synonymous
>> codon usage.
>
> Something like that would be more useful - sure, do a pull request
> from the current master branch.
>
> See also past discussions about back translation of sequences, e.g.
> http://lists.open-bio.org/pipermail/biopython/2012-April/007901.html
>
> Peter
More information about the Biopython-dev
mailing list