Skip to content

regen(multioracle): tile LegNet across the locus for the IGV browser; dedup CAGE - #99

Merged
lucapinello merged 2 commits into
mainfrom
fix/2026-06-18-legnet-sliding-track
Jun 18, 2026
Merged

regen(multioracle): tile LegNet across the locus for the IGV browser; dedup CAGE#99
lucapinello merged 2 commits into
mainfrom
fix/2026-06-18-legnet-sliding-track

Conversation

@lucapinello

Copy link
Copy Markdown
Contributor

Makes the LegNet track in the multi-oracle genome browser span the locus (tiled 200 bp windows -> predicted-MPRA profile, 1 bp-resolution OraclePrediction like ChromBPNet's predict_sliding) instead of a 200 bp blip; the variant-effect table value is unchanged. Also removes a duplicate AlphaGenome CAGE display track at the source. Addresses Lorenzo's review of the chorus-article SORT1 example.

lp698 and others added 2 commits June 18, 2026 04:52
…sis_figures

render_finemap_table + the `finemap` subcommand produce Fig 5
(fig_rs9504151_finemap.png) for the chorus-article post: a clean Top-N
causal-variant table from a prioritize_causal_variants run, highlighting the
lead (rs9504151, #1) and the high-LD neighbour rs62384944.

The article's figures/README.md and reproduce/ steps already reference
`regenerate_analysis_figures.py finemap`; this commits the code behind it so
Fig 5 is reproducible from the repo (ism/tf_scan were already committed in #96).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… dedup CAGE

The multi-oracle genome-browser figure showed LegNet only as a 200 bp blip at
the variant while every other oracle spanned the locus (ChromBPNet swaps in a
predict_sliding track; LegNet had no equivalent). Add `_legnet_sliding_prediction`
— tiles LegNet's 200 bp window non-overlapping across ±512 kb via predict_bigseq
and expands each window's MPRA-activity scalar to a 1 bp-resolution OraclePrediction
matching ChromBPNet's contract — and swap it into the legnet report's IGV-display
predictions in `run_legnet`. The variant-effect TABLE value is unchanged (still the
native 200 bp window). Also drop the redundant CAGE `/-` strand from
ALPHAGENOME_TRACKS and add a consolidator-side `_dedup_duplicate_display_tracks`
guard, so the AlphaGenome CAGE band is not duplicated in the unified browser.

Addresses co-author (Lorenzo) review of the chorus-article SORT1 worked example.
Note: the regenerated multioracle HTML is large (LegNet 1 bp track over 1 Mb);
the committed article figure is a PNG, and example HTML is regenerable, so it is
not committed here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lucapinello
lucapinello merged commit e27ba64 into main Jun 18, 2026
@lucapinello
lucapinello deleted the fix/2026-06-18-legnet-sliding-track branch June 18, 2026 14:00
lucapinello added a commit that referenced this pull request Jun 22, 2026
…101)

#99 deduped the duplicated AlphaGenome CAGE track by keeping the + strand, but
that strand scores +1.22 while the article (Fig 3) cites +1.52 — which is the
MINUS strand (same 501 bp / sum / log2FC scorer; pure strand difference). Keep
the - strand so a fresh `regenerate_multioracle` reproduces the published +1.52,
and because the SORT1/CELSR2/PSRC1 locus is transcribed on the minus strand.
Still a single CAGE display track (the dedup from #99 is preserved).

Co-authored-by: lp698 <lp698@dimm2fv07n65x.partners.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lucapinello added a commit that referenced this pull request Jul 31, 2026
…#117)

The ChromBPNet per-track CDFs changed (#113 + the HF background rebuild),
so every committed ChromBPNet artefact drifted. Regenerating them also
surfaced three artefacts stale against EARLIER merged changes that were
never re-executed. All four effects are separated so nothing is
misattributed to expm1.

1. expm1 (the intended change). ChromBPNet raw counts come down by exactly
   the window softmax mass w; percentile RANKINGS unchanged:
     SORT1 DNASE:HepG2  ref 287.857 -> 287.237 (-0.620)
                        alt 747.653 -> 747.014 (-0.639)
                        log2FC +1.37394 -> +1.37581
                        effect %ile 0.9995, activity %ile 0.9059 (unchanged)
     klf1 locus profile max 127.333 -> 127.307, mean 0.462 -> 0.461

2. SORT1_chrombpnet was stale since 2026-05-09, predating the 2026-06-17
   windowing fix (#94). That is the large jump (ref 48.53 -> 287.24, log2FC
   +0.318 -> +1.376), NOT expm1 — the post-#94 multioracle artefact already
   carried +1.37394, which the regenerated value matches to within the
   expm1 residual.

3. klf1's EPInformer-seq cells were stale against the 2026-06-04
   "widewin-roadmap retrain (sparse H3K27ac)" weights swap on
   lucapinello/chorus-epinformerseq-v2 (HF commit 2654c05b7c) — committed
   alongside it but never re-executed. Hence K562 H3K27ac mean 1.771 ->
   0.132. Verified NOT device-dependent: cpu vs cuda agree to 0.006 on a
   3.78 range (0.16%). epinformerseq.py:416 calls hf_hub_download with no
   `revision`, which is what let this drift silently.

4. The AlphaGenome report was stale against the CAGE minus-strand dedup
   (#99/#101); it still carried both strands. all_scores 61 -> 32 is
   entirely CAGE:HepG2 58 -> 29 — the duplicate #101 exists to remove. No
   track lost: same 4 unique descriptions before and after.

Notebooks re-executed on H100, zero error outputs: klf1 14/14 cells,
advanced_multi_oracle 57/57, comprehensive_showcase 38/38. Registering the
documented `chorus` kernelspec (examples/notebooks/README.md:45) was
required first. Re-execution also dropped a foreign-home path leak
(/Users/jieconglin) from klf1's outputs.

DELIBERATELY NOT REGENERATED — blocked, needs a decision:
rs12740374_SORT1_legnet_report.html and rs12740374_SORT1_multioracle_report.html
are left at their origin/main bytes. #99 (2026-06-18) added "tile LegNet
across the locus for the IGV browser", but the legnet artefact was last
committed 2026-06-17 (#95, single-window), so the tiling has never been
applied. Applying it embeds a locus-wide 1-bp array and the report becomes
137 MB / the consolidated one 145 MB — both above GitHub's 100 MiB file
limit, i.e. unpushable. Dropping legnet's .pkl instead yields a shippable
9.55 MB but silently loses legnet's 3 IGV tracks (21 -> 18). The committed
9.93 MB / 21-track artefact came from a pre-#99 single-window .pkl and is
not reproducible with current code. So #99 has been unshippable since it
merged. Options: bin/downsample the embedded IGV arrays, revert the
tiling, or move these HTMLs to Git LFS.

Consequence: the consolidated example_output.{md,json} here carry the
corrected ChromBPNet numbers while the consolidated HTML does not, until
that is resolved.

Fast suite: 477 passed, 4 skipped, 0 errors.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant