S5-5

Translation and the genetic code: codons, reading frames, start and stop

25 min

You now have both halves of the puzzle. On one side there is messenger RNA, a string over a four-letter alphabet A, C, G, U. On the other there is protein, a string over a twenty-letter alphabet of amino acids. Translation is the step that turns the first string into the second. The whole question of this lesson is one you can pose as a programmer before you know a shred of biology: how do you encode twenty output symbols using only four input symbols? Work that out honestly and almost everything else in the genetic code falls out as a consequence.

Four letters cannot name twenty things one at a time

Line up the arithmetic. Suppose the cell tried to read the mRNA one base at a time and have each single base stand for one amino acid. One base has four possible values, A, C, G, or U. Four codes cannot cover twenty amino acids. Sixteen amino acids would have no symbol at all. So one base per amino acid is a non-starter.

Try two bases per amino acid. Now each unit is a pair, and a pair of four-valued letters has 4 times 4, which is 16, possible values. Better, and still not enough. Sixteen falls four short of twenty. Any scheme that reads pairs must leave at least four amino acids unnameable.

Try three. A triplet of four-valued letters has 4 times 4 times 4, which is 64, possible values. Sixty-four is comfortably more than twenty. Three is the smallest word length that works, so three is what life uses. That is not a lucky guess by biologists, it is forced. If the alphabet has four letters and you must name at least twenty things, the shortest fixed word length that can do it is three.

A group of three consecutive mRNA bases that stands for one amino acid is called a codon. The code is read codon by codon, three bases per amino acid, start to finish.

Sixty-four slots, twenty meanings: redundancy is built in

Notice the mismatch you just created. You needed room for 20 amino acids and you ended up with 64 codons. That is 44 more codons than amino acids, even before you set aside a few for other jobs. The extra capacity does not go to waste and it does not go to new amino acids. Instead, most amino acids get more than one codon. Leucine, for example, is spelled by six different codons. This many-codons-for-one-amino-acid property is called degeneracy, or more plainly, redundancy.

Redundancy is the direct arithmetic consequence of packing 20 meanings into 64 slots. You cannot have 64 codons and 20 amino acids without either leaving codons meaningless or letting several codons share a meaning, and life chose sharing. Where codons for the same amino acid differ, they very often differ only in the third base. That detail matters more than it looks, and we will come back to it.

The ribosome reads codon by codon, and tRNA is the adapter

Here is the machine. The ribosome is the assembly line that walks along an mRNA and builds the protein. It moves in steps of exactly three bases. At each step it reads the current codon, adds one amino acid to the growing chain, and shifts forward by three to the next codon. Read three, add one, step three, repeat. The protein grows one residue per codon until the machine hits a signal to stop.

But how does a three-base codon, which is made of RNA, physically pick out an amino acid, which is a completely different kind of molecule? There is no chemical resemblance between the letters GCA and the amino acid alanine. Something has to bridge the two worlds. That bridge is transfer RNA, or tRNA, and its whole design is to be an adapter.

A tRNA molecule has two business ends. One end carries a three-base stretch called its anticodon that pairs with a codon on the mRNA, base for base, the same pairing rules you already know. The other end carries one specific amino acid. So a tRNA is a physical lookup entry: this codon on one side, that amino acid on the other. The ribosome does not decode meaning by chemistry. It just lets each incoming tRNA test its three bases against the current codon, and when one matches, the amino acid riding on that tRNA gets added to the chain.

That is the deep reason the genetic code is a code at all, and not a law of chemistry. Nothing about the shape of GCA forces it to mean alanine. The meaning is assigned, physically, by which amino acid a separate loading enzyme attaches to the tRNA that reads GCA. Change what gets loaded and you would change what the codon means. The mapping is a table the cell implements with molecules, not a fact dictated by physics. We call it the genetic code precisely because it is a convention, editable in principle, that life happens to share almost everywhere.

The reading frame: where you start decides how everything groups

