Genetic basis of antibodies and T-cell receptors

Genetic basis of antibodies and T-cell receptors

No one inherits a whole antibody gene. Each young lymphocyte builds its receptor gene by cutting pieces of DNA out of its chromosome and joining the rest, a little differently every time, so a few hundred gene segments give every person a different receptor in almost every B and T cell.

How a B cell builds its heavy-chain gene

6 scenes, 0:55

A film in six scenes on a white page, drawn flat and soft like the heavy-chain gene and V(D)J recombination figures. First, a long blue line of DNA with rounded blue boxes along it: the camera travels along a row of evenly spaced V segments, past a cluster of small deeper D segments and a row of thin lighter J segments, to larger deeper boxes, the constant genes, with small grooved switch regions before them, then closes in on a D and a J. Then the same DNA close up, as a flat ladder of base pairs: plain blue on the left and the right, two short deeper stretches, the signals, with dark bands at their ends, and paler DNA between them. A green complex of four lobes, two deep green and two lime, settles on the left signal; the DNA between the signals rises into a tall loop and the right signal comes down beside the left one, into the complex. The ends of the plain blue ladder next to the signals close into rounded hairpins, and the loop lifts away with the complex. Green rings slide onto the two ends, large pale green lobes join them from below, and smaller deep green lobes come down and open each hairpin, leaving a short single strand. They leave, and a deep green lobe comes to each end and adds 4 lighter blue bases, one at a time. The two ends come together, the gaps fill in, and two green proteins, one above and one below, seal them into one ladder, while the loop above closes into a ring and floats away. Then the line of boxes again, with the D and J already joined: the DNA between a V box and the joined D and J rises into a loop carrying a V and a D box, closes into a ring and floats away, and the V moves along to sit against D and J. A green lobe travels along the gene from the V to the first constant gene with a red strip growing beneath it; the strip moves down, and its pale middle shrinks away, leaving a red piece for V, D and J joined to a deeper red piece for Cμ. Last, two small green lobes land on two switch regions; the DNA between them, carrying Cμ, Cδ and Cγ3, loops out and floats away as a ring, the joined V, D and J now sit before Cγ1, and a new red strip appears, the same first piece joined to a deeper red piece for Cγ1.

0:00 / 0:55

The heavy-chain genes as inherited

Scenes

About this film

RAG cuts beside a 12-spacer and a 23-spacer signal, end-joining enzymes join the ends with random changes, and the DNA between is lost as a circle: so each B cell builds its own heavy-chain gene, and after antigen may cut out more DNA to switch class.

Simplified: the locus scenes are maps, not to scale: the locus spans over two million base pairs, its segments drawn as boxes, each kind its own size, only some of each kind, and the two broken constant genes left out; the DNA at the cut drawn flat, as a ladder of base pairs, with far less DNA in the loop than lies between a D and a J; RAG drawn as two RAG1 and two RAG2 lobes; HMGB1 left out; the signal ends lifted away from the coding ends so the enzymes there can be seen; in the cell all four ends are held together; one of many outcomes: each hairpin opened 2 bases past its tip and 4 N nucleotides added to each end; the nucleases that trim the ends, the polymerases that fill the gaps, and XLF and PAXX not drawn; Ku and the ligase drawn only at the coding ends; they join the signal ends too; the cut-out circles drawn larger than the DNA they carry, its segments gathered onto them; one chromosome shown; D joins J on both; RNA polymerase and AID drawn on the map as small lobes, not at their size; the mRNA drawn as one piece for the VDJ exon and one for the constant gene, without the leader exon or the constant gene's own exons; AID shown landing on the switch regions; it works on DNA that transcription has opened, and repair enzymes turn its marks into breaks; the switch join drawn between the ends of Sμ and Sγ1; the breaks fall inside both switch regions, which are joined into one.

