Who's buried?

Lab 2 of Biology Primer for Computer Scientists. Download the code as a notebook.

You'll compute how exposed every residue is in three real proteins, score the "hydrophobic means buried" rule against them, and then use the same measurement to find where hemoglobin's chains touch. The structures are ubiquitin (1UBQ), ribonuclease A (7RSA), the catalytic subunit of protein kinase A (1ATP, chain E), and deoxyhemoglobin (4HHB).

Everything runs with Biopython, NumPy, and Matplotlib, and the notebook linked at the top has every cell. Try each task before opening its solution.

Task 1: relative accessibility for every residue

Write a function that takes a PDB id and returns, for every amino-acid residue, its chain, name, number, and relative solvent accessibility (accessible area divided by the Tien et al. 2013 maximum for that residue type, as in lesson 2.4). Strip waters and other non-protein groups first: 7RSA contains a bound solvent molecule, and 1ATP contains ATP, two manganese ions, and two phosphorylated residues (a phosphothreonine and a phosphoserine) that Biopython files as non-standard. Keep only chain E of 1ATP; chain I is a bound inhibitor peptide, a short chain that blocks the enzyme.

Solution
import numpy as np
from Bio.PDB.SASA import ShrakeRupley
from Bio.PDB.DSSP import residue_max_acc
from primer import structure

MAX_ASA = residue_max_acc["Wilke"]          # Tien et al. 2013, theoretical maxima in Ų

def accessibility(pdb_id, chains=None):
    """[(chain, residue name, number, relative accessibility)] for the standard residues of a model."""
    model = structure(pdb_id)[0]
    for chain in list(model):
        if chains and chain.id not in chains:
            model.detach_child(chain.id)
            continue
        for res in [r for r in chain if r.id[0] != " "]:
            chain.detach_child(res.id)
    ShrakeRupley().compute(model, level="R")
    return [(c.id, r.get_resname(), r.id[1], r.sasa / MAX_ASA[r.get_resname()]) for c in model for r in c]

proteins = {"ubiquitin": accessibility("1UBQ"),
            "ribonuclease A": accessibility("7RSA"),
            "protein kinase A": accessibility("1ATP", chains={"E"})}
for name, rows in proteins.items():
    rsa = np.array([x for *_, x in rows])
    print(f"{name:17} {len(rows):>4} residues, {np.mean(rsa < 0.2):.0%} buried (rsa < 0.2), "
          f"median rsa {np.median(rsa):.2f}")
ubiquitin           76 residues, 32% buried (rsa < 0.2), median rsa 0.35
ribonuclease A     124 residues, 44% buried (rsa < 0.2), median rsa 0.27
protein kinase A   334 residues, 52% buried (rsa < 0.2), median rsa 0.18

Larger proteins bury a larger fraction of their residues. A sphere's volume grows faster than its surface, so a bigger protein has proportionally more inside.

Task 2: predict, then check

Predict each residue as buried if it is one of A, V, L, I, M, F, W, C and exposed otherwise. Score the rule on each protein: its accuracy, and two error counts, hydrophobic residues that are exposed and polar or charged residues that are buried. Before running anything, guess which error will be more common.

Solution
HYDROPHOBIC = {"ALA", "VAL", "LEU", "ILE", "MET", "PHE", "TRP", "CYS"}

for name, rows in proteins.items():
    predicted = np.array([res in HYDROPHOBIC for _, res, _, _ in rows])
    buried = np.array([x < 0.2 for *_, x in rows])
    exposed_hydrophobic = [f"{res}{n}" for (_, res, n, _), p, b in zip(rows, predicted, buried) if p and not b]
    buried_polar = [f"{res}{n}" for (_, res, n, _), p, b in zip(rows, predicted, buried) if b and not p]
    print(f"{name}: accuracy {np.mean(predicted == buried):.0%}; "
          f"{len(exposed_hydrophobic)} hydrophobic exposed, {len(buried_polar)} polar or charged buried")
    print("   buried polar or charged:", " ".join(buried_polar))
ubiquitin: accuracy 80%; 8 hydrophobic exposed, 7 polar or charged buried
   buried polar or charged: THR7 ASP21 LYS27 GLN41 THR55 TYR59 SER65
ribonuclease A: accuracy 72%; 11 hydrophobic exposed, 24 polar or charged buried
   buried polar or charged: GLN11 HIS12 ASP14 TYR25 ARG33 THR36 LYS41 ASN44 THR45 HIS48 GLU49 GLN60 ASN71 TYR73 GLN74 SER75 SER80 THR82 ASP83 SER90 TYR97 THR99 PRO117 ASP121