Now for the subtle part, the one this course was rebuilt to teach properly. The codons in an mRNA are not separated by spaces, commas, or any marker between them. The message is one unbroken run of bases, like AUGGCACUGACCUAA. The ribosome imposes the grouping by reading three, then three, then three. So the grouping depends entirely on where the counting starts.

Watch what a one-base shift does to the same string. Start at the first base and you group it as AUG GCA CUG ACC UAA. Start instead at the second base and the very same letters group as UGG CAC UGA CCU AA, a completely different list of codons. Start at the third base and you get yet another list. The bases never moved. Only the starting point moved, and that alone rewrote every codon.

Each choice of starting point is called a reading frame. Because a codon is three bases wide, there are exactly three distinct frames on a given strand: start at base one, base two, or base three. Starting at base four lands you back in step with starting at base one, so the pattern repeats after three and there is nothing new past frame three. And since DNA has two strands, and the opposite strand can also be read as its own message, there are three frames per strand for a total of six reading frames across a stretch of double-stranded DNA. Read the same physical DNA in a different frame and you generally get a different, usually meaningless, protein.

Insert or delete one base and everything downstream garbles: the frameshift

Because there is no separator and no length header, the frame is held together by nothing but the count of bases from the start. So think carefully about two different kinds of single-base error and predict their damage.

First, a substitution: change one base to a different base. AUG GCA CUG becomes AUG GUA CUG, say. You have altered exactly one codon. Every codon before it and every codon after it groups the same way as before, because you neither added nor removed a base, so the running count is untouched. The blast radius is one codon.

Now an insertion or a deletion of a single base, together called an indel. Delete the first G and the stream is one base shorter, so from that point on every triplet boundary slides over by one. AUG GCA CUG ACC becomes AUG CAC UGA CC. Codon 1 still reads AUG here only by luck, because the deleted base sat right at the boundary next to an identical G, so the first codon is spared and the shift begins at codon 2. Everything past the cut is regrouped into different codons. This is a frameshift: an indel shifts the frame for the entire remainder of the message, so the ribosome reads a garbled, unrelated sequence downstream, usually running into a premature stop. One base added or removed can wreck an entire protein, while one base swapped touches a single residue. That asymmetry is a direct consequence of there being no framing protocol, only a base count, and it is one of the most important predictions in all of molecular biology.

Start here: the AUG codon sets the frame

If where you start determines everything, the cell needs an unambiguous way to say start here. That signal is a specific codon, AUG. When the translation machinery locks onto an AUG to begin, two things happen at once. It places the first amino acid, methionine, which is what AUG codes for, and it fixes the frame, because every codon after it is counted in threes from that AUG. Choose the start and you have chosen the frame for the whole rest of the read.

Stop: UAA, UAG, UGA, and the end of the record

Something also has to say stop, or the ribosome would keep adding amino acids off the end of the useful message. Three codons do that job: UAA, UAG, and UGA. These are the stop codons, and they are special in a clean way. No tRNA carries an amino acid for them. When one of the three comes up in frame, no matching tRNA arrives, the ribosome reads it as a terminator, and it releases the finished protein.

This is the part of the bitstream analogy that actually holds up well. A stop codon is genuinely reserved: it never codes an amino acid, so it behaves like the null byte that ends a C string, a value set aside to mean end here and nothing else. The catch that carries over from the frame discussion is that a stop codon only stops if it is in frame. The bases UGA might sit right there in the sequence, but if your frame groups them as U GAx, they are not a stop at all. Only a stop read as a whole codon, on the current frame, ends the protein.

The open reading frame: a candidate recipe

Put start and stop together and you get the unit that gene-finding is built on. An open reading frame, or ORF, is a stretch that runs from a start codon to the next in-frame stop codon, with no stop codon interrupting it in between. It is an uninterrupted run of codons that could be translated straight through into a protein. The word candidate matters. An ORF is a plausible recipe, a region that reads like it could code for a protein, not proof that the cell actually makes that protein.

Run the compiler

