Protein Domains
A protein along its length: a thin backbone, its domains as tall rounded blocks named inside where they fit, a ruler in residues, and variants as lollipops with pill labels. The same domains can sit under a Gene Model, mapped onto the exons that encode them.
Install
npx shadcn@latest add @nelumbo/protein-domainsDomains
p53, 393 residues, with its domains as UniProt annotates them (P04637).
- Transactivation1–44
- DNA-binding102–292
- NLS305–321
- Oligomerization325–356
- Basic368–387
Variants
variants stand on the protein as lollipops, stacked when their labels would collide. Most p53 hotspots sit in the DNA-binding domain.
- Transactivation1–44
- DNA-binding102–292
- NLS305–321
- Oligomerization325–356
- Basic368–387
Structure and confidence
Tracks under the domains, on the same scale: secondary structure (helices as coils, strands as arrows, turns as short bars, coil as the line) and a per-residue confidence such as AlphaFold's pLDDT, its bars colored by AlphaFold's four bands. Hover anywhere for the residue through every track. p53's structure is UniProt's; the confidence here is simulated to match its AlphaFold model's band shares.
- Transactivation1–44
- DNA-binding102–292
- NLS305–321
- Oligomerization325–356
- Basic368–387
- Helix
- Strand
- Very high> 90
- Confident70–90
- Low50–70
- Very low< 50
Reading a residue
selectable makes the tracks one keyboard stop: arrows move a residue, Shift moves ten, Home and End jump. Disorder shows at a glance: the transactivation region and the C-terminus fall to very low confidence, the DNA-binding domain stays very high.
With mutations
Pair the track with AminoAcidChange for a variant list that reads the same way.
Labels and sizes
labels chooses names inside the blocks, a legend, both or none. The small size suits lists and tables.
- Transactivation1–44
- DNA-binding102–292
- NLS305–321
- Oligomerization325–356
- Basic368–387
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
length | number | Residues in the protein. | |
domains | ProteinDomain[] | start, end, name, color, description. Overlapping domains take separate lanes. | |
variants | ProteinVariant[] | position, label, color, description: lollipops with pill labels. | |
labels | "inside" | "legend" | "both" | "none" | "both" | Names inside the blocks where they fit, and a legend underneath. |
ruler | boolean | true | Residue numbers along the bottom. |
size | "sm" | "default" | "default" | 14 or 22 px domains. |
structure | StructureElement[] | start, end, type (helix, strand, turn). structureFromDssp reads a DSSP string. | |
confidence | number[] | One score a residue, 0 to 100 (pLDDT): bars in AlphaFold's bands. | |
confidenceLabel | string | "AlphaFold confidence (pLDDT)" | The confidence track's name. |
sequence | string | The residues, named in the hover card and readout. | |
selectable / onActiveChange | boolean, (residue | null) => void | false | A keyboard stop over the residues; the residue in focus. |
Parts | DomainLegend, Lollipop, domainColors, domainLanes, stackLabels, PLDDT_BANDS, plddtBand | Shared with GeneModel; AlphaFold's bands. |