Skip to content

drugs.csv: drug-derived entities per pathway (deltasignal specs/032) - #98

Closed
adamjohnwright wants to merge 2 commits into
mainfrom
feat/drugs-csv
Closed

adamjohnwright wants to merge 2 commits into
mainfrom
feat/drugs-csv

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor
  • What: a new drugs.csv beside cofactors.csv, listing the entities in each pathway that are drug-derived.
  • Rule: a Reactome Drug counts; a complex with any drug component counts; a set counts only if every member does.
  • Why: it lets deltasignal hold drug entities at baseline for a cell without the drug (specs/032). The motivation is RAF/MAP kinase, where MAP2K/MAPK-inhibitor complexes collapse a loop: experimental 28.6% against MP-BioPath's 93.9%.
  • Network output: unchanged. The file is additive.
  • Checks: 202 drug-derived entities across the current 92-pathway catalog (134 ChemicalDrug, 29 ProteinDrug, 39 complexes). New tests cover the structural rule, the variant handling and the empty-file case.
  • Also: the stale "+228" comment is corrected to "+197".

🤖 Generated with Claude Code

adamjohnwright and others added 2 commits September 26, 2026 13:51
…th any drug component; set whose every member is one) beside cofactors.csv, for a consumer modelling a cell without the drug (deltasignal specs/032). Network output unchanged. Also: stale +228 comment -> +197.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…iled drug query no longer costs containment.csv); class+name from the structure query (the unlabelled MATCH scanned every node, ~30 s a pathway; whole catalog now 0.8 s); list each node's exact id, a set_variant judged by its parent or chosen members; tests: candidate-only set (dropping hasCandidate now caught), the Cypher+cache path, variant ids.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
adamjohnwright added a commit that referenced this pull request Sep 28, 2026
….csv (#99)

* drugs.csv: ship the pathway's drug-derived entities (Drug; complex with any drug component; set whose every member is one) beside cofactors.csv, for a consumer modelling a cell without the drug (deltasignal specs/032). Network output unchanged. Also: stale +228 comment -> +197.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Review of #98: drugs.csv in its own try block after containment (a failed drug query no longer costs containment.csv); class+name from the structure query (the unlabelled MATCH scanned every node, ~30 s a pathway; whole catalog now 0.8 s); list each node's exact id, a set_variant judged by its parent or chosen members; tests: candidate-only set (dropping hasCandidate now caught), the Cypher+cache path, variant ids.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* LNG_SET_POOL (deltasignal specs/033, default off): a bare EntitySet catalyst/regulator becomes one pool node (the set) fed by set_member edges, feeding each reaction copy once, instead of every member wired onto every copy as a separate AND (catalyst/pos) or OR (neg) term. Reachability unchanged. nodes.csv kind set_pool.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Review of set-pool: a pooled catalyst no longer depletes its own member (the stId guards compared the SET's id; 4 E3-ligase sets would have closed member->pool-|member cycles); pooling only under complex-as-node; pool->reaction keeps the role flag under LNG_SET_MEMBERS_OR. Tests: depletion self-skip (mutation-checked), complex-as-node guard, SET_MEMBERS_OR, export_nodes set_pool kind.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* LNG_SET_POOL default on (trial, specs/033: held-out +6, tuning +10, exp +3); legacy regulator tests pinned to LNG_SET_POOL=0; test that pooling is the default

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* WIP LNG_CAP_POOLS (deltasignal specs/036, default off): a set input that resolves to several nodes in one virtual reaction (alternatives bundled by the variant cap) is emitted as a set pool feeding the reaction once. RAF's scaffold binding reaction: 28 inputs -> its 4 curated components. Tests to follow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* tests for LNG_CAP_POOLS: bundled alternatives pooled, single chosen member not, flag off, no leak between pathways, modifier sets excluded

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* Review of combined-037: cap pools only in reactions the variant cap bundled (CAPPED_IDS; an uncapped copy's chosen complex alternative resolves to co-required subunits -- miR-93 RISC in PIP3 was averaged); leaves grouped by alternative, a complex alternative is an AND unit (leaves -assembly-> alternative -set_member-> pool); a leaf another input also maps to stays direct; curated set stoichiometry on the pool edge; depletion onto a pool goes to its members. Phase 3 input emission factored into _emit_vr_inputs and tested; gate mutation-checked.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

Superseded by #99, which includes this change (drugs.csv export plus its review fixes) and was merged. Closing without merging.

@adamjohnwright
adamjohnwright deleted the feat/drugs-csv branch September 28, 2026 01:58
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