Skip to content

Curated input/output stoichiometry now emitted — needs regen + benchmark re-run #48

Description

@adamjohnwright

What changed

_resolve_vr_entities previously hardcoded every input/output edge to stoichiometry=1 ({n: 1 for n in ...}), discarding the curated coefficient. It now reads Reactome's curated coefficient from the input/output relationship via a new get_reaction_io_stoichiometry (same rel.stoichiometry property get_complex_components uses) and attaches it per node:

  • each expanded EntitySet member inherits its entity's coefficient;
  • coefficients sum if two annotated entities map to the same node;
  • absent curation, the coefficient defaults to 1.

Phase-3 emission already consumed input_stoich/output_stoich, so no downstream change was needed. Unit test updated (test_no_duplicate_edges) to assert a 2× input coefficient survives; full non-Neo4j suite green (922 passed).

Why this needs follow-up

This is benchmark-affecting: emitted coefficients move from all-1 to curated values, and stoichiometry_weighted is DeltaSignal's default export aggregation. It could not be validated in the dev environment (no live Reactome Neo4j loaded).

Action items

  • Regenerate the logic-network catalog against live Neo4j
  • Re-run the MP-BioPath benchmark (curator + experimental) and compare macro-F1 vs the pre-change baseline
  • Confirm no stoichiometry-related regressions on the tracked pathways (PIP3, WNT, ERBB2, TP53, Mitotic_G1)

Related latent items surfaced in the same sweep (lower priority)

  • Diamond decomposition undercounts stoichiometry: shared visited set in _resolve_to_terminal_reactome_ids conflates cycle-guard with dedup (only affects the complex-component decomposition path, not these I/O edges).
  • is_valid_uuid (len==64) misclassifies the 36-char uuid4 from the all-strings branch of get_broken_apart_ids (currently unreachable).
  • Pathway-source flags (--pathway-id / --pathway-list / --top-level-pathways) are not mutually exclusive; precedence is silent.
  • validate-against-mpbiopath.py uses on_bad_lines="warn", silently shrinking the accuracy denominator on malformed ground-truth rows.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions