Input
The host list is read from the codon-usage tables shipped with this site; each entry carries the organism and the number of coding sequences it was counted over. Provenance: codon usage tables.
Output hover a codon for its usage
Method: each residue is assigned a codon from the host usage table, penalised for immediate repetition, for homopolymer runs of 5 nt or longer, and for drift outside a 42–60% running GC band. CAI is the geometric mean of the relative adaptiveness of the chosen codons (Sharp & Li, 1987). Limit: single-pass selection on single-codon weights. Codon-pair bias, mRNA structure and motif avoidance are not considered here.
METHOD
How it is calculated
Back-translation turns each amino acid into one of its synonymous codons. This tool weights that choice by how often each codon is used in the host's coding sequences, using the 28 codon-usage tables published on this site, and reports the result's codon adaptation index.
Strict picks the codon with the largest w at every position, so CAI is 1 by construction and no sequence constraint is applied. Balanced samples codons in proportion to w2.2, then multiplies a candidate's weight by 0.22 if it repeats the previous codon, by 0.18 for each base a homopolymer run extends beyond 4, and by 0.6 per G/C (or A/T) when the running GC has drifted above 60 % (or below 42 %). The sampling is seeded by the host name, so the same input and host always give the same DNA.
Paste a DNA coding sequence instead of a protein and the tool reads it as codons, translates it, and re-optimises it, showing the CAI before and after.
These weights and penalties are rules of thumb for a readable first draft; they are not a validated design objective. For a single sequence's CAI against a chosen table, use the CAI calculator.
Which calculation this page matches
In 56 test runs across the published tables and both modes, the DNA this tool returns translates back to the input protein with no mismatch in Biopython, and the CAI it reports equals Biopython's CodonAdaptationIndex computed from the same table and the same 0.0001 floor for unused codons.
References
- 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:1281-1295. doi:10.1093/nar/15.3.1281
- Sharp PM, Tuohy TM, Mosurski KR (1986) Codon usage in yeast: cluster analysis clearly differentiates highly and lowly expressed genes. Nucleic Acids Res 14:5125-5143. doi:10.1093/nar/14.13.5125
WORKED EXAMPLE
A worked example, computed by this page
Protein MKTAYIAKQRQISFVKSHFSRQLEERLGLI (30 residues), host Mycobacterium bovis (1229 coding sequences, the first table offered), Strict mode, stop codon appended:
ATGAAGACCGCCTACATCGCCAAGCAGCGCCAGATCTCGTTCGTGAAGTCGCACTTCTCGCGCCAGCTGGAGGAGCGCCTGGGCCTGATCTAA
| Length | 93 nt |
| GC | 60.2 % |
| CAI | 1.000 |
Strict mode reaches CAI 1 by always taking the top codon. Switch to Balanced to trade some adaptiveness for fewer repeats and a GC closer to the 42–60 % band.
WHERE THIS RUNS
The calculation runs in your browser
The arithmetic on this page is JavaScript executing in your browser. The sequence you enter is not sent anywhere: the calculator makes no network request with it, and there is no account, upload or server-side step. The page downloads the codon-usage table you select, as a static file from this site; your sequence is not part of that request.