Ladder Handling¶
The dnanet.data.ladders package handles base-pair calibration via ladder
profiles. It uses detected peaks in a ladder HID file to create an adjusted
panel where allele base-pair positions reflect the actual electrophoresis
conditions of the run.
Ladder¶
A Ladder wraps a ladder HID file and uses it to create an adjusted panel.
The calibration process:
- Detects peaks in each dye channel of the ladder profile
- Matches detected peaks to known alleles (by count per dye)
- Maps peak pixel positions to base-pair positions via the size-standard scaler
- Inter/extrapolates missing alleles from neighboring alleles
- Returns a
Panelwith adjusted base-pair values
Factory: Ladder.create_adjusted_panel() — reads a ladder HID file and
returns an adjusted Panel, or None if peak detection fails.
Ladder Allele Catalog¶
A frozen data catalog of alleles expected in a ladder, organized by dye row.
Loaded from a CSV file with columns: Marker, Allele, Dye.
Factory: LadderAlleleCatalog.from_panel(panel) — creates a catalog from
a reference Panel.