Codon usage

Counts every codon in a coding sequence and plots how often each one is used.

Codon usage

What does a codon usage table show?

The genetic code is redundant: 61 codons encode 20 amino acids, so most amino acids have two, four or six synonymous codons. Genes do not use them evenly. A codon usage table counts how often each of the 64 codons appears in a coding sequence and reports three numbers for each:

Number = times the codon occurs in frame
Per 1000 = 1000 × number ÷ all codons counted
Fraction = number ÷ codons for the same amino acid

The per thousand column is the one published host tables use, and all 64 values add up to 1,000. The fraction column is the one that shows bias, because it divides out how common the amino acid itself is. The chart draws the per thousand value of every codon in codon table order, four bars per group, so a gene that leans on one codon of a family is visible at a glance.

What is GC3?

GC3 (%) = 100 × codons with G or C in position 3 ÷ codons counted

Third positions are where synonymous codons differ, so GC3 measures codon choice rather than the protein. Values near 50 % mean little third-position bias. High GC3 is typical of genes written for mammalian cells and of GC-rich genomes such as Streptomyces; low GC3 is typical of Plasmodium and of many yeast genes.

Worked example

"Try an example" loads the 720 nt coding sequence of EGFP, which is 240 codons. Only31 of the 64 codons occur in it, and GC3 is 96.7 %: this gene was written for mammalian cells, and almost every third base is G or C. The most frequent codons are AAG (Lys) and GGC (Gly) with 19 each, which is 79.2 per thousand; the tool names AAG, the first of the two in codon table order. CTG carries 18 of the 21 leucine codons, a fraction of 0.86, while CTA, CTT and TTA never appear. Choose E. coli under "Compare with" and the reference line sits far below the bars for GGC, CTG and GAC and far above them for AAA and GAA, which is why this gene is a poor fit for E. coli and the reasoncodon optimisation exists.

Reading the chart

  • One bar per codon, 64 in all, in codon table order: the four bars of a group share their first two bases, and the label under the group gives those two bases.
  • Height is the frequency per thousand codons in your sequence. Stop codons are drawn in grey.
  • With a host chosen under "Compare with", a short horizontal line marks that host's frequency for the codon. A bar far above its line is a codon your gene over-uses compared with the host, and an empty slot under a high line is a codon the host prefers and your gene avoids.

Where do the host tables come from?

The reference frequencies are those of the Codon Usage Database at the Kazusa DNA Research Institute (Nakamura, Gojobori and Ikemura, Nucleic Acids Res 2000), compiled from GenBank coding sequences: Escherichia coli W3110 (1,372,057 codons),Saccharomyces cerevisiae (6,534,504 codons) and Homo sapiens (40,662,582 codons). The same tables are used by the rare codon analysis and the codon optimizer.

The genetic code option changes only which amino acid a codon is assigned to, and so which codons count as synonyms. The standard code covers nuclear genes of every organism; the three mitochondrial codes differ in a handful of codons, for example TGA is tryptophan rather than a stop.

What the warnings mean

  • Length is not a multiple of 3: the last one or two bases cannot form a codon and are ignored. Check that the sequence starts at the first base of the first codon.
  • Internal stop codon: usually the wrong reading frame, or a sequence that still carries untranslated regions. All codons are still counted.
  • Codons with ambiguous bases: a codon containing N or another IUPAC code cannot be assigned and is left out of every total.

To translate the frame and check it, use theDNA to protein translator; to find the frame, the ORF finder. For the standard code itself see thecodon table, and for GC content along the sequence theGC content calculator.

Frequently asked questions

How do you make a codon usage table from a sequence?

Read the coding sequence in frame from its first base, three bases at a time, and count how often each of the 64 codons occurs. The count is then expressed per 1,000 codons, so tables from genes of different lengths can be compared, and as a fraction of the synonymous codons for the same amino acid, which is what shows the bias.

What is the difference between frequency per thousand and fraction of synonyms?

Frequency per thousand mixes two things: how common the amino acid is and which of its codons is preferred. All 64 values add up to 1,000. The fraction of synonyms removes the first effect by dividing by the total for that amino acid, so the six leucine codons add up to 1. Use the fraction to judge codon bias and the per thousand value to compare with a published host table.

What is GC3 and why does it matter?

GC3 is the share of codons whose third base is G or C. The third base is the one that is usually free to change without changing the amino acid, so GC3 tracks codon bias rather than protein composition. It is high in genes optimised for mammalian expression and in GC-rich genomes, and it correlates with expression level in many species.

Can I paste more than one sequence?

Yes. Every FASTA record is read in frame from its own first base and the counts are pooled into one table, which is how a codon usage table for a genome or a gene set is normally built. Records that are not a multiple of three lose their last one or two bases and are reported under the input.

Why does the chart look different from a published host table?

Because it counts one gene, not a genome. A single gene of 300 codons gives each codon an average of fewer than 5 counts, so the sampling noise is large. Choose a host under "Compare with" to see the reference frequencies drawn over the bars, and read the fraction of synonyms rather than single counts.