Skip to content

feat(cluster): species-parameterize CORUM + MSigDB benchmark generation (#238) - #240

Merged
mat10d merged 1 commit into
mainfrom
cluster-species-benchmarks
Jul 30, 2026
Merged

feat(cluster): species-parameterize CORUM + MSigDB benchmark generation (#238)#240
mat10d merged 1 commit into
mainfrom
cluster-species-benchmarks

Conversation

@mat10d

@mat10d mat10d commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Cluster benchmark generation (workflow/lib/cluster/scrape_benchmarks.py) hardwired human sources, so mouse (and other non-human) screens could not build the CORUM/KEGG group validators. Closes #238.

  • CORUM (get_corum_data / generate_corum_group_benchmark): now accept species_id. Human keeps its native file_id=human export unchanged (zero regression); other species are pulled from the CORUM complete export and filtered by the organism column (CORUM has no per-organism download for them).
  • MSigDB (generate_msigdb_group_benchmark): now accepts species_id and resolves the collection per species. Human = KEGG MEDICUS (unchanged). Mouse has no native KEGG collection in MSigDB, so the native mouse Reactome collection is used. An explicit url still overrides.
  • STRING and UniProt generators were already species_id-aware — no change; the companion analysis PR just starts passing them the species.

Note on the mouse "KEGG" slot

For mouse, the second group validator is native Reactome data occupying the slot named kegg_group_benchmark. This was a deliberate choice (native mouse pathways, no orthology inference) over orthology-converting human KEGG. Functionally it is a valid pathway group benchmark; the name is retained to avoid churn in config keys and downstream labels.

Verification

Live smoke test (not covered by small_test_analysis, which reads static committed TSVs and never invokes these generators):

  • CORUM human path byte-identical request → 5,628 complexes (unchanged).
  • CORUM mouse → 1,333 complexes → 3,893 rows / 1,322 groups (matches an independent native-mouse rebuild).
  • MSigDB mouse → native Reactome groups.
  • ruff check + ruff format --check clean.

…on (#238)

Cluster benchmark generation hardwired human sources, so mouse (and other
non-human) screens could not build the CORUM/KEGG group validators.

- get_corum_data / generate_corum_group_benchmark: accept species_id; human
  keeps its native export unchanged, other species are filtered out of the
  CORUM complete export by organism.
- generate_msigdb_group_benchmark: accept species_id and resolve the MSigDB
  collection per species (human=KEGG MEDICUS; mouse has no native KEGG, so the
  native mouse Reactome collection is used). Explicit url still overrides.
- STRING and UniProt generators were already species-aware; no change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRP7UVsNz6igHrJE72nVfT
@mat10d
mat10d merged commit b6cf9e7 into main Jul 30, 2026
3 checks passed
@mat10d
mat10d deleted the cluster-species-benchmarks branch July 30, 2026 21:07
akcd1 pushed a commit that referenced this pull request Aug 6, 2026
Bring main (5 commits, #227/#231/#232/#234/#240) into the branch ahead of
#171. Merged rather than rebased: a rebase replays 45 commits and re-hits the
same aggregate collisions repeatedly, while the merge conflicts in one file,
and main only accepts squash merges so the linear history would be flattened
on landing anyway.

Both conflicts are in generate_feature_table.py and are complementary:

- #234 added a warning when perturbation_id_col is unset; the branch added the
  control_name_col fallback (#222). Independent, both kept.
- Column ordering for the construct table: the branch dedupes via
  dict.fromkeys over [pert_id_col, pert_col, control_name_col, ...], main
  dedupes only the id/name pair. Kept the branch version -- main's drops
  control_name_col, which the control filter downstream indexes on, so main's
  form would KeyError under a construct-level config.

ruff check and ruff format clean.

Co-Authored-By: Claude Opus 5 (1M context) <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.

[BUG] Cluster config not working for mouse genes

1 participant