Skip to content

Linear probe#5

Merged
lagillenwater merged 12 commits into
mainfrom
linear-probe
Jun 9, 2026
Merged

Linear probe#5
lagillenwater merged 12 commits into
mainfrom
linear-probe

Conversation

@lagillenwater

Copy link
Copy Markdown
Owner

Summary

Adds the harness to evaluate whether Stack-generated treated transcriptomes predict
PDTO drug response (AUC), with published methods and baselines to compare against.

What's here

  • Stack gene panel + embedding input (stack_panel.py, build_stack_panel.py,
    prep_stack_input.py) — map CoderData genes onto Stack's 15,012-gene vocabulary and
    write organoid/cell-line cohorts as pseudo-cells for embedding/generation.
  • Viability signatures (signatures.py, fetch_hallmark.py,
    data/static/hallmark_signatures.gmt) — curated death/proliferation sets and a loader
    for the MSigDB Hallmark sets (p53/apoptosis up, E2F/G2-M down), scored with a
    random-gene-set negative control + within-drug label-permutation null.
  • L1000 builders + viability-bridge gate (l1000.py, validate_bridge_readout.py,
    bridge_generated_to_auc.py, build_l1000_context.py) — one shared code path that
    (a) pairs real L1000 treated−DMSO deltas with GDSC2 AUC and (b) turns Stack-generated organoid deltas into AUC
    predictions. The .gctx is read in chunks (bounded memory); cmapPy is lazy-imported.
  • Modular viability adapters (adapters.py, score_viability_adapters.py) — three
    published transcriptome→viability methods, selectable (--methods, default all), each
    carrying its citation:
    • hallmark — single-sample signature scoring (Liberzon et al. 2015; Barbie et al. 2009)
    • szalai — L2 linear regression on the perturbation signature (Szalai et al., NAR 2019)
    • xgboost — elastic-net gene selection + gradient-boosted trees (Lu, Chen & Qin,
      BMC Bioinformatics 2021)
      Supervised adapters train on real L1000Δ→GDSC2 AUC and transfer to the generated
      organoid deltas (each cohort z-scored to cross the platform gap).
  • Baselines (baselines_soragni.py, predict_expression_baselines.py, transfer
    scripts) — drug-mean floor, GDSC2→Soragni transfer, and expression-prediction
    baselines, scored identically (global + interaction rho).

Notes

  • Green: 89 pytest, ruff, and pyright (strict on src/tests).
  • Adds the xgboost dependency (needs OpenMP/libomp locally).

lagillenwater and others added 11 commits June 5, 2026 14:33
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…F components. Add evaluation metrics.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mutation null. Add rank-scatter and AUC scatter plots with rho.

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

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

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lagillenwater
lagillenwater merged commit 8537e11 into main Jun 9, 2026
1 check passed
@lagillenwater
lagillenwater deleted the linear-probe branch June 30, 2026 16:04
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.

2 participants