Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.

Commit 81535f3

Browse files
committed
v1.8.0: HTML report redesign, dark mode, PLINK sort fix
1 parent f1d7cce commit 81535f3

10 files changed

Lines changed: 1318 additions & 622 deletions

File tree

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22

33
All notable changes are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); the project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## [1.8.0]
6+
7+
### Changed
8+
- **HTML report redesign.** Replaced the 12-column scrollable table with
9+
a compact 5-column layout (Magnitude, Gene, Genotype, Repute, Summary).
10+
Annotations from multiple sources for the same variant are grouped into
11+
a single row. Clicking a row opens a sliding detail sidebar showing all
12+
source annotations vertically — genotype, zygosity, significance, review
13+
status, condition, description, frequency, AlphaMissense, CADD PHRED,
14+
and references.
15+
- **Dark / light mode.** Follows system preference (`prefers-color-scheme`)
16+
by default. A toggle button lets the user override. All component CSS
17+
uses custom properties — no hardcoded colors outside semantic badges and
18+
the accent color.
19+
- **CADD and AlphaMissense legend.** The "Understanding Magnitude Scores"
20+
section now includes CADD PHRED tier thresholds (≥30 top 0.1%, ≥20 top
21+
1%, ≥10 top 10%) and AlphaMissense classification bands (≥0.564
22+
likely pathogenic, 0.340–0.564 ambiguous, <0.340 likely benign).
23+
- **CADD tier context in sidebar.** CADD scores display the PHRED
24+
percentile tier inline (e.g. "38.0 (top 0.1% most deleterious)")
25+
instead of a bare number.
26+
- **Embedded variant JSON uses numeric types.** `allele_frequency`,
27+
`am_pathogenicity`, and `cadd` are now floats in the `<script
28+
id="variant-data">` blob, matching the v4 JSON schema. Field names
29+
aligned: `am_pathogenicity`, `am_class`, `allele_frequency` (was
30+
`amScore`, `amClass`, `frequency`).
31+
32+
### Fixed
33+
- **PLINK split-chromosome error.** MHG exports can have straggler
34+
autosomal variants appended after the Y chromosome section, producing
35+
non-contiguous chromosome blocks in the .bim. PLINK1.9 rejects these.
36+
`export plink` now sorts variants by chromosome then position before
37+
writing. The exporter itself remains a single-pass writer — the sort
38+
lives in the CLI layer.
39+
540
## [1.7.0]
641

742
### Added
@@ -1581,6 +1616,7 @@ All notable changes are documented here. Format follows [Keep a Changelog](https
15811616
- GitHub Actions CI matrix on Python 3.11 and 3.12.
15821617

15831618

1619+
[1.8.0]: https://github.com/dial481/allelix/compare/v1.7.0...v1.8.0
15841620
[1.7.0]: https://github.com/dial481/allelix/compare/v1.6.1...v1.7.0
15851621
[1.6.1]: https://github.com/dial481/allelix/compare/v1.6.0...v1.6.1
15861622
[1.6.0]: https://github.com/dial481/allelix/compare/v1.5.3...v1.6.0

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Only the latest minor release receives security fixes.
66

77
| Version | Supported |
88
|---------|-----------|
9+
| 1.8.x ||
910
| 1.7.x ||
10-
| 1.6.x ||
11-
| < 1.6 ||
11+
| < 1.7 ||
1212

1313
## Reporting a vulnerability
1414

allelix/annotators/clinvar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def annotate(self, variant: Variant) -> list[Annotation]:
382382
attribution=self.attribution,
383383
genotype_match=user_diploid,
384384
references=references,
385-
condition=condition or "",
385+
condition="" if not condition or condition == "." else condition,
386386
gene=gene or "",
387387
review_status=review_status or "",
388388
alt=alt,

allelix/cli.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,6 +1444,14 @@ def export_plink_cmd(
14441444

14451445
variants = list(parser.parse(file_path))
14461446

1447+
# Sort by chromosome then position so the .bim has contiguous
1448+
# chromosome blocks — PLINK1.9 rejects split chromosomes.
1449+
chrom_order = {str(i): i for i in range(1, 23)}
1450+
chrom_order.update({"X": 23, "Y": 24, "XY": 25, "MT": 26})
1451+
variants.sort(
1452+
key=lambda v: (chrom_order.get(v.chromosome, 99), v.chromosome, v.position),
1453+
)
1454+
14471455
variant_by_rsid: dict[str, Variant] = {}
14481456
for v in variants:
14491457
if not v.is_no_call:

0 commit comments

Comments
 (0)