Chromosome Ideogram
A chromosome as its Giemsa bands: dark and light stripes along two arms, pinched at the centromere and rounded at the ends. Grayscale like the stain, so color stays free for what you mark on it.
Install
npx shadcn@latest add @nelumbo/chromosome-ideogramA chromosome
Chromosome 17 from UCSC's hg38 band table, read with parseCytobands, and three genes from NCBI Gene: TP53 on the short arm, ERBB2 and BRCA1 on the long one. Hover a band for its name and extent.
Over a gene model
region frames a stretch and draws zoom lines to the corners, so whatever sits underneath reads as the close-up: here TP53, in 17p13.1, and its exons.
Karyotype
The whole genome at one scale, each chromosome upright with its genes marked (named where the columns have room, and on hover). Pick one, with the pointer or the arrow keys, to see it close.
Reading the bands
selectable makes the bands one keyboard stop: arrows move a band, Home and End go to the ends.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
bands | Cytoband[] | chrom, start, end, name, stain: UCSC's cytoBand.txt through parseCytobands. | |
chromosome | string | Which one: "chr17". | |
markers | IdeogramMarker[] | start, end, label, color, description; chrom in a Karyotype. Pills on stems, stacked. | |
region / connector | { start, end }, boolean | true | A framed stretch, with zoom lines to the corners below. |
labels / ruler | boolean | true | Band names where they fit; megabase ticks. |
size | "sm" | "default" | "default" | 14 or 22 px thick. |
selectable / onActiveChange | boolean, ({ band } | null) => void | false | A keyboard stop over the bands; the band in focus. |
Karyotype | bands, chromosomes, markers, height, chromosome, onChromosomeChange | The genome side by side at one scale; a radio group when you can pick. | |
Helpers | parseCytobands, bandAt | A band table from text; the band a position falls in ("17p13.1"). |