Skip to content

Wire EBI+ map score into titration + pca_optimization aggregate step#16

Merged
gav-sturm merged 1 commit into
mainfrom
feat/ebi-plus-map-score
Jul 6, 2026
Merged

Wire EBI+ map score into titration + pca_optimization aggregate step#16
gav-sturm merged 1 commit into
mainfrom
feat/ebi-plus-map-score

Conversation

@gav-sturm

Copy link
Copy Markdown
Collaborator

Wire the new EBI+ map score into the scoring pipelines

Consumer of the new phenotypic_ebi_plus metric (ops_utils PR: czbiohub-sf/ops_utils#23 — must merge together; this branch depends on it).

EBI+ = guide-level distinctiveness where the positive group is the gene's EBI complex (else the gene itself); non-complex genes reduce to distinctiveness, complex members collapse into one group.

Added everywhere EBI / distinctiveness is measured

  • titration.py: METRICS, colors, labels, _score_all_metrics, output columns, log line. Adding ebi_plus to METRICS auto-invalidates cached titration CSVs (same mechanism as when EBI was added), so markers re-score to pick it up.
  • pca_optimization aggregate step:
    • per-reporter scoring (aggregation.py): scalar + df + pca_report.csv columns + group_reporter_ebi_plus_raw.csv matrix + log
    • new _score_ebi_plus (embeddings.py): writes phenotypic_ebi_plus.csv + volcano plot
    • both 1st- and 2nd-pass call sites (phase2.py) + metric violins

Deliberately NOT changed

EBI+ is measured/reported only. It is not added to the consensus PCA-threshold selection formula (sweep_core.py), because that changes which features get selected and would invalidate existing runs — left as an explicit opt-in.

Ran on paper_v2 cell_dino (56 markers, per-guide-median titration): all reporters produce EBI+ columns and plots.

Attempts at a new map score — kept isolated from the diffex-interpretability branch (branched off main).

Adds the EBI+ metric (phenotypic_ebi_plus, ops_utils) everywhere EBI and
distinctiveness are currently measured:

- titration: METRICS/colors/labels, _score_all_metrics, columns, log line
- pca_optimization aggregate step:
  - per-reporter scoring (aggregation.py) + group_reporter_ebi_plus_raw.csv
  - new _score_ebi_plus (embeddings.py): CSV + volcano plot
  - both 1st- and 2nd-pass call sites (phase2.py) + metric violins

EBI+ is measured/reported only; it is deliberately NOT added to the consensus
PCA-threshold selection formula (sweep_core.py) since that would change feature
selection and invalidate existing runs. Requires ops_utils feat/ebi-plus-map-score.
@gav-sturm
gav-sturm merged commit d7db388 into main Jul 6, 2026
2 of 14 checks passed
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