Biotechnology · Introductory

Restriction digest map

Written by SignalsLab

Early edition: these lessons are being reviewed.

Content

Summary

A restriction digest map shows where restriction enzymes cut a piece of DNA, such as a plasmid. By cutting the DNA and running the fragments on a gel, we can work out the distances between cut sites and build a map of the DNA. The animation traces the DNA, the cuts, and the resulting fragments step by step.

Intuition

Think of DNA as a string with hidden scissors-recognition spots. Each restriction enzyme cuts only at its own short sequence, for example EcoRI at GAATTC. If you cut a string at known spots, the lengths of the pieces tell you where the spots were. On a gel, small fragments run farther and large fragments run shorter distances, so the band pattern reveals fragment sizes. For a circular plasmid, n cut sites give n fragments. For linear DNA, n cut sites give n+1 fragments. Adding up all fragment sizes must equal the total length. Using several enzymes alone and together lets you place the sites in order, like solving a puzzle.

Key equations

Nlinear=n+1
(1)

Number of fragments from a linear DNA with n cut sites.

Ncircular=n
(2)

Number of fragments from a circular plasmid with n cut sites (n ≥ 1).

∑iLi=Ltotal
(3)

Fragment lengths must add up to the total DNA length.

Derivation

  1. Start with a circular plasmid of known length, for example 5000 base pairs (bp).
  2. A single cut opens the circle into one linear piece of the full 5000 bp, so 1 site gives 1 fragment.
  3. Each extra cut divides one existing piece into two, so every extra site adds one fragment: circular gives n fragments.
  4. For linear DNA the first cut already makes 2 pieces, so n sites give n+1 fragments.
  5. Measure fragment sizes by comparing gel bands to a size ladder; smaller fragments migrate farther.
  6. Check that the sizes sum to the total length, then place the sites around the map using the distances between them.

Worked example

Problem

A 5000 bp circular plasmid is cut with EcoRI, giving fragments of 3000 bp and 2000 bp. Cut with BamHI alone it gives one band of 5000 bp. Cut with both enzymes, fragments are 3000, 1500 and 500 bp. Map the sites.

  1. EcoRI gives 2 fragments, so for a circle there are 2 EcoRI sites, 3000 bp and 2000 bp apart around the circle.
  2. BamHI gives one fragment of 5000 bp, so there is 1 BamHI site.
  3. The double digest has 3 fragments, which matches 2 + 1 = 3 sites total.
  4. The 3000 bp fragment remained intact, so BamHI does not cut within it; BamHI must lie in the 2000 bp arc.
  5. The 2000 bp arc splits into 1500 and 500 bp, so BamHI sits 500 bp from one EcoRI site and 1500 bp from the other.
  6. Check: 3000 + 1500 + 500 = 5000 bp.

Answer Two EcoRI sites divide the circle into 3000 bp and 2000 bp arcs; the single BamHI site lies within the 2000 bp arc, 500 bp from one EcoRI site and 1500 bp from the other.

Common mistakes

  • Using the linear rule (n+1) for a circular plasmid; circles give n fragments.
  • Forgetting that fragment sizes must add up to the total length.
  • Reading the gel backwards: large fragments stay near the wells, small ones travel farthest.
  • Assuming a single band means no cut; an uncut supercoiled plasmid also shows a band, and a single cut gives one full-length linear band.
  • Ignoring that two fragments of similar size can appear as one band.

Animation

Animation coming soon

The animated version of this lesson is being prepared for the web. In the Signals AI app, lessons are drawn step by step.

Code

scene.py(97 lines)
import sys
from manim import *
from blocks import *

# Plasmid length (linear map) and enzyme cut sites in bp
LENGTH = 5000
SITES = {"EcoRI": [800, 3200], "BamHI": [2000]}


def all_cuts():
    """Combined sorted cut positions of all enzymes."""
    return sorted(sum(SITES.values(), []))


def digest(length, cuts):
    """Cut a linear sequence at sorted sites; record fragment list after each cut."""
    pos = [0, length]
    snaps = [[length]]
    for c in sorted(cuts):
        pos = sorted(pos + [c])
        snaps.append([b - a for a, b in zip(pos[:-1], pos[1:])])
    return snaps


TRACE = digest(LENGTH, all_cuts())


class Main(Scene):
    def construct(self):
        self.camera.background_color = "#14161c"
        TitleCard(self, "Restriction digest map", "Cutting DNA at enzyme sites")

        W = 11.0
        x0 = -W / 2
        cuts = all_cuts()
        names = {p: n for n, ps in SITES.items() for p in ps}
        bar_y = 1.2

        # Full DNA bar with scale labels
        bar = Rectangle(width=W, height=0.4, fill_color=C_MAIN, fill_opacity=0.85,
                        stroke_color=WHITE, stroke_width=2).move_to([0, bar_y, 0])
        info = Text(f"DNA: {LENGTH} bp", font_size=28, color=WHITE).next_to(bar, UP, buff=0.4)
        l0 = Text("0", font_size=24, color=C_DIM).next_to(bar, LEFT, buff=0.15)
        l1 = Text("5000", font_size=24, color=C_DIM).next_to(bar, RIGHT, buff=0.15)
        l0.set_x(x0 - 0.0).shift(LEFT * 0.0)
        self.play(Create(bar), FadeIn(info))
        self.play(FadeIn(l1))

        # Legend for enzymes
        leg = VGroup(
            Text("EcoRI", font_size=24, color=C_BAD),
            Text("BamHI", font_size=24, color=C_ACCENT),
        ).arrange(RIGHT, buff=0.8).move_to([0, -0.6, 0])
        self.play(FadeIn(leg))

        # Cut one site at a time, following the recorded trace
        marks = VGroup()
        counter = None
        for k, c in enumerate(cuts):
            x = x0 + W * c / LENGTH
            col = C_BAD if names[c] == "EcoRI" else C_ACCENT
            ln = Line([x, bar_y + 0.4, 0], [x, bar_y - 0.4, 0], color=col, stroke_width=5)
            lb = Text(str(c), font_size=24, color=col).next_to(ln, UP, buff=0.1)
            lb.shift(UP * 0.55)
            new = Text(f"{len(TRACE[k + 1])} fragments", font_size=28, color=C_GOOD)
            new.move_to([0, -1.5, 0])
            anims = [Create(ln), FadeIn(lb), FadeIn(new)]
            if counter is not None:
                anims.append(FadeOut(counter))
            self.play(*anims, run_time=0.7)
            counter = new
            marks.add(ln, lb)

        # Fragment size list, drawn as bars to scale
        final = TRACE[-1]
        pos = [0] + cuts + [LENGTH]
        pieces = VGroup()
        for a, b in zip(pos[:-1], pos[1:]):
            r = Rectangle(width=W * (b - a) / LENGTH - 0.1, height=0.4,
                          fill_color=C_GOOD, fill_opacity=0.85,
                          stroke_color=WHITE, stroke_width=2)
            r.move_to([x0 + W * (a + b) / 2 / LENGTH, -2.4, 0])
            pieces.add(r)
        labels = VGroup(*[Text(str(f), font_size=24, color=WHITE).next_to(p, DOWN, buff=0.1)
                          for f, p in zip(final, pieces)])
        self.play(FadeOut(counter), FadeIn(pieces), FadeIn(labels))
        StepCaption(self, "3 cuts give 4 fragments; sizes add up to 5000 bp.")
        self.wait(1.5)


if __name__ == "__main__" and "--selftest" in sys.argv:
    assert TRACE[0] == [5000]
    assert TRACE[-1] == [800, 1200, 1200, 1800]
    for s in TRACE:
        assert sum(s) == LENGTH
    assert len(TRACE[-1]) == len(all_cuts()) + 1
    print("ok")

The Manim scene code that draws this lesson's animation in the Signals AI app (Python, Manim Community).

ccBYNC© 2026 SignalsLab. Lesson text shared as is under CC BY-NC 4.0.