7 sources
  1. Janeway CA Jr, Travers P, Walport M, Shlomchik MJ. Immunobiology, 5th edition. Garland Science, 2001. Chapter 4, sections 4-2, 4-4, 4-5, 4-8 and 4-16, Fig. 4.4.
  2. Roth DB. V(D)J recombination, mechanism, errors, and fidelity. Microbiol Spectr. 2014;2(6):MDNA3-0041-2014.
  3. Schim van der Loeff I, Ahuja M, Chen R, et al. An update on inborn errors of V(D)J recombination. Physiology (Bethesda). 2026.
  4. Lu H, Shimazaki N, Raval P, et al. Extent to which hairpin opening by the Artemis:DNA-PKcs complex can contribute to junctional diversity in V(D)J recombination. Nucleic Acids Res. 2007;35(20):6917–6923.
  5. Yu K. AID function in somatic hypermutation and class switch recombination. Acta Biochim Biophys Sin. 2022;54(6):759–766.
  6. Liu JC, Zhang K, Zhang X, et al. Immunoglobulin class-switch recombination, mechanism, regulation, and related diseases. MedComm. 2024;5(8):e662.
  7. Stavnezer J, Guikema JEJ, Schrader CE. Mechanism and regulation of class switch recombination. Annu Rev Immunol. 2008;26:261–292.

At a glance

  1. Antibody and T-cell receptor genes are inherited in pieces: variable (V), diversity (D) and joining (J) gene segments, and constant (C) genes. Each young lymphocyte joins one V, (one D) and one J into a single exon, somatic recombination, which only lymphocytes do.
  2. The RAG1–RAG2 enzyme cuts beside short recombination signals, and joins only a signal with a 12-base spacer to one with a 23-base spacer, the 12/23 rule, so only the right kinds of segment are joined (at the heavy-chain locus, never V straight to J). The DNA in between is usually cut out as a circle.
  3. Ubiquitous repair enzymes join the cut ends. The joints are imprecise, with bases lost and N nucleotides added by TdT, so the joint, which encodes the third hypervariable loop at the centre of the binding site, differs in almost every cell.
  4. Diversity comes from choosing segments, from imprecise joints and from pairing two chains. Two in three joins are out of frame, so each cell tests its rearrangements: heavy chain first, then light chain, and one working receptor per cell (allelic exclusion).
  5. After antigen, B cells alone change their genes again: AID drives somatic hypermutation of V regions, which sharpens antibody fit, and class switching, which joins the same V region to a new constant gene. T-cell receptors do neither.
  6. When recombination fails there are no T or B cells (SCID); when switching fails, only IgM (hyper-IgM syndrome). Mistakes in these cuts move oncogenes beside antibody genes in lymphomas, and the cut-out circles are counted in newborn screening for SCID.

One gene from many pieces

The body can make antibodies against almost any molecular shape, far more kinds than it has genes. The answer came in 1976, when Susumu Tonegawa showed that the DNA coding an antibody is arranged differently in antibody-making tumour cells (a mouse myeloma) than in the cells of an embryo: in the B cell, pieces that lie far apart have been brought together. It earned him the Nobel Prize in 1987.

An antibody chain's variable region is not coded by one gene but assembled from gene segments, chosen from rows of them:

  • Light chains are built from a V segment, which codes most of the variable domain, and a J (joining) segment, which codes the rest of it, up to 13 amino acids.
  • Heavy chains need a third, a D (diversity) segment, between V and J. They are joined in two steps: D to J first, then V to DJ.

The joined VJ or VDJ is one exon. It lands an intron's length upstream of a constant (C) gene, and RNA splicing joins the two after transcription. Bringing V next to the C gene also brings its promoter close to the enhancers of the locus, so only a rearranged gene is transcribed strongly.

How a heavy-chain gene is built and switched
A map of the antibody heavy-chain locus on chromosome 14, drawn as a pale blue line with rounded boxes on it. From the left: blue V segments, more of them running off the page; five small deep blue D segments; six narrow pale J segments; then 9 constant genes, larger deep blue boxes, each but the second with a small grooved switch region before it. First, the locus as inherited. Next, one D segment has joined a J segment: the D and J segments between them are gone, and above, they float away on a small circle of DNA, while the upstream segments have slid along to close the gap. Then a V segment has joined the DJ in the same way, cutting out the segments between on a second circle; V, D and J now sit together as one exon. Then a red RNA below shows the exon spliced to the first constant gene, Cμ. Last, the switch region before Cμ has joined the one before Cγ1: Cμ, Cδ and Cγ3 have been cut out on a circle, and the same VDJ exon now lies upstream of Cγ1. Step 1 of 5: Inherited in pieces. In every cell but a B cell the segments lie apart: about 45 working V, 25 D and 6 J segments, then the constant genes.

