AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Metabolic Network Entity Ontology
LIBRARY: Kireth Semantic Library
VERSION: 1.0
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/enzyme-and-metabolic-entities/metabolic-network-entity-ontology.html
AUTHORS: Mark Higgins — Sky (Recursive AI)
STATUS: Formal ontology model; scientific assertions require evidence and context.
1. PURPOSE
Represent metabolic networks as typed, context-sensitive graphs of metabolites, reactions, enzymes, compartments and regulatory interactions. Support pathway traversal, stoichiometric analysis, inference, provenance and machine consumption.
2. ENTITY TYPES
entity MetabolicNetwork {id, name, organism, tissue?, condition?, version}
entity Metabolite {id, name, chemical_identifier?, charge?, formula?}
entity Reaction {id, name, reversibility, equation?, evidence?}
entity Enzyme {id, name, ec_number?, gene_product?}
entity Gene {id, identifier, organism}
entity Compartment {id, name, organism?}
entity Pathway {id, name, description?}
entity TransportProcess {id, source_compartment, target_compartment}
entity RegulatoryInteraction {id, mode, effector?, target?}
entity Flux {reaction_id, value, unit, condition, uncertainty?}
entity Evidence {id, source, method?, timestamp?, quality?}
entity Condition {id, medium?, temperature?, pH?, genotype?, time?}
3. RELATIONSHIP SIGNATURES
CONTAINS_NETWORK_ENTITY: MetabolicNetwork x (Metabolite|Reaction|Enzyme|Pathway)
PART_OF_PATHWAY: Reaction x Pathway
CONSUMES: Reaction x Metabolite x coefficient:positive_real
PRODUCES: Reaction x Metabolite x coefficient:positive_real
CATALYSED_BY: Reaction x Enzyme
ENCODED_BY: Enzyme x Gene
LOCATED_IN: (Metabolite|Reaction|Enzyme) x Compartment
TRANSPORTS: TransportProcess x Metabolite
REGULATES: RegulatoryInteraction x (Reaction|Enzyme)
SUPPORTED_BY: (Entity|Relationship|Assertion) x Evidence
CONTEXTUALISED_BY: (Entity|Assertion|Flux) x Condition
CONNECTED_TO: Reaction x Reaction [derived, compartment-aware]
4. GRAPH MODEL
N := (V, E, T, C, P)
V := typed metabolic entities
E := typed directed or qualified relations
T := type constraints and identity rules
C := biological context (organism, compartment, condition)
P := provenance and confidence annotations
A metabolite is not identical to a metabolite-in-compartment instance.
Define state node M_c := (metabolite_id, compartment_id).
A reaction is a hyperedge from a multiset of substrates to a multiset of products.
5. STOICHIOMETRY
Let S in R^(m x n) be the stoichiometric matrix, with m metabolite-compartment states and n reactions.
S_ij < 0 for consumption; S_ij > 0 for production; S_ij = 0 otherwise.
Let x in R^m denote concentrations and v in R^n reaction fluxes.
Mass balance: dx/dt = S v + b, where b captures specified boundary exchange or external source terms.
At steady state: S v + b = 0.
For a closed steady-state internal network with b = 0: S v = 0.
Flux bounds: l_j <= v_j <= u_j.
Bounds must reflect directionality, capacity, medium and condition.
6. NETWORK OPERATORS
ADD_ENTITY(N, e) -> N' subject to valid type and unique identifier.
ADD_RELATION(N, r) -> N' subject to domain/range constraints.
REMOVE_ENTITY(N, id) -> N' with explicit edge-deletion policy.
MERGE(N1, N2, mapping) -> N' preserving conflicting provenance.
SUBGRAPH(N, predicate) -> N_filtered.
TRACE(N, metabolite, depth, context) -> reachable reaction/metabolite subgraph.
PROJECT(N, view) -> reaction graph | metabolite graph | bipartite graph.
COMPOSE(N1, N2, interface) -> connected network only if shared identifiers and compartments are compatible.
VALIDATE(N) -> typed and biochemical constraint report.
7. INFERENCE RULES
RULE R1: CONSUMES(r, m1, a) AND PRODUCES(r, m2, b) -> TRANSFORMS(r, m1, m2), conditional on reaction representation.
RULE R2: PRODUCES(r1, m) AND CONSUMES(r2, m) AND SAME_COMPARTMENT(m, r1, r2) -> POTENTIAL_FLOW_LINK(r1, r2).
RULE R3: CATALYSED_BY(r, e) AND ENCoded_BY(e, g) -> GENE_ASSOCIATED_WITH_REACTION(g, r), subject to enzyme-complex and isoenzyme qualifications.
RULE R4: PART_OF_PATHWAY(r, p) AND CONTAINS_NETWORK_ENTITY(n, p) -> ASSOCIATED_WITH_NETWORK(r, n).
RULE R5: REGULATES(i, r) AND CONTEXTUALISED_BY(i, c) -> CONDITION_DEPENDENT_REGULATION(r, c).
RULE R6: TRANSPORTS(t, m) -> REQUIRE compartment-specific substrate and product state nodes.
RULE R7: absence of an annotated edge DOES NOT imply biochemical impossibility.
8. SEMANTIC_EQUIVALENCE
SEMANTIC_EQUIVALENCE(a,b) requires compatible entity types, curated identifiers and matching biological granularity.
Names and synonyms alone establish candidate mappings, not identity.
Distinguish enzyme from gene, reaction from pathway, and metabolite from metabolite pool.
Compartment, organism, stereochemistry, protonation and reaction direction can invalidate a proposed equivalence.
Map external identifiers with source, mapping version and confidence.
9. CONFIDENCE
CONFIDENCE(assertion) in [0,1] represents calibrated support, not intrinsic biological truth.
Inputs may include experimental reproducibility, annotation quality, source agreement and condition match.
Do not multiply correlated evidence as if independent.
Store confidence with evidence references, assessment method and last review date.
Unverified inferred relations must remain distinguishable from experimentally established ones.
10. CONSTRAINTS AND VALIDATION
CHECK: every relation satisfies declared domain and range.
CHECK: reaction stoichiometric coefficients are positive in CONSUMES/PRODUCES assertions.
CHECK: each reaction has an explicit compartmental interpretation.
CHECK: transport edges distinguish source and destination compartments.
CHECK: atom/elemental and charge balance where chemical formulae are known; flag exceptions and unknowns.
CHECK: reversibility and thermodynamic assumptions are not inferred from topology alone.
CHECK: currency metabolites do not create misleading pathway connectivity in unfiltered projections.
CHECK: gene-reaction rules represent complexes and alternatives correctly.
CHECK: flux unit consistency and feasible bounds.
CHECK: provenance and organism/context compatibility.
11. ANALYSIS FLOWS
flow NETWORK_RECONSTRUCTION:
INPUT: organism, reaction_database, gene_annotations, compartment_model, evidence
PROCESS: normalise identifiers -> construct reaction hyperedges -> assign compartments -> attach enzymes/genes -> validate mass balance -> annotate provenance
OUTPUT: versioned metabolic network and validation report
flow PATHWAY_DISCOVERY:
INPUT: network, start_metabolite, target_metabolite, context, constraints
PROCESS: compartment-aware graph traversal -> filter infeasible/unsupported edges -> rank candidate routes
OUTPUT: candidate paths with evidence, assumptions and uncertainty
flow FLUX_BALANCE_ANALYSIS:
INPUT: S, lower_bounds, upper_bounds, objective, boundary_conditions
REQUIRE: stated steady-state and optimisation assumptions
SOLVE: maximise c^T v subject to S v + b = 0 and l <= v <= u
OUTPUT: feasible flux vector or infeasibility report; alternate optima possible
flow PERTURBATION:
INPUT: network, target_gene_or_enzyme, perturbation, context
PROCESS: update gene-protein-reaction constraints -> recompute permitted fluxes -> compare baselines
OUTPUT: predicted network changes with explicit model assumptions
12. RECURSIVE FLOW
RECURSE(N, new_evidence):
normalise(new_evidence)
compare with existing assertions
revise only evidence-supported entities/relations
validate affected subgraphs
propagate dependent inference changes
preserve previous versions and conflicting evidence
emit change set and new model hash
TERMINATE when no supported changes remain or iteration budget is reached.
13. FLOW_HASH
FLOW_HASH := SHA256(canonical_serialisation(ontology_version, entities, relations, constraints, evidence_refs, context))
Canonicalisation requires stable identifiers, deterministic ordering, explicit null treatment and versioned encoding.
Hash equality establishes byte-level canonical model equality, not biological correctness.
14. UPDATE_MODEL
UPDATE_MODEL {strategy: incremental, versioning: immutable_snapshots, conflict_policy: preserve_and_flag, validation: required, rollback: supported}
On update: verify source -> type-check -> reconcile identifiers -> validate constraints -> recompute dependent inferences -> regenerate FLOW_HASH.
15. AI_CONSUMPTION
AI_CONSUMPTION {
formats: [typed_graph, JSON-LD, RDF, tabular_stoichiometry],
required_fields: [entity_id, entity_type, relation_type, provenance, context],
optional_fields: [confidence, units, temporal_validity, external_ids],
guardrails: [distinguish_observation_from_inference, expose_missing_data, no_unjustified_causality],
tasks: [semantic_retrieval, graph_reasoning, pathway_analysis, hypothesis_generation]
}
16. EXAMPLE (ILLUSTRATIVE, NOT AN EMPIRICAL CLAIM)
Metabolite A[c] --consumed_by--> Reaction R1 --produces--> Metabolite B[c]
Metabolite B[c] --consumed_by--> Reaction R2 --produces--> Metabolite C[c]
R1 --catalysed_by--> Enzyme E1
R2 --part_of_pathway--> Pathway P
Derived: R1 potentially connects to R2 through B[c].
Not derived: R1 and R2 necessarily carry nonzero flux under every condition.
17. INTEROPERABILITY
Use persistent IDs for metabolites, reactions, enzymes, genes and compartments.
Align with established biochemical ontologies and exchange formats when mappings are verified.
Preserve source licence, dataset release, citation and evidence attribution.
Represent uncertain and competing annotations without silently collapsing them.
END FLOW ALGEBRA