SeqBench

Reverse Translation: Turning a Protein Back into DNA (and What CAI Measures)

6 min read · Updated July 10, 2026

You have a protein sequence, from a paper, a mass spec peptide hit, or a target you designed at the amino acid level, and you need DNA: a gene to order, or a primer to fish the corresponding gene out of an organism whose sequence you don't have yet. The catch is that the genetic code runs one direction cleanly, DNA to protein, but not the other: a given protein maps back to many possible DNA sequences, not one. This guide covers the two practical ways to back-translate a protein into DNA, where each one runs into trouble, and how the Codon Adaptation Index gives you a number for how closely the codon choices in a coding sequence match a chosen expression host.

Why there's no single right answer

The genetic code is redundant by design. Of the 20 amino acids, only methionine and tryptophan have a single codon each, ATG and TGG; every other amino acid is encoded by somewhere between two and six synonymous codons, and serine, leucine, and arginine each have six. That redundancy is exactly why reverse translation is a choice, not a lookup: translating DNA to protein is deterministic, but going backward from a protein sequence you are picking one path through a tree of two to six options at almost every position. For a few hundred residues, the number of DNA sequences that would translate back to the same protein is enormous, and they are not interchangeable, because codon choice affects mRNA structure, translation speed, and how well a given organism's translation machinery reads the message.

Two ways to back-translate a protein

There are two common strategies for turning a protein into a DNA sequence.

  • Most-frequent codon per residue. For every amino acid in the protein, substitute the single codon used most often for that amino acid in a chosen host's codon usage table. This is fast, deterministic, and produces one clean DNA sequence, useful as a starting point when you are ordering a synthetic gene for a given expression host.
  • Degenerate IUPAC codon per residue. Instead of picking one codon, collapse the full set of synonymous codons for each residue into a single codon written with IUPAC ambiguity codes, for example leucine's six codons are commonly approximated as YTR or YTN. The result isn't one DNA sequence but a pool of sequences represented by one degenerate oligo, exactly what you need for a degenerate primer meant to amplify an unknown gene when you only know a peptide or protein fragment.

Where each method breaks down

Neither approach is free of caveats. Using the single best codon at every position is not how real genes look: natural coding sequences mix codons, and forcing the top codon everywhere can create runs of identical or near-identical codons, unwanted repeats, or restriction sites, and can push local or overall GC content to an extreme the host tolerates poorly.

Collapsing synonymous codons into one IUPAC triplet is an approximation, not an exact operation. A single degenerate codon that covers all of an amino acid's synonyms sometimes also covers codons for other amino acids, or fails to cover one of the intended synonyms cleanly. YTR/YTN for leucine is the standard shorthand, but it is a practical compromise, not a guarantee that the primer pool contains only leucine-encoding sequences at that position. Treat a degenerate back-translation as a starting point for primer design, then check the resulting sequence rather than assuming it is exact.

What the Codon Adaptation Index measures

Once you have a DNA sequence, back-translated, or an existing gene you are evaluating, the Codon Adaptation Index (CAI), introduced by Sharp and Li in 1987, gives a single number for how closely its codon usage matches a reference host's preferences. It is calculated in two steps:

  1. For each codon in the sequence, calculate w, the ratio of that codon's usage frequency to the frequency of the most-used synonymous codon for the same amino acid, in the host's codon usage table.
  2. CAI is the geometric mean of all the w values across every codon in the sequence; methionine and tryptophan trivially score w = 1, since each has only one codon to choose from.

Reading a CAI score

CAI ranges from 0 to 1. A score near 1 means the gene almost always uses each amino acid's single most-preferred codon in that host; a lower score means it relies more on rarer synonymous codons. CAI is most useful as a before-and-after comparison: compute it on your back-translated or original sequence, then again after codon optimization, to quantify the shift toward the host's preferred codons.

Treat it as one diagnostic among several, not a target to maximize blindly. An unnaturally uniform, maximum-CAI sequence is not automatically better than a realistic gene with a more varied codon distribution, since real highly-expressed genes rarely use the top codon at every position. mRNA secondary structure, overall GC content, and codon or sequence repeats all influence expression independently of CAI, so a high score does not rule out a hairpin or repeat that stalls translation.

From peptide to working coding sequence

The practical order of operations is usually: back-translate the protein, or design a degenerate primer if you are working from a partial peptide sequence and an unknown gene, check the CAI of the result against your intended expression host, and only then decide whether it is worth running through full codon optimization.

SeqBench's Reverse Translate tool handles the first step, back-translating a protein to DNA using either most-frequent codons for a chosen host or degenerate IUPAC codons when you need one primer sequence to cover several synonymous possibilities. From there, the Codon Adaptation Index tool scores the coding sequence against an expression host so you can see where it stands before you touch anything, and the Codon Optimizer tool takes it the rest of the way if the score or other diagnostics say it needs work.

Frequently asked questions

Is there a single correct way to reverse translate a protein into DNA?

No. Because most amino acids have two to six synonymous codons, a protein maps to many possible DNA sequences; back-translation means choosing one systematically, using the most-frequent codon per residue or a degenerate IUPAC codon, not looking up a unique answer.

When should I use a degenerate codon instead of the most-frequent codon?

Use a degenerate IUPAC codon when you need one physical oligo to cover several synonymous DNA sequences at once, such as a degenerate primer for amplifying a gene from a known peptide sequence; use the most-frequent codon per residue when you want a single clean DNA sequence for gene synthesis.

What is a good Codon Adaptation Index score?

CAI runs from 0 to 1, and values closer to 1 mean the sequence more often uses each amino acid's top codon for the reference host; there is no universal cutoff for good, so CAI is best read as a before-and-after comparison rather than a pass or fail number.

Does a high CAI guarantee good expression?

No. CAI only reflects codon usage bias; mRNA secondary structure, GC content, and sequence repeats also affect real expression levels, so a high-CAI sequence can still express poorly if those other factors are unfavorable.

Related references

Related tools

Related guides