Step 1 of 5Inherited in pieces. In every cell but a B cell the segments lie apart: about 45 working V, 25 D and 6 J segments, then the constant genes.

Point at a name or a part to light it.

The variable region is built once, in the bone marrow; after antigen, hypermutation can fine-tune it, and the constant region can be exchanged, but only for one further downstream.

Simplified: not to scale: the locus spans over two million base pairs, and the D segments are only 11 to 37 base pairs long; only a few of the V and D segments drawn; the recombination signals, promoters and enhancers left out; each constant gene drawn as one box, though it has an exon for each domain; two broken constant genes left out: a copy of the ε gene between Cγ1 and Cα1, and of a γ gene between Cα1 and Cγ2; the circles drawn whole, carrying the segments between the joins; in the cell they hold the joined signals too; the RNA drawn already spliced, without its cap and tail; the joins drawn on one chromosome; D to J happens on both.

5 sources
  1. Janeway CA Jr, Travers P, Walport M, Shlomchik MJ. Immunobiology, 5th edition. Garland Science, 2001. Chapter 4, sections 4-2, 4-4, 4-5 and 4-16, Figs. 4.4 and 4.18.
  2. Rodriguez OL, Gibson WS, Parks T, et al. A novel framework for characterizing genomic haplotype diversity in the human immunoglobulin heavy chain locus. Front Immunol. 2020;11:2136.
  3. IMGT, the international ImMunoGeneTics information system: human IGH locus gene table and IMGT/GENE-DB IGHD reference sequences. Accessed 1 November 2026.
  4. Stavnezer J, Guikema JEJ, Schrader CE. Mechanism and regulation of class switch recombination. Annu Rev Immunol. 2008;26:261–292.
  5. Liu JC, Zhang K, Zhang X, et al. Immunoglobulin class-switch recombination, mechanism, regulation, and related diseases. MedComm. 2024;5(8):e662.

The three antibody loci lie on different chromosomes. The numbers of segments differ between people, because whole stretches of these loci are duplicated or missing in some, and some segments are broken pseudogenes that never make protein.

LocusChromosomeWorking V segmentsDJC genes
Heavy chain (IGH)14about 40–50about 256μ, δ, γ3, γ1, α1, γ2, γ4, ε, α2
κ light chain (IGK)2about 40none5one, Cκ
λ light chain (IGL)22about 30–38none4–5each J with its own Cλ

The signals that guide the cut

Every V, D and J segment is flanked by a recombination signal sequence (RSS): a conserved heptamer (CACAGTG) next to the coding sequence, a spacer of 12 or 23 bases whose length, not its sequence, is kept, and a conserved nonamer (ACAAAAACC). A 12-base spacer is about one turn of the double helix and a 23-base spacer about two, so in both the heptamer and nonamer face the same way, where the recombinase can bind them.

The recombinase joins only a segment with a 12-spacer signal to one with a 23-spacer signal. This 12/23 rule decides which segments can be joined. At the heavy-chain locus, V and J segments carry 23-spacer signals and each D carries 12-spacer signals on both sides, so V cannot join J directly and every heavy chain has a D between them. The order, D to J first and then V to DJ, is set by which part of the locus is opened to the recombinase first. At the light-chain loci a V and a J carry opposite kinds.

Most joins happen between segments that point the same way along the chromosome: the DNA between them loops out and is cut out as a closed circle, which is lost as the cell divides. About half of the κ V segments point the other way, and joining one of them inverts the DNA in between and keeps it instead.

How the cut is made and mended