protein kinase A: accuracy 68%; 32 hydrophobic exposed, 76 polar or charged buried
   buried polar or charged: GLN42 LYS47 THR48 GLY50 GLY55 ARG56 HIS62 TYR69 LYS72 LYS76 GLN84 HIS87 THR88 ASN90 GLU91 LYS92 GLN96 SER109 ASP112 SER114 ASN115 TYR117 TYR122 GLY125 GLY126 GLU127 HIS131 GLU140 HIS142 ARG144 TYR146 GLN149 THR153 GLU155 TYR156 HIS158 ASP161 TYR164 ARG165 ASP166 LYS168 PRO169 ASN171 ASP175 GLY178 TYR179 GLN181 THR183 GLY186 THR195 THR201 TYR204 PRO207 GLU208 GLY214 TYR215 ASP220 GLY225 TYR229 GLU230 GLY234 PRO236 PRO237 PRO258 GLN274 ARG280 GLY287 ASP290 LYS292 HIS294 THR300 PRO316 ASP323 THR324 ASN326 GLY344

The rule scores 80% on ubiquitin and gets worse as proteins grow: 72% on ribonuclease A and 68% on the kinase. In the larger proteins, buried polar and charged residues outnumber exposed hydrophobic ones. Many of them are tyrosines, threonines, and histidines with hydrogen-bond partners, and glycines and prolines, which the rule calls exposed only because they aren't on its list. The kinase also buries several lysines and aspartates; Lys 72 and Asp 166, for example, are catalytic residues deep in the cleft where ATP binds. Ribonuclease A's eight cysteines are all buried, as its four disulfides would suggest.

Task 3: burial by residue type

Pool the three proteins and, for each of the twenty residue types, compute the fraction buried. Plot it against the Kyte–Doolittle hydropathy from lesson 2.3, and compute the rank correlation between the two.

Solution
import matplotlib.pyplot as plt
from collections import defaultdict

KD = {"ILE": 4.5, "VAL": 4.2, "LEU": 3.8, "PHE": 2.8, "CYS": 2.5, "MET": 1.9, "ALA": 1.8, "GLY": -0.4,
      "THR": -0.7, "SER": -0.8, "TRP": -0.9, "TYR": -1.3, "PRO": -1.6, "HIS": -3.2, "GLU": -3.5,
      "GLN": -3.5, "ASP": -3.5, "ASN": -3.5, "LYS": -3.9, "ARG": -4.5}

by_type = defaultdict(list)
for rows in proteins.values():
    for _, res, _, x in rows:
        by_type[res].append(x < 0.2)

names = sorted(KD, key=KD.get)
fraction = [np.mean(by_type[n]) for n in names]
counts = [len(by_type[n]) for n in names]

def ranks(values):
    return np.argsort(np.argsort(values))

rho = np.corrcoef(ranks([KD[n] for n in names]), ranks(fraction))[0, 1]
print(f"Spearman rank correlation, hydropathy vs fraction buried: {rho:.2f}")

fig, ax = plt.subplots(figsize=(6.4, 3.4))
ax.bar(range(len(names)), fraction, color="#2a78d6")
ax.set_xticks(range(len(names)), [f"{n.title()}\n{c}" for n, c in zip(names, counts)], fontsize=7)
ax.set_ylabel("fraction buried")
ax.set_xlabel("residue type, from hydrophilic to hydrophobic (count below)")
plt.show()
Spearman rank correlation, hydropathy vs fraction buried: 0.73
Arg 23 Lys 50 Glu 35 Gln 27 Asp 29 Asn 27 His 13 Pro 20 Tyr 21 Trp 6 Ser 32 Thr 31 Gly 29 Ala 33 Met 11 Cys 10 Phe 30 Leu 43 Val 33 Ile 31 residue type, from hydrophilic to hydrophobic (count below) 0.0 0.2 0.4 0.6 0.8 1.0 fraction buried

The trend is clear (a rank correlation of about 0.7) but noisy. Part of the noise is sample size: tryptophan appears six times in the three proteins, so one residue moves its bar by 17%. The rest is real. Tyrosine, tryptophan, and histidine are buried far more often than their negative hydropathy suggests, because their rings bury while their polar groups find partners. All ten cysteines are buried. Lysine, serine, and arginine are the most reliably exposed.

Task 4: where hemoglobin's chains touch

An interface is where two chains bury each other's surface. Compute the relative accessibility of hemoglobin's α chain (chain A of 4HHB) twice, once alone and once inside the full α₂β₂ tetramer. List the residues whose accessibility drops by more than 0.15.

Solution
alone = {n: x for _, _, n, x in accessibility("4HHB", chains={"A"})}
together = {n: x for c, _, n, x in accessibility("4HHB") if c == "A"}
names = {n: res for _, res, n, _ in accessibility("4HHB", chains={"A"})}

interface = [n for n in alone if alone[n] - together[n] > 0.15]
print(f"{len(interface)} residues of the α chain are buried by the other chains:")
print(" ".join(f"{names[n]}{n}" for n in interface))
25 residues of the α chain are buried by the other chains:
ARG31 LEU34 SER35 PRO37 THR38 THR41 TYR42 PRO44 ARG92 ASP94 VAL96 HIS103 VAL107 ALA110 ALA111 PRO114 PHE117 PRO119 ALA120 HIS122 ALA123 ASP126 LYS127 TYR140 ARG141

The interface residues come in stretches: around residues 31–44, 92–127, and the C-terminal Tyr 140 and Arg 141. They aren't all hydrophobic. Interfaces mix hydrophobic contacts with salt bridges and hydrogen bonds, and in hemoglobin some of those contacts change when oxygen binds (lesson 3.6).

Deoxyhemoglobin, colored by chain. Violet spheres mark the α-chain residues (chain A) that the other three chains bury, from Task 4. The hemes are drawn as sticks. In the surface view, notice how tightly the four chains pack.

Open 4HHB in Mol*

Task 5: look at burial

Color ubiquitin by burial. Viewers can color by any number stored per atom, and the usual place to put one is the B-factor column of a PDB file (normally a measure of how blurred each atom is in the experiment; unit 6 explains it, and here we just borrow the column). Write each residue's relative accessibility there (times 100), then color by B-factor. The view after the solution loads the file the solution writes. To do it yourself, open the file in Mol* (molstar.org/viewer, then Open Files) and color by B-factor, or in ChimeraX run color bfactor.

Solution
from Bio.PDB import PDBIO

model = structure("1UBQ")[0]
rsa = {n: x for _, _, n, x in proteins["ubiquitin"]}
for res in model["A"]:
    for atom in res:
        atom.set_bfactor(100 * rsa.get(res.id[1], 0.0))    # 0 = buried, 100 = fully exposed
io = PDBIO()
io.set_structure(model)
io.save("ubq_rsa.pdb")
print("wrote ubq_rsa.pdb")
wrote ubq_rsa.pdb

Ubiquitin colored by the relative accessibility written in Task 5's solution: the lightest residues are buried and the darkest fully exposed. The strands alternate light and dark, and in the surface view only a few pale patches reach the outside.

Download ubq_rsa.pdb

Ubiquitin's 24 buried residues as sticks colored by class (amber hydrophobic, aqua polar, blue and red charged). They fill the space between the β-sheet and the helix. Look for Lys 27, the one buried charge, and for the threonines and serines along the strands.

Open 1UBQ in Mol*

Self-check

In ubiquitin's core, Ile 30 is mutated to aspartate. Predict the effect on stability and on the accessibility of the residues around it, and explain.

Reasoning

Strongly destabilizing. Ile 30 is fully buried (relative accessibility about 0.01), so the mutation puts a negative charge in the core with no partner to pair with and no water to solvate it, and it removes a large hydrophobic side chain that was packing against its neighbors, leaving a cavity. Expect the protein to unfold more easily, or to rearrange locally so the aspartate can reach water or a positive partner, which would expose some of the neighbors.

Now Ile 44 is mutated to alanine. It is barely buried (0.15) and sits in the hydrophobic patch. What would you predict for stability, and for ubiquitin's function?

Reasoning

Stability changes little: Ile 44 is mostly at the surface, so shortening it to alanine costs only a small amount of buried hydrophobic contact. Function suffers a lot, because the Leu 8, Ile 44, Val 70 patch is where partner proteins bind, and cutting the isoleucine down to a methyl strips most of one of its three side chains, so ubiquitin stays folded but its partners bind it poorly.

Your burial rule from Task 2 is 68–80% accurate on these proteins. A colleague proposes a better one: "buried if hydrophobic, or if it's a threonine, serine, or tyrosine." Would you expect it to help? What information does any rule that looks at one residue at a time lack?

Reasoning

It would help a little on proteins like these, where several threonines, serines, and tyrosines are buried, but it would also call many exposed ones buried, so the gain is small. A one-residue rule can't see context: whether the residue is in a helix or strand, which face it points to, what its neighbors in sequence are, and what related proteins have at that position. Window methods add neighbors, the periodicity of lesson 2.3 adds the face, and the evolutionary profiles of unit 5 add the rest. That combination is what pushed burial prediction from sequence well past simple hydrophobicity rules.

Task 4 found the α chain's interface by comparing a single chain with the tetramer. In a structure of an enzyme with a bound drug, how would you use the same idea to list the residues that contact the drug?

Reasoning

Compute each residue's accessible area twice, once with the drug's atoms removed and once with them present. Residues whose accessibility drops are the ones the drug covers. That is the binding site defined by burial. A distance cutoff (any residue with an atom within about 4 Å of the drug) gives a similar list, and comparing the two is a good way to catch residues that line the pocket without quite touching the drug.

A residue has relative accessibility 1.2. Is that a bug?

Reasoning

Not necessarily. The maxima are measured on the residue in a short extended Gly-X-Gly peptide. Residues at a chain end, next to a gap in the model, or in a stretched loop can expose more than that reference, and the end residues also carry an extra terminal oxygen or nitrogen. Values a little above 1 are normal there. A value far above 1 in the middle of a chain is worth checking for missing neighboring residues in the model.