Now do it yourself, because reading about frames is not the same as feeling one break. The interactive below is a small DNA-to-protein compiler. Start with what it gives you. In frame 0 on the plus strand, the default sequence reads as the protein MALT before it hits a stop. First, type your prediction into the predict box and reveal it, so you are guessing the output, not just watching it. Then change the reading frame from 0 to 1 without touching the sequence and watch every codon regroup into a different, usually nonsense, read. That is the frame idea, live.

Then mutate. Click a base and substitute another base to see a silent change (protein unchanged, thanks to redundancy), a missense change (one residue swapped), or a nonsense change (a premature stop). Finally, use insert or delete to introduce an indel and watch the frameshift ripple through every codon downstream while a substitution never does. Try to predict the classification before you read the label the widget gives you.

translate.ts

Edit the sequence, or click any base below to mutate it. On the minus strand the reverse complement is read.

Mstart
A
L
T
STOPstop
Pick a base above to substitute, or use the indel controls.
Protein
MALT
Show the translation code

The whole breakdown above is this loop: read the mRNA three bases at a time, look each codon up in the genetic code, and stop at the first stop codon (just like a ribosome releasing the finished chain).

translate.ts
// translate.ts: the ribosome as a loop over codons
const CODON_TABLE: Record<string, string> = {
  AUG: "M", GCA: "A", CUG: "L", ACC: "T",
  UAA: "*", UAG: "*", UGA: "*", /* ...all 64 codons... */
};

function translate(mrna: string): string {
  const rna = mrna.toUpperCase().replace(/T/g, "U");
  let protein = "";
  for (let i = 0; i + 3 <= rna.length; i += 3) {
    const aa = CODON_TABLE[rna.slice(i, i + 3)] ?? "X";
    if (aa === "*") break; // ribosome releases at the first stop
    protein += aa;
  }
  return protein;
}

translate("AUGGCACUGACCUAA"); // "MALT"

Key terms

codon
A group of three consecutive mRNA bases that specifies one amino acid or a stop signal.
the genetic code
The lookup table mapping each of the 64 codons to an amino acid or stop, implemented physically by tRNAs rather than dictated by chemistry.
degeneracy (redundancy)
The property that most amino acids are specified by more than one codon, a consequence of packing 20 meanings into 64 slots.
transfer RNA (tRNA)
The adapter molecule that pairs its three bases with a codon at one end and carries the matching amino acid at the other.
reading frame
The choice of starting point that fixes how a continuous base stream is grouped into codons, with three frames per strand.
frameshift
The shift of every downstream codon caused by inserting or deleting a base, which garbles the rest of the protein.
start and stop codons
AUG begins translation and codes methionine while setting the frame, and UAA, UAG, or UGA end it and code no amino acid.
open reading frame (ORF)
A run from a start codon to the next in-frame stop with no stop in between, a candidate protein-coding stretch.
Is the genetic code universal? Almost, and the exceptions are the tell

You will often hear the genetic code called universal, meaning that AUG codes methionine and UGA means stop in a bacterium, a fungus, and a whale alike. That near-universality is one of the strongest pieces of evidence that all known life shares a common ancestor, since a single shared lookup table is easiest to explain if it was inherited once and rarely touched. But it is not a physical law, and there are real exceptions. Some mitochondria and a few single-celled organisms reassign a codon, most famously reading a codon that is usually stop as an amino acid instead. Those exceptions actually prove the earlier point: if the mapping from codon to amino acid were forced by chemistry, it could not vary at all. It varies, just barely, exactly because it is a table the cell implements with tRNAs and loading enzymes, and a table can be rewritten. Treat "the code is universal" as a superb rule of thumb, not an inviolable constant.

Check yourself

1. Why does the genetic code read three bases at a time rather than two?

2. Which statement about start and stop codons is correct?

3. You have a coding sequence. In case A you substitute one base for another. In case B you delete one base near the start. What is the most likely difference in effect?

4. In the compiler, you change the third base of a codon and the protein comes out exactly the same. What best explains this silent result?

4 unanswered