pools: orient by the active form (specs/039 amendments 6+7; made_from default) - #102
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.
directkeeps amendment 6 only.Census on 37 pools:
Result in deltasignal (
balance, same build, against the rule off):balanceas its default in a companion PR.Tests:
tests/test_pools.pyhas 28 tests.ruffandmypyare 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