The lymphocyte-specific part of the V(D)J recombinase is the pair RAG1 and RAG2, made only in developing lymphocytes while they build their receptors. Everything else is the cell's ordinary machinery for mending broken DNA, non-homologous end joining.

How V(D)J recombination cuts and joins
A stretch of a developing B cell's chromosome, drawn flat as a blue ladder of base pairs, with a D gene segment coming in from the left and a J segment from the right. Between them the DNA rises into a loop whose two legs stand side by side: on the left the signal beside the D segment, a dark block of 7 base pairs, a pale spacer of 12 and a dark block of 9; on the right the signal beside the J segment, with a spacer of 23. First, two green RAG1 and two light RAG2 proteins hold the two signals together at the foot of the loop. Next, each segment has been cut from its signal; the segment's end is sealed into a hairpin, the signal's end left blunt. Then the loop, the signals and RAG have been drawn up out of the way; a ring of Ku is threaded on each coding end, a large DNA-PKcs lies under each end and Artemis sits at each hairpin, now opened, leaving one strand a few bases longer than the other. Then TdT has taken Artemis's place and added random bases to each single strand. Last, the two coding ends have come together and are joined into one continuous ladder by DNA ligase IV, with XRCC4 below; above, the loop has closed into a circle with its two signals joined at its foot. Step 1 of 5: Pair. RAG1 and RAG2 bind a signal with a 12-base spacer and one with a 23-base spacer and hold them side by side. Only such a pair lets RAG finish its cut.

Step 1 of 5Pair. RAG1 and RAG2 bind a signal with a 12-base spacer and one with a 23-base spacer and hold them side by side. Only such a pair lets RAG finish its cut.

Point at a name or a part to light it.

Only lymphocytes make this cut, with RAG, but enzymes every cell uses to mend broken DNA join the ends, deliberately carelessly at the coding joint. That carelessness is where much of the receptors' diversity comes from.

Simplified: DNA and proteins at one scale, but the loop drawn far shorter than the thousands of base pairs between the segments; the double helix drawn flat, as a ladder, without its twist; the DNA's path through RAG simplified; HMGB1, which helps RAG bend it, left out; the signals drawn apart from the coding ends once cut; in the cell all four ends are held close until they are joined; only the ends of the two gene segments drawn; Ku and the ligase drawn only at the coding ends, though they join the signal ends too; the polymerases that fill the gaps, the nucleases that trim the ends, and XLF and PAXX left out; one joint of many: how far each hairpin opens, and how many bases are added or trimmed, differ every time.

8 sources
  1. Janeway CA Jr, Travers P, Walport M, Shlomchik MJ. Immunobiology, 5th edition. Garland Science, 2001. Chapter 4, sections 4-4, 4-5 and 4-8.
  2. Roth DB. V(D)J recombination, mechanism, errors, and fidelity. Microbiol Spectr. 2014;2(6):MDNA3-0041-2014.
  3. Schim van der Loeff I, Ahuja M, Chen R, et al. An update on inborn errors of V(D)J recombination. Physiology (Bethesda). 2026.
  4. Lu H, Shimazaki N, Raval P, et al. Extent to which hairpin opening by the Artemis:DNA-PKcs complex can contribute to junctional diversity in V(D)J recombination. Nucleic Acids Res. 2007;35(20):6917–6923.
  5. Walker JR, Corpina RA, Goldberg J. Structure of the Ku heterodimer bound to DNA and its implications for double-strand break repair. Nature. 2001;412(6847):607–614.
  6. UniProt: RAG1 (P15918), RAG2 (P55895), Ku70 (P12956), Ku80 (P13010), DNA-PKcs (P78527), Artemis (Q96SD1), TdT (P04053), DNA ligase IV (P49917), XRCC4 (Q13426). Masses.
  7. Erickson HP. Size and shape of protein molecules at the nanometer level determined by sedimentation, gel filtration, and electron microscopy. Biol Proced Online. 2009;11:32–51. Minimal radius of a protein of given mass.
  8. Arnott S, Hukins DWL. Biochem Biophys Res Commun. 1972;47:1504–9. B-DNA about 2 nm across, 0.34 nm rise per base pair.
  1. 1

    Pair

    RAG1 and RAG2 bind a 12-spacer and a 23-spacer signal and hold the two together in a synaptic complex. Only a matched pair lets RAG finish its cut, which is how the 12/23 rule is enforced.

  2. 2

    Cut

    RAG nicks one strand exactly where each heptamer meets its coding segment. The freed 3′ end then attacks the other strand, sealing each coding end into a hairpin and leaving the signal ends blunt. All four ends stay held in the complex.

  3. 3

    Open

    The ring-shaped Ku70–Ku80 binds the ends and recruits the kinase DNA-PKcs, which switches on Artemis. Artemis nicks each hairpin open, often off its tip, leaving a short single strand whose extra bases mirror the other strand: the P nucleotides.

  4. 4

    Edit

    Terminal deoxynucleotidyl transferase (TdT) adds up to about 20 nucleotides at random to the open ends, copied from no template: the N nucleotides. Nucleases trim away others.

  5. 5

    Join

    The ends pair where they can, gaps are filled, and DNA ligase IV with XRCC4 seals the coding joint, part of the new V-region exon. The two signal ends are joined head to head, without change, into the signal joint on the cut-out circle.

The coding joint is deliberately sloppy and the signal joint exact. Because bases are added and lost at random, roughly two in three joins put the following sequence out of frame and make no protein, which is the price of junctional diversity.

Heavy chain first, then light

A developing B cell builds its receptor in a fixed order and checks each step before the next.

  1. D to J on both copies of chromosome 14, in the pro-B cell. A D–J join makes no protein on its own, so nothing is tested yet: the cell goes straight on to join a V.
  2. V to DJ on one chromosome. If the join is in frame, a μ chain is made and pairs with a stand-in light chain (λ5 and VpreB) as the pre-B-cell receptor. Its signal stops V to DJ joining, degrades RAG2 and sets the cell dividing. If the join fails, the cell tries the second chromosome; if both fail, it dies.
  3. Light chain, in the small pre-B cell once RAG is made again: κ first, then λ if κ fails. A light-chain locus can try again and again, joining a further-upstream V to a further-downstream J, so most cells succeed.

A finished heavy and light chain make IgM, the B-cell receptor. Because a working chain shuts down rearrangement of the other copy, each B cell makes one heavy chain and one light chain, allelic exclusion, and uses κ or λ, almost never both, isotypic exclusion. One cell, one specificity. About two thirds of human B cells carry κ and one third λ.

A T cell does the same in the thymus with its own loci: the β chain first, tested as a pre-T-cell receptor with a stand-in α chain (pTα), then the α chain. How developing lymphocytes are then selected is the next topic.

Where the diversity comes from

Antibody diversity comes from four sources, three of them made as the B cell develops, before it meets antigen.

  • Choice of segments. About 45 V, 25 D and 6 J segments give several thousand heavy chains, and the two light-chain loci a few hundred light chains.
  • Imprecise joints. P and N nucleotides and trimming make each joint new. The joints code the third hypervariable loop (CDR3), the centre of the antigen-binding site. The first two loops are coded within the V segment itself.
  • Pairing. Any heavy chain can pair with almost any light chain: from the segments alone, a few million combinations.
  • Somatic hypermutation, later, in B cells that have met antigen.

Together these allow far more receptors than a person has lymphocytes; the number of cells, not the genes, is the limit. The diversity is made before any antigen is met, at random, which is why every repertoire contains receptors that bind self and has to be weeded.

out of frame, so they make no protein
2 in 3joins
human B cells using each light chain
65 : 35κ to λ
at the T-cell receptor α locus, about 50 of them working, for try after try
61J segments

T-cell receptor genes

T-cell receptors are built by the same enzymes from the same kinds of signals, which is why inherited defects of V(D)J recombination affect T and B cells together.

  • The α chain is built like a light chain, V and J only, with about 45 working V and about 50 working J segments (61 J in all) on chromosome 14. So many J segments let a thymocyte try one α join after another, and many T cells end up with in-frame α genes on both chromosomes, though as a rule only one α:β pair is selected to work.
  • The β chain is built like a heavy chain, V, D and J, on chromosome 7, with two clusters of one D, several J and a C gene, so a failed join can be rescued with the second cluster.
  • The δ locus lies inside the α locus, between the Vα and Jα segments. Any α rearrangement cuts out the δ chain's D and J segments and its C gene, as a circle. The γ and δ chains, of the minority γ:δ T cells, have few V segments but highly varied joints.
Antibody genesT-cell receptor genes
Lociheavy chain; κ and λ light chainsβ and α (γ and δ in γ:δ T cells)
Chains with D segmentsheavyβ and δ
N nucleotidesin most heavy-chain joints; in a quarter to a half of light-chain joints, and few therein most α and β joints (fewer in T cells made before birth)
Most varied partall three loops, once hypermutatedthe third loop, where the receptor touches the peptide
Somatic hypermutationyes, after antigenno
Class switchingyes, after antigenno; its C genes code only membrane chains
Secretedyes, as antibodynever

A T-cell receptor is fixed once its cell leaves the thymus. Its first two loops, coded in the germline V segment, mostly touch the MHC molecule, and its varied third loops sit over the peptide.

After antigen: hypermutation and switching

Once a B cell has met its antigen and has help from a T cell, two more processes rework its antibody genes: hypermutation of the V regions of both its chains, mostly in the germinal centres of lymph nodes, spleen and mucosal lymphoid tissue, and class switching of its heavy chain, mostly earlier, soon after the B cell first meets its helper T cell. Both are started by one enzyme, activation-induced cytidine deaminase (AID), which B cells make once they are activated.

AID turns cytosine into uracil in DNA. It works on single-stranded DNA, which transcription opens up as it pulls the strands apart, and mostly on the V regions and the switch regions. The enzymes that repair the uracils are normally accurate; here their repair is error-prone.

  • Somatic hypermutation. Point mutations build up across the rearranged V regions at a very high rate, while the C regions are spared. B cells whose new receptors bind antigen better are selected to survive, and those that can no longer bind die: affinity maturation, which is why antibodies made late in a response bind more tightly. Mutations that change amino acids end up concentrated in the hypervariable loops.
  • Class switching. Before each C gene except δ lies a repetitive switch region. AID-made breaks in the μ switch region and in a downstream one are joined by end joining, and the C genes between them are cut out as a circle. The same VDJ exon now sits before Cγ, Cα or Cε: the same antigen-binding site with new effector functions. Cytokines from helper T cells choose the class, and CD40 ligand on the T cell normally starts it. The deleted DNA cannot return, so a cell that has switched to IgG can switch on to IgA or IgE downstream, but never back to IgM.

Two other changes need no change in the DNA, only different processing of the RNA:

  • A mature naive B cell carries IgM and IgD together. A long transcript running through Cμ and Cδ is cut and spliced either way.
  • Each heavy chain can be made membrane-bound or secreted. Which end of the transcript is used decides whether the chain ends in a membrane anchor, as on the B cell, or a hydrophilic tail, as in the antibodies of a plasma cell.

When the gene-cutting goes wrong

Check yourselfAnswer, then say how sure you were: a lucky guess still counts as a weak point.

1Why can a heavy-chain V segment not be joined straight to a J segment?

2A heavy-chain V–D joint contains several nucleotides found in neither segment and copied from no template. Which enzyme added them?

3A pro-B cell has just made a productive V to DJ join on one of its two chromosomes 14. What happens to the heavy-chain locus on the other chromosome?

4A B cell that made IgM switches to making IgG1. What stays the same?

5A four-month-old has had Pneumocystis pneumonia and diarrhoea that will not settle. There are almost no T or B cells, NK cells are normal, and the baby's cells are unusually sensitive to radiation. Which protein is most likely missing?

6A child has recurrent bacterial infections, enlarged lymph nodes and tonsils, normal numbers of T and B cells, normal or high IgM and almost no IgG, IgA or IgE. Their T cells carry normal CD40 ligand, yet their B cells cannot switch class even when stimulated in the laboratory. Which enzyme is most likely missing?