Drybench Sequence.
Codon adaptation index and recoding for a host
A coding sequence's codon adaptation index against a host's whole-genome codon usage, with its rare codons and recoding under hard constraints.
Built and maintained by Mat Beale. Methods and sources · Reference checks · Contact
Sequence
Paste once, read every answer
DNA, 333 bp. Detected from the letters: only A, C, G, T and N.
Answer
Codon adaptation
How closely the current coding sequence's codons resemble a host's codon usage, as the codon adaptation index, with the rare codons and the host's codon table.
Reading the host's codon table.
Open in the workbenchOpened in this tab, the workbench carries this paste and offers every operation on it.
Worked example
- The human preproinsulin coding sequence (NM_000207.3), read against the E. coli K-12 whole-genome codon table: the index, the codons scored and the rare codons are computed on this page as it opens, from the host table published with this version.
- Choose another of the five hosts, or recode the sequence under hard constraints (named enzyme sites absent, a homopolymer cap and GC windows) and download the synthesis FASTA with its constraint report. The protein is kept; a codon no change can satisfy is left as it was and listed.
- The index measures resemblance to the codon usage of all the host's annotated genes, not its most highly expressed ones, and is not a prediction of expression.
Method
w = a codon's count over its amino acid family's highest in the host table (a zero cell taken as 0.5); CAI = the geometric mean of w over the scored codons, with AUG, UGG, the start codon and the terminal stop left out (Sharp and Li 1987)
- Codon adaptation index against a whole-genome table. Sharp PM, Li WH (1987). The codon adaptation index: a measure of directional synonymous codon usage bias, and its potential applications. Nucleic Acids Res 15(3):1281-1295 (eqs. 2 and 6-7). The relative adaptiveness w of a codon is its count over the highest count in its amino acid's family, Leu, Ser and Arg each one family of six; a codon the table never counts takes the count 0.5, the paper's rule; stop codons have no w. CAI is the geometric mean of w over the scored codons. The reference set here is a whole-genome table: every complete annotated coding sequence of the host in NCBI RefSeq, by the rules the table states, not the paper's highly expressed genes. AUG and UGG are left out (p. 1285), as are the start codon of the coding sequence and the terminal stop (our reading of the paper's Table 1 and worked example) and ambiguous codons, which are counted. A stop before the last codon, a length that is not a multiple of three, a letter that is not a nucleotide code or a genetic code that reads any codon differently from the table's withholds the number.Checked against an independent oracle written before the engine (exact arithmetic in Python fractions, decimal for the root; Sharp and Li 1987's rules typed from the paper, never a value printed in it): the CAI within 1e-9, and every count, the replaced cells, the rare list and every withholding exact, on 15 hand cases (the three-codon case primary) and three real coding sequences (E. coli lacZ, yeast ADH1 and human INS) against each of the five host tables against the five host tables; the host counts recomputed by a second independent pass and cross-checked against Biopython 1.88's CodonAdaptationIndex (7 November 2026).
- Recoding for a host's codon usage under hard constraints. Each codon but the start codon, ATG, TGG and the terminal stop is replaced by the host table's most-used codon for its amino acid (ties to the first in NCBI's codon order). The constraints are hard filters re-checked on the finished sequence: the named enzymes' recognition sites absent on both strands (IUPAC codes read as Plasmid reads them; dam and dcm methylation does not change whether the letters carry a site), no run of one base longer than the cap, and GC over the whole sequence and over every 50-base window within the range. Where a constraint is broken, the next most-used synonymous codons are tried at the codons it covers, one change at a time, each kept only if it lowers the count of broken constraints; a constraint no change meets leaves the codons it covers as they were and is listed, never relaxed. The protein is translated before and after under the table's code and must be identical, or nothing is returned.Checked against a second implementation of the recoding rules written apart from the engine, with a constraint re-check that scans the finished sequence separately from the repair: the recoded letters, the protein, the codon and base counts, the left-as-they-were list and every constraint count exact, on five cases including one whose tight GC and homopolymer limits no change can meet, whose covered codons are left as they were and listed; the protein is translated from NCBI's tables and asserted identical before and after (7 November 2026).
Limits
- For research and education only, and not medical advice: nothing here is an assessment of any person's variant, sample or molecule, and a difference reported from a reference is a difference, not an interpretation.
- Tags and protease sites are found by their published motifs and a cut is proposed at the site nearest an end; confirm it, since a motif inside the protein is not a cleavage site.
Link to and cite this page
- Link to this page
https://www.drybench.com/sequence/codon-adaptation
This is the page's canonical address. Copy it rather than the address bar, which may carry the open workspace's state after #.
- Cite this page
Drybench. Codon adaptation index and recoding for a host. Drybench Sequence 0.16.0. https://www.drybench.com/sequence/codon-adaptation. Accessed [date].
The versions and the date tell a reader which numbers you saw; a later table or engine version may change them. How to cite