Gel
An agarose gel, simulated. Each band sits where a model of how DNA runs puts it for the gel's agarose, buffer, voltage and time, spreads as it would, and glows as bright as the DNA in it, drawn as a stain shows it. Lanes can come straight from a restriction digest of a sequence.
Install
npx shadcn@latest add @nelumbo/gelA digest
pGL3-Basic (4,818 bp) cut with single and double digests, the fragments computed from its sequence by digest. One cut linearizes it; two give two bands that add up to the whole; DraI's 19 bp piece runs off the end. Uncut, it runs as plasmid does: a supercoiled band ahead of its size and a fainter nicked one behind. Each lane holds 250 ng, shared by length, so shorter fragments are fainter. bothSides repeats the ladder in a last lane, so sizes read from either side. Hover a band for where it came from.
Run it
Agarose, buffer, voltage and time move every band as they would on the bench: more agarose pulls small fragments apart and crowds large ones near the wells; a higher field squeezes long fragments together. The loading dyes' fronts sit along the right. Fit picks the agarose, voltage, time and ladder that best separate the fragments.
This gel separates about 740 bp to 10.8 kb well. Positions are modeled: expect them within 5–10% of a real gel.
Stains and ideal bands
Ethidium bromide under UV (the default) and SYBR Safe under blue light in the colors a camera sees them, or printed dark on light as a gel doc prints it. mode="overlay" draws the ideal bands, each a line where its size runs, over the stained gel; mode="ideal" draws them alone, on a plain slab that follows the theme.
Ladders
NEB's and GeneRuler's, each band at the mass its maker lists, so the landmark bands stand out as on a real gel. Each suits a gel: the 1 kb ladders spread out on a loose one, the 50 and 100 bp ones on a tight one, where the long ladders crowd at the wells.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
lanes | GelLane[] | label, and bands (size, mass, apparent, smear, description), or a ladder; ng loaded, shared by mass. | |
bothSides | boolean | false | The first ladder again in a last lane, so sizes read from either side. |
agarose / buffer | number, "tae" | "tbe" | 1, "tae" | Agarose % w/v, 0.5 to 4; the running buffer. |
volts / electrodes | number, number | 100, 12 | Volts across electrodes this many cm apart: the field. |
minutes / length | number, number | 40, 8 | How long it runs; the gel's length from the wells, cm. |
height | number | 440 | The slab's height in px. |
stain | "ethidium" | "sybr" | "print" | "ethidium" | How it's imaged: under UV, under blue light, or printed dark on light. |
mode | "real" | "overlay" | "ideal" | "real" | As the stain shows it; the ideal bands drawn over it; or the ideal bands alone. |
sizes / dyes | boolean, boolean | true, true | The ladder's sizes on the left; the loading dyes' fronts on the right. |
run / onRunProgress | number, (minutes) => void | Change run to play the gel from the wells; each frame's minutes. | |
selectable / onActiveChange | boolean, (focus | null) => void | false | A keyboard stop: up and down a lane, left and right across lanes. |
Model | mobility, gelDistance, migration, spread, dyeFronts, resolves, autoGel | Where a size runs and how wide; the dyes; the range a gel separates; the best gel and ladder for some sizes. | |
Helpers | digest, ENZYMES, LADDERS, DEFAULT_GEL | Fragments of a digest, linear or circular; common enzymes; NEB and GeneRuler ladders. |