SBGN-AF model
pd2af.building.sbgn.model
Build the SBGN-AF model from clingo activity / influence atoms.
make_and_add_model is the AF model pass: it walks the activity atoms
(keptSpeciesKey / promotedSubunitKey keys, each resolving to an input
SBGN-PD entity pool, phenotype or promoted subunit) and the influence atoms,
and populates context.model with canonical, content-deduped compartments,
activities and influences.
Each entity pool becomes a :class:BiologicalActivity carrying a typed
:class:UnitOfInformation (the entity class) and a label that is the canonical
serialization of the whole entity pool (:mod:pd2af.building.sbgn.labels). In
the merged reading (keep_species off) the label is built with state
variables stripped, so the distinct forms of the same base entity collapse to
one merged activity, and the entity's unit-of-information block is moved off
the label onto the typed
:class:UnitOfInformation glyph (a curator's AF map carries ct:mRNA on the
glyph -- no brackets -- not [ct:mRNA] in the label); otherwise the label
keeps both blocks and distinct forms stay distinct under content-based model
equality. A PD
:class:Phenotype process becomes an AF :class:Phenotype activity. Dedup is
honoured by interning every constructed element through the shared content
cache (register_or_reuse) and resolving influence endpoints through the
deduped activities, mirroring the model-element dedup invariant.
Functions:
| Name | Description |
|---|---|
make_and_add_model |
Build |
make_and_add_model
make_and_add_model(context: BuilderContext, clingo_model: Any)
Build context.model from the clingo atoms (pass 1).