Skip to content

pools: orient by the active form (specs/039 amendments 6+7; made_from default) - #102

Merged
adamjohnwright merged 4 commits into
mainfrom
feat/pools-active
Sep 28, 2026
Merged

adamjohnwright merged 4 commits into
mainfrom
feat/pools-active

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

deltasignal specs/039 amendments 6 and 7: orient each pool by its active form. φ₀ (the share of a pool at rest in its minority form) now refers to the active form, as Adam decided on 2026-09-28. Until now it referred to the modified form, and for an inhibitory modification (CDK2 p-Y15, lipin p-S106) the two are opposite.

A state is active when it acts downstream of the pool:

  • amendment 6: it is a catalyst or positive regulator of a non-pool reaction, directly or through a set-pool node;
  • amendment 7 (LNG_POOL_ACTIVE_VIA=made_from, the default): or it is the form the catalytic form is made from, within 2 reactions. For example, CCNA:CDK2 is made into the catalytic CCNA:p-T160-CDK2 by CAK.

The other state becomes the base (resting) form. Otherwise orientation falls back to the previous rule. direct keeps amendment 6 only.

Census on 37 pools:

  • 4 flip: LPIN1/2/3 → base p-S106, and CCNA:CDK2 → base p-Y15.
  • RAS does not flip.
  • Every flip was hand-checked as biologically plausible.

Result in deltasignal (balance, same build, against the rule off):

  • curator held-out +77 (p 1.8e-16), tuning +1, experimental 0;
  • MYC 80x in S phase is now correct.
  • The gains were traced, and none is a blocked signal.
  • deltasignal is adopting balance as its default in a companion PR.

Tests: tests/test_pools.py has 28 tests. ruff and mypy are clean. The one full-suite failure is the known MHC ratio test, which is local-output dependent and green in CI.

Implemented by a Fable 5.1 subagent.

🤖 Generated with Claude Code

adamjohnwright and others added 4 commits September 28, 2026 09:25
phi0 is the share of the ACTIVE form at rest, so orientation now asks which
state acts downstream: a state is active if, at node level, it has a
catalyst edge or a positive regulator edge into a reaction node that is not
one of the pool's own steps (any copy). With exactly one active state the
base is the other state (two states) or the non-active state furthest from
it in the state graph (more states; a tie falls back). Otherwise the
residue / donor / component rule of amendment 1 decides, as before. Counted
as oriented_by_activity and activity_fallbacks; ties are counted only among
the fallbacks.

On build 20260928-0320_6815dfd_pools039e: 1 of 37 pools is oriented by
activity and no base flips. CCNA:CDK2 <-> CCNA:p-Y15-CDK2 (R-HSA-69242) does
not flip: in R97 neither form catalyses anything; the kinase that acts is
CCNA:p-T160-CDK2, reached from CCNA:CDK2 by CAK phosphorylation (an input
edge, which the rule does not count). RAS keeps base GDP (RAS:GTP binds RAF
as an input, so it is not active by the rule; the donor rule decides).

tests/test_pools.py: 24 tests. New: an inhibitory phosphorylation (the
unmodified state catalyses downstream) makes the modified state the base; a
positive regulator edge counts and a negative one does not; an activating
phosphorylation keeps the unmodified base; both or neither active falls
back; a state's own step (RAS:GTP's intrinsic hydrolysis) does not make it
active; three states take the non-active state furthest from the active
one, and a tie falls back.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…de (amendment 6 census clarification)

Since specs/033 a member of a set-valued catalyst or regulator reaches the
reaction through the set's pool node, by a set_member edge. For the active
state test that node's catalyst and positive regulator edges are therefore
the member's: a state with a set_member edge into a set-pool node that acts
on a reaction outside the pool's own steps is active. This is the case of
the lipin pools (R-HSA-68875 pools 2-4, LPIN1/2/3 <-> p-S106-LPINn), whose
unphosphorylated states catalyse PA dephosphorylation only through the
"lipins" set-pool node; the earlier census wrongly reported no lipin pool.

tests/test_pools.py: 25 tests; the new one has a state that is a member of
a catalysing set-pool node (base flips to the modified state) and the same
node acting on nothing outside the pool (fallback).

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

Amendment 7: a state is also active if an input edge from it enters a
reaction that is not a pool step and, within two reactions, that route
reaches a catalyst or positive regulator of another non-step reaction (the
regulator reached directly or through a set-pool node). CCNA:CDK2 is made
into the catalytic CCNA:p-T160-CDK2 by CAK, one reaction outside its pool.

The flag lets both arms build from one commit:
- LNG_POOL_ACTIVE_VIA=direct (default): amendment 6 plus the set-pool
  clarification, unchanged;
- LNG_POOL_ACTIVE_VIA=made_from: the direct test first, then the made-from
  test for the states it did not mark; exactly-one-active and the fallbacks
  are as in amendment 6.
Any other value raises at startup (_reject_removed_env, which
bin/create-pathways.py runs before any work) and in find_pools. The flag is
in pathway_generator's fingerprinted env, so fingerprint.json and the
catalog's BUILD.json record it like LNG_SET_POOL and LNG_CAP_POOLS.

tests/test_pools.py: 28 tests. New: the CDK2 shape flips under made_from,
not under direct or the default, and through a set-pool node too; the RAS
shape (RAS:GTP binds RAF as an input, the complex catalyses nothing within
two reactions) does not flip; an unknown value is an error.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…39 amendment 7 adopted, 2026-09-28)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@adamjohnwright
adamjohnwright merged commit 06ccb63 into main Sep 28, 2026
4 checks passed
@adamjohnwright
adamjohnwright deleted the feat/pools-active branch September 28, 2026 15: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.

1 participant