Skip to content

NCBI Genetic Code Tables 27 to 31 + ambiguous codons #1224

Closed

Description

@peterjc

The NCBI has added more genetic code tables, now up to 31:
https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi#SG27

We have NCBI tables up to 26 already in https://github.com/biopython/biopython/blob/master/Bio/Data/CodonTable.py

There is a minor issue, first the NCBI have not yet updated the computer readable file ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt (which I've emailed them about), but we could add the tables by hand (as we had to for Table 26).

However there is also a larger issue: What to do with Tables 27, 28 and 31 where some codons can be an amino acid or a stop codon? I think we can store that in the existing codon table object, but it has troubling implications for down stream analysis like ORF finding or our translate functionality.

This gives a new meaning to the term ambiguous codon, because here the bases themselves are unambiguous.

Papers:

Activity

  1. peterjc commented on May 10, 2017

    @peterjc
    MemberAuthor

    Based on archive.org, the new tables 27 to 31 were added between 28 Oct and 26 Nov 2016.

  2. peterjc commented on Sep 22, 2017

    @peterjc
    MemberAuthor

    I emailed the NCBI about this again, it looks like the source file has been updated based on https://www.ncbi.nlm.nih.gov/IEB/ToolBox/C_DOC/lxr/source/data/gc.prt - but the public copy on the FTP site has not.

    Also the website says "Last update of the Genetic Codes: Nov. 18, 2016" which fits with my estimate based on archive.org

  3. peterjc commented on Oct 31, 2017

    @peterjc
    MemberAuthor

    Good news: The NCBI's GenBank taxonomy team got in touch by email, and the FTP site has been updated with version 4.2 of the genetic codes:

    ftp://ftp.ncbi.nih.gov/entrez/misc/data/gc.prt

    That still leaves the tricky question of how we're going to represent these new codons which can be stop of an amino acid in Biopython...

  4. MarkusPiotrowski commented on Dec 30, 2017

    @MarkusPiotrowski
    Contributor

    I just stumbled upon this issue while working on CodonTable.py for coding style issues.
    The current update_NCBI_codon_table.py script will not recognize these 'alternative' stop codons, but it's easy to change that (I did this already in my branch).

    What would you suggest for the moment? Not implementing these codon tables (27, 28, 31) at all? Raising a warning when they are imported? Raising a warning or an error when they are used for translation?

    My suggestion would be to give a warning if one of these tables is used in Bio.Seq.translate. We should throw an error if to_stop is True. If cds is True the respective codons should only be interpreted as stop codons if they are the last codon.

    Just a quick idea: Since all amino acid letters in the codon tables are uppercase, how about encoding 'amino acid or stop' as lowercase letter?

    Are there other places in Biopython where these codon tables would make trouble?

  5. peterjc commented on Jan 1, 2018

    @peterjc
    MemberAuthor

    There may be a few people using the codon tables directly, but the main use case is in Bio.Seq for translation.

    I agree that if translate(..., cds=True) is used we have a clear interpretation: Any special ambiguous codons during the sequence are amino acids, but as the final codon are a stop codon.

    Perhaps the safest option if cds=False and one of these special codons appears is to raise an exception (which we can change in future?). Another option if cds=False is to give a warning, but translate the special codons as amino acids?

    I am against using lower case for 'amino acid or stop', there are too many other ad-hoc uses of case to confusing things.

  6. peterjc commented on Feb 23, 2018

    @peterjc
    MemberAuthor

    Closed by #1501

  7. Artoria2e5 commented on Dec 21, 2023

    @Artoria2e5

    At least for the taxa of tables 27 and 28, Swart et al. (2016) (fig 6, S5) suggests that there are some telltale signs to possibly distinguish AA vs stop.

    A "possible stop codon" indication as suggested by MarkusPiotrowski could retain some information to help a human figure out that sort of thing with some simple heuristics (example: we know the 3' UTR is short, so we go back 10-ish "aa"s in the translation and pick the first possible stop). Since lowercase is ruled out, we might need to change return type.

    ... or we could just pass in a better CDS in the first place and not bother with post-translation guessing.

  8. peterjc commented on Dec 21, 2023

    @peterjc
    MemberAuthor

    I agree with your final line - let's not do any guessing/heuristics here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions