Skip to content

Fix CTG assignment in genetic code tables 27-30 - #939

Open
dylanpulver wants to merge 1 commit into
biotite-dev:mainfrom
dylanpulver:fix-ctg-leu-codes-27-30
Open

Fix CTG assignment in genetic code tables 27-30#939
dylanpulver wants to merge 1 commit into
biotite-dev:mainfrom
dylanpulver:fix-ctg-leu-codes-27-30

Conversation

@dylanpulver

Copy link
Copy Markdown

codon_tables.txt maps CTG to Ala in genetic codes 27-30 (Karyorelict, Condylostoma, Mesodinium, Peritrich Nuclear). NCBI maps it to Leu, so translate() silently returns a wrong amino acid:

seq.NucleotideSequence("ATGCTGCTG").translate(
    complete=True, codon_table=seq.CodonTable.load(27))
# before: MAA          after: MLL

This was never biotite's own choice. The file is a faithful snapshot of NCBI gc.prt v4.2, added in Nov 2017 and untouched since. NCBI corrected it themselves in v4.3: "Change to CTG -> Leu in genetic codes 27, 28, 29, 30."

Verification. I diffed all 64 codons of all 25 tables against gc.prt (16,444 bytes, Version 4.6, sha256 2aecbdd0…): of 1,600 assignments, exactly these 4 differ. Confirmed independently against NCBI's Taxonomy page and Biopython. Structurally, codes 27-30 reassign only stop codons, yet their leucine box reads LLLA.

Deliberately left out, as a different class of change — happy to follow up if you want them: the GTG start missing from code 3 (gc.prt v4.4); code 24 named "Pterobranchia", which NCBI renamed "Rhabdopleuridae" (v4.6, and renaming would break CodonTable.load("Pterobranchia Mitochondrial")); codes 32/33 absent.

Tests. Table contents had no coverage: forcing CTG -> Leu in every table left the whole suite green. The new controls (3→Thr, 12→Ser, 26→Ala — correct, and unchanged here) catch that. 6053 passed, 132 skipped; ruff 0.9.7 clean.

NCBI gc.prt v4.3 changed CTG to Leu in genetic codes 27, 28, 29 and 30.
The bundled table is a snapshot of gc.prt v4.2, so translate() returned
Ala for these four codes.

Add a test covering the CTG assignment, with controls for the tables
that genuinely reassign CTG (3, 12 and 26).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant