Sanger Trace
A chromatogram: the four dye channels as curves, the base calls over their peaks, and each call's quality as a bar, with the ends a trim would cut shaded. It reads .ab1 files as they come off the sequencer.
Install
npx shadcn@latest add @nelumbo/sanger-traceA read
A read from the pCAG promoter into mCherry (Biopython's ABIF test file, parsed by parseAbif). The first bases are noisy, as every read's are: their quality bars fall under the Q20 line and the trim shades them. The trace scrolls sideways; hover a peak for the four channels.
Against a reference
reference lines the calls up against the bases you expected and marks every difference, with the expected base under the call. This read matches mCherry from its start codon (base 48) to the end of the window; the edited reference shows a one-base change.
Mixed bases
mixed flags a call when its second-highest channel reaches that share of the first, as at a heterozygous site. Here, in the read's noisy start, the base caller already wrote some as ambiguity codes (K, Y).
Open a file
Choose an .ab1 file to read it here; nothing leaves the page.
Reading a base
selectable makes the trace one keyboard stop: arrows move a base (Shift, ten), Page Up and Page Down a screen, Home and End to the ends.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
traces, bases, peaks | SangerRead | The four channels, the calls, and the scan of each call's peak: parseAbif gives all three. | |
quality | number[] | Phred quality a call: the bars, the Q20 and Q30 lines, and faded low calls. | |
start / range | number, { start, end } | 1, all | The first call's number; a window of the read. |
scheme | NucleotideScheme | "trace" | The channel and call colors. |
height / baseWidth | number | 120, 14 | Curve height; px a base. |
qualityBars / fill | boolean | true | The quality row; a faint fill under the curves. |
trim | boolean | number | false | Shade the ends a Mott trim cuts, at an error cutoff of 0.05 or the one given. |
reference | string | Expected bases aligned to the calls (- for none): differences are marked. | |
mixed | number | Flag calls whose second channel reaches this share of the first. | |
selectable / onActiveChange | boolean, (base | null) => void | false | A keyboard stop; the base in focus with its quality and peak heights. |
Helpers | parseAbif, qualityTrim | An .ab1 file as a read; the stretch a Mott trim keeps. |