Life as information processing
Here is ubiquitin, written as a sequence:
MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG
There are 76 letters. Each names an amino acid, beginning with methionine, M, and ending with glycine, G. The string tells a cell which units to join and in what order. It contains no explicit instruction to bend at one position or put two distant residues in contact. Yet the resulting chain can settle into the compact molecule we just examined.
To see where the string comes from, follow one protein-coding gene through the cell. The operations will look familiar. The interesting part is what the symbols mean physically.
A letter stands for a molecule
A polymer is a molecule made by joining many smaller units, or monomers. DNA, RNA, and proteins are polymers whose units occur in an order. We can therefore record each chain as a string, provided that we agree on an alphabet and a direction.
| Chain | Repeating unit | Standard alphabet | Direction we write it |
|---|---|---|---|
| DNA | nucleotide | A, C, G, T | 5′ to 3′ |
| RNA | nucleotide | A, C, G, U | 5′ to 3′ |
| Protein | amino acid residue | A C D E F G H I K L M N P Q R S T V W Y | N to C |
The letters are typed data. A in DNA means adenine; A in a protein means alanine. A sequence without
its molecule type can be ambiguous.
A nucleotide has a sugar, a phosphate group, and a base. The base is the part named by the letter: adenine, cytosine, guanine, thymine, or uracil. DNA uses the sugar deoxyribose; RNA uses ribose, which has an additional OH group. Their standard alphabets differ at T and U. Chemical modifications add further possibilities, but these four-letter alphabets describe the ordinary sequence.
A and G have two fused rings and belong to the purine family. C, T, and U have one ring and are pyrimidines. These names describe shapes we will recognize when we examine nucleic-acid structures.
The sugars and phosphates join into the chain's backbone. Its two ends are chemically different, and the
names 5′ and 3′ come from numbered carbon atoms in the sugar. You do not need the drawing yet. You do
need the direction: 5′-ACG-3′ and 5′-GCA-3′ are different sequences.
A protein has a different repeating backbone. Each amino acid contributes to a chain of peptide bonds and carries a variable side chain. The side chain distinguishes alanine from lysine, leucine, and the other amino acids. Its ends are the amino end, or N-terminus, and the carboxyl end, or C-terminus. The first letter names the residue at the N end.
A 76-letter sequence is thus a compact recipe for hundreds of atoms and their covalent connections. The standard residue structures and the standard links between them are implied. Protonation, chemical modifications, and bound partners require additional information. Positions in space require much more.
Making a working copy
DNA commonly consists of two strands held together by complementary base pairing. A pairs with T, and G with C. The strands run in opposite directions. Write a short stretch with both strands visible:
coding DNA: 5′-ATG CAG ATT TTC-3′
template DNA: 3′-TAC GTC TAA AAG-5′
RNA: 5′-AUG CAG AUU UUC-3′
During transcription, an enzyme called RNA polymerase uses the template strand to build RNA. It reads the template in the 3′-to-5′ direction while extending the RNA in the 5′-to-3′ direction. Complementarity chooses each arriving nucleotide. The RNA matches the other DNA strand, called the coding strand, with U replacing T.
The distinction prevents a common programming error. Given coding DNA written 5′ to 3′, replace T with U. Given template DNA written 5′ to 3′, reverse its order and complement its bases. In the drawing above, the template is already written 3′ to 5′, so complementing left to right gives the displayed RNA.
The cell transcribes selected regions of DNA. A gene is a region whose expression produces a functional RNA or, through RNA, a protein. For many eukaryotic protein-coding genes, the first RNA copy also contains segments that are removed. These removed segments are introns; the retained segments are exons, joined by splicing. The mature messenger RNA, mRNA, carries the sequence the ribosome will read.
Some RNAs do their work as RNA. They never pass through the protein alphabet. Ribosomal RNA is part of the ribosome itself, and transfer RNA carries amino acids to it. This will become especially tangible when we inspect the folded tRNA molecule in chapter 7.
An experiment with only one letter
In 1961, Marshall Nirenberg and Heinrich Matthaei gave protein-making extracts from E. coli an
artificial RNA consisting entirely of U. A natural RNA would have left them trying to match a complicated
input to a complicated product. With UUUUUU…, they could ask a much narrower question: which amino
acid would appear in the newly synthesized chain?
Radioactively labeled amino acids, detectable through their radiation, let them track incorporation into the product. Poly-U strongly stimulated incorporation of phenylalanine. The experiment established a connection between an RNA composed of U and a chain composed of phenylalanine.The experimental system and measurements are in the 1961 paper.
There is a limit to what this experiment alone tells us. A run of U looks identical whether we divide it into pairs, triplets, or longer blocks. Other evidence was needed to establish the word length. With that evidence, the result gave UUU its meaning in the code table. Simplifying the input made one assignment accessible without solving the entire code at once.
Reading three bases at a time
Translation builds a protein from an mRNA sequence. A ribosome binds the RNA, establishes a starting position, and reads successive groups of three bases, called codons. Each codon selects the next amino acid according to the genetic code.
Why three? One base gives four possible words. Two give , too few to name twenty amino acids. Three give , enough for the amino acids and signals to stop. This counting argument tells us that triplets are the shortest fixed-length words that could work. It does not explain why evolution assigned particular meanings to particular triplets; those assignments were discovered experimentally.
In the standard code, 61 codons name amino acids and three are stop signals: UAA, UAG, and UGA. Several codons can name the same amino acid. GGU, GGC, GGA, and GGG all mean glycine. This is redundancy: several inputs have the same output. A codon still has one assigned meaning in the standard table.
The machinery implements the lookup through transfer RNAs, or tRNAs. Each tRNA carries an amino acid and has a short sequence that pairs with an mRNA codon. Enzymes load the appropriate amino acid onto each tRNA. The ribosome positions successive tRNAs so that their amino acids can be joined, adding one residue at a time to the growing chain. Ribosomal RNA catalyzes the peptide-bond-forming step. At a stop codon, release factors allow the completed chain to leave.
Follow the made-up coding sequence for ubiquitin's first eight residues. During transcription, compare the RNA with both DNA strands. During translation, pause at each codon and predict the next residue before advancing. The final triplet is a stop signal and contributes no residue.
A frame is part of the input
The string AUGCAGAUUUUC can be split as AUG CAG AUU UUC, or, starting one position later,
UGC AGA UUU. Both contain valid codons. There are no spaces in the molecule to tell the ribosome which
split we intended.
Initiation in ordinary cellular translation establishes the reading frame. AUG, which codes for methionine, is the usual start codon, but cellular signals and surrounding sequence determine which start is used. A ribosome does not simply translate every AUG it encounters in every frame. Once elongation begins, it advances three bases at a time. The artificial poly-U experiment used a cell-free system under conditions that permitted synthesis without this ordinary start signal. An insertion of one base into a coding sequence can change every downstream codon, while an insertion of three bases can leave the downstream frame intact.
We can implement translation once the frame is supplied. In this code, frame=0 means start at the first
base. The function does not locate genes, choose a biological start site, or splice RNA; those decisions
have already been made in the short input.
BASES = "UCAG"
TABLE = "FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG"
CODE = {a + b + c: TABLE[16 * i + 4 * j + k]
for i, a in enumerate(BASES) for j, b in enumerate(BASES) for k, c in enumerate(BASES)}
def transcribe(coding_strand):
"""mRNA has the coding strand's sequence, with U for T."""
return coding_strand.upper().replace("T", "U")
def translate(mrna, frame=0):
"""Read codons from `frame` until a stop codon (*)."""
protein = []
for i in range(frame, len(mrna) - 2, 3):
aa = CODE[mrna[i:i + 3]]
if aa == "*":
break
protein.append(aa)
return "".join(protein)
gene = "ATGCAGATTTTCGTGAAAACCCTGTAA"
mrna = transcribe(gene)
print(mrna)
print(translate(mrna))
AUGCAGAUUUUCGUGAAAACCCUGUAA MQIFVKTL
The output is MQIFVKTL, ubiquitin's first eight residues. The * entries in the table terminate the
loop. No * enters the protein string.
The order UCAG is just an indexing convention. The code converts each codon into three base-4 digits,
then uses 16*i + 4*j + k to index a 64-element table. You could replace this representation with a
dictionary of 64 explicit pairs without changing the biology.
This widget labels frames 1, 2, and 3; the Python function uses offsets 0, 1, and 2. Find AUG in frame 1, then change the frame and watch the codon boundaries move. The widget uses a simplified first-AUG rule, so its highlighted protein is an illustration of translation after choosing a start.
What redundancy buys, and what it does not
A base change from GGU to GGC leaves glycine in place. We call it synonymous because the protein sequence is unchanged. Change UGG to UGA instead and a tryptophan codon becomes a stop signal. Both changes affect a codon's third base, yet their consequences for the protein are very different.
Count how many codons name each amino acid:
from collections import Counter
per_aa = Counter(aa for aa in CODE.values() if aa != "*") # codons per amino acid
by_size = Counter(per_aa.values()) # how many amino acids have n codons
for n in sorted(by_size, reverse=True):
names = "".join(sorted(aa for aa, k in per_aa.items() if k == n))
print(f"{n} codon{'s' if n > 1 else ' '} each: {names} ({by_size[n]} amino acids)")
print("stop codons:", [c for c, aa in CODE.items() if aa == "*"])
6 codons each: LRS (3 amino acids) 4 codons each: AGPTV (5 amino acids) 3 codons each: I (1 amino acids) 2 codons each: CDEFHKNQY (9 amino acids) 1 codon each: MW (2 amino acids) stop codons: ['UAA', 'UAG', 'UGA']
Methionine and tryptophan have one codon each. Leucine, serine, and arginine have six each. The redundancy is uneven, and much of it sits at the third position. To quantify that observation, imagine drawing each of the 64 codons with equal probability. This is a mathematical experiment; real organisms do not use all codons equally.
Entropy here measures average uncertainty in bits: , with one term for each possible output label. A label that is already certain contributes no uncertainty.
A random codon then carries six bits. Once it passes through the lookup table, several distinct inputs become indistinguishable. The following calculation measures the entropy of the output label, including stop, and how much uncertainty remains after the first two bases are known.
from math import log2
def entropy(counts):
total = sum(counts)
return -sum(c / total * log2(c / total) for c in counts if c)
H_aa = entropy(Counter(CODE.values()).values()) # H(amino acid), codons uniform
by_prefix = {}
for codon, aa in CODE.items():
by_prefix.setdefault(codon[:2], []).append(aa)
H_left = sum(len(g) / 64 * entropy(Counter(g).values()) for g in by_prefix.values()) # H(aa | first two)
print(f"H(amino acid) = {H_aa:.2f} bits (6 bits in a codon)")
print(f"from the first two bases = {H_aa - H_left:.2f} bits")
print(f"left for the third base = {H_left:.2f} bits")
H(amino acid) = 4.22 bits (6 bits in a codon) from the first two bases = 3.70 bits left for the third base = 0.52 bits
The output has about 4.22 bits of entropy. Knowing the first two bases removes about 3.70 bits, leaving 0.52 bits to be resolved by the third. For GGN, those first two bases resolve everything: the output is glycine regardless of N. For UGN, the last base still distinguishes cysteine, tryptophan, and stop.
A synonymous change leaves this sequence-level output unchanged. In a cell it can still affect RNA processing or the rate of translation. A protein-sequence predictor receives identical input for the two synonymous versions, so it cannot infer those differences from that input alone.
Where the coordinates come from
The main flow for a protein-coding gene is
DNA can also be copied into DNA, and some biological systems copy RNA into RNA or back into DNA. The central dogma concerns transfers of sequence information; it does not provide a reverse translation from amino acid sequence into the original nucleic acid sequence.
After and often during synthesis, the protein chain explores shapes under the forces between its atoms and with its surroundings. Many proteins are assisted by chaperones, proteins that help prevent unproductive interactions or assist folding. The eventual behavior depends on conditions and partners as well as sequence, and some regions remain flexible instead of settling into one compact fold.
The codon table has already done its job when the residue order is specified. To obtain a structure, we must now account for a linked chain moving in three dimensions. This gives structure prediction its input and its task: infer plausible atomic arrangements from sequence and relevant context. The next lesson asks how to represent those arrangements in a form we can compute with.
Check yourself
Translate 5′-GGAUGUUUAAAGGCUGAUAA-3′ starting at its first AUG. Give the frame using both the widget's
one-based numbering and the Python function's zero-based offset.
Reasoning
AUG begins at the third base: frame 3, or frame=2. The codons are AUG UUU AAA GGC UGA, giving MFKG and
then stop. Starting at the first base would produce a different segmentation; knowing the same letters
without the start position is insufficient.
You receive template DNA as 5′-AAACTGCAT-3′. What RNA does this segment specify? Explain each operation.
Reasoning
Reverse it to read the template 3′ to 5′: TACGTCAAA. Complement into RNA, using U opposite A, to get
5′-AUGCAGUUU-3′. If translated in that frame, the segment gives MQF. Replacing T with U in the original
input would mistakenly treat the template strand as the coding strand.
A hypothetical organism uses three nucleotide types and twenty amino acids plus a stop signal. Could it use two-base codons? How much unused capacity would three-base codons provide?
Reasoning
Two bases provide only words. Three provide 27, enough for 21 meanings with six additional words available for redundant assignments. Counting establishes capacity; it does not specify which mutations are synonymous without the actual assignment table.
Two genes encode the same amino acid string. A structure predictor takes only that string and returns one model for each gene. Should its outputs depend on which gene supplied the string? What information would it need to model effects of different translation rates?
Reasoning
With identical inputs and settings, a deterministic predictor must return the same output. Translation-rate effects require additional inputs, such as codon sequence and cellular context, and a model that uses them. No choice of network architecture can reconstruct information that the input has discarded.