Skip to content

Commit 6ed117f

Browse files
lucapinelloclaude
andcommitted
IGV normalization explanation: causal report + LegNet stub parity
Final pre-ship verification: 17 shipped HTML reports audited for (a) IGV embedded, (b) signal tracks floor-rescaled to [0, 3.0], (c) user-facing "noise floor (p95) / peak threshold (p99)" explanation next to the IGV block, (d) track labels carry assay:cell_type provenance (oracle · assay:cell_type for multi-oracle). Two reports failed before this fix: 1. causal_prioritization/SORT1_locus causal report — 65/67 tracks were already floor-rescaled to ymax=3.0 (the 2 outliers are "Sentinel" + "Composite Score" summary tracks, correctly [0,1]), but the scale explanation block from variant_report.py wasn't replicated in causal.py. Added the same <p> note directly after the existing IGV intro paragraph (chorus/analysis/causal.py:1190). 2. validation/SORT1_rs12740374_multioracle/rs12740374_SORT1_legnet_report.html — stale from before the multi-oracle regen flow started persisting _normalizer through to_dict/from_dict. Re-ran scripts/regenerate_multioracle.py --oracle legnet (and --consolidate to keep the unified report in sync). LegNet stub now shows the floor/p99 block and uses the rescaled axis. Result: 17/17 HTMLs pass the 4-part audit. Track provenance verified: every single-oracle track label is {assay}:{cell_type}; every multi-oracle track label is {oracle} · {assay}:{cell_type}. Every IGV y-axis is either 3.0 (signal tracks, floor-rescaled) or 1.0 (summary/composite tracks, [0,1] by construction). No raw-autoscale leaks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5300daa commit 6ed117f

10 files changed

Lines changed: 339 additions & 329 deletions

File tree

chorus/analysis/causal.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,14 @@ def _build_causal_html(result: CausalResult) -> str:
11871187
'Signal tracks show ref (grey) vs alt (colored) for the top candidate. '
11881188
'Red stripe marks the sentinel. Zoom and pan to explore.</p>'
11891189
)
1190+
p.append(
1191+
'<p style="font-size:.85rem;color:#6b7280;margin-top:-.5rem">'
1192+
"Signal rescaled using each track's genome-wide noise "
1193+
"floor (p95) and peak threshold (p99): "
1194+
'<b>0</b> = noise floor, <b>1.0</b> = top 1% of bins '
1195+
'genome-wide. Peak shape preserved; tracks comparable '
1196+
'across cell types.</p>'
1197+
)
11901198
p.append(igv_html)
11911199
except Exception as exc:
11921200
logger.debug("Could not render IGV browser: %s", exc)

0 commit comments

Comments
 (0)