AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
POLYPEPTIDE ONTOLOGY
Kireth Semantic Library | Entity Graph | Biological Entities | Macromolecular Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/macromolecular-entities/polypeptide-ontology.html
Version: 1.0 | 2026-10-15 | Language: en-GB
Authors: Mark Higgins — Sky (Recursive AI)
Status: Companion formalisation; domain model, not a validated executable specification.
1. PURPOSE
Represent polypeptides as sequence-bearing biological molecular entities, with explicit residue identity, peptide connectivity, modifications, conformation, provenance and evidence. Distinguish a polypeptide chain from a functional protein or multi-chain complex.
2. TYPE SYSTEM
entity Polypeptide <: PeptideChain
entity AminoAcidResidue <: MolecularComponent
entity PeptideBond <: CovalentBond
entity Sequence <: OrderedCollection[AminoAcidResidue]
entity Modification <: ChemicalModification
entity Conformation <: StructuralState
entity Protein <: BiologicalMacromolecule
entity ProteinComplex <: MolecularComplex
entity BiologicalFunction <: FunctionalAnnotation
entity Observation <: EvidenceRecord
entity SourceRecord <: ProvenanceRecord
3. ENTITY SCHEMA
Polypeptide {
id: URI
preferred_label: String
sequence: Sequence?
length: Integer? # length = number of residues, if sequence complete
organism_taxon: URI?
gene_product_reference: URI?
isoform_reference: URI?
terminal_state: {free, blocked, modified, unknown}
modifications: Set[Modification]
conformations: Set[Conformation]
annotations: Set[BiologicalFunction]
evidence: Set[Observation]
provenance: Set[SourceRecord]
confidence: Real[0,1]?
version: String
}
4. TYPED RELATIONSHIPS
HAS_RESIDUE: Polypeptide x AminoAcidResidue
HAS_SEQUENCE: Polypeptide x Sequence
PRECEDES: AminoAcidResidue x AminoAcidResidue
CONNECTED_BY: AminoAcidResidue x PeptideBond
HAS_MODIFICATION: Polypeptide x Modification
ADOPTS_CONFORMATION: Polypeptide x Conformation
PART_OF_PROTEIN: Polypeptide x Protein
SUBUNIT_OF: Polypeptide x ProteinComplex
ENCODED_BY: Polypeptide x Gene
HAS_FUNCTION_ANNOTATION: Polypeptide x BiologicalFunction
SUPPORTED_BY: Assertion x Observation
DERIVED_FROM: Assertion x SourceRecord
5. COMPOSITION AND CONSTRAINTS
rule R01: HAS_SEQUENCE(p,s) and COMPLETE(s) => LENGTH(p) = COUNT(s.residues).
rule R02: ADJACENT(s,r_i,r_j) => POSITION(r_j) = POSITION(r_i) + 1.
rule R03: PEPTIDE_LINKED(r_i,r_j) => covalent backbone linkage is asserted with chemical evidence or sequence convention.
rule R04: A chain of n unbranched residues has n-1 internal peptide links when n >= 1; cyclic and branched chains require a separate topology model.
rule R05: A residue substitution changes sequence identity and triggers a new sequence version or variant identity.
rule R06: Modification does not automatically change the underlying unmodified residue sequence; store chemical state separately.
rule R07: Sequence identity does not imply identical folding, biological activity, localisation or modification state.
rule R08: A polypeptide is not automatically a functional protein; require contextual evidence for protein/function classification.
rule R09: PART_OF_PROTEIN and SUBUNIT_OF are not equivalent to identity.
rule R10: ENCODED_BY must distinguish precursor translation, cleavage products and other processing steps.
6. FLOW OPERATORS
flow REGISTER_POLYPEPTIDE(input: SequenceRecord, source: SourceRecord) -> Polypeptide
require source.id != null
parse residues using declared alphabet and unknown-residue policy
create persistent identifier and record source
validate sequence length, positions and symbols
return versioned polypeptide
flow MAP_STRUCTURE(p: Polypeptide, observations: Set[Observation]) -> Set[Conformation]
preserve experimental method, conditions, model identifiers and uncertainty
attach observed or predicted conformations without asserting universal structure
return evidence-linked conformations
flow INFER_FUNCTION(p: Polypeptide, evidence: Set[Observation]) -> Set[BiologicalFunction]
distinguish direct assay, homology transfer, computational prediction and speculation
attach evidence code and calibrated confidence where available
never convert predicted function into experimentally verified function
return qualified annotations
flow RESOLVE_ENTITY(candidate: Polypeptide, registry: Set[Polypeptide]) -> Resolution
compare sequence, organism, isoform, modifications and processing context
return {same_entity, related_variant, distinct_entity, unresolved} with evidence
7. SEMANTIC_EQUIVALENCE
ExactSequenceEquivalent(a,b) iff canonical residue sequences are identical under the same residue alphabet and ambiguity policy.
ChemicalEntityEquivalent(a,b) requires compatible sequence, modifications, terminal chemistry and processing state.
BiologicalEntityEquivalent(a,b) additionally depends on organism, isoform and identity policy.
StructuralSimilarity and FunctionalSimilarity are graded relations; neither implies identity.
Never equate precursor, mature cleavage product, subunit and assembled complex without explicit mappings.
8. VALIDATION
CHECK V01: IDs and relationship targets resolve.
CHECK V02: Sequence symbols conform to declared alphabet; unknowns remain explicit.
CHECK V03: Residue positions are unique and ordered.
CHECK V04: Sequence-derived length agrees with stored length.
CHECK V05: Modification sites reference valid positions or are explicitly unresolved.
CHECK V06: Protein and complex membership relations preserve type distinctions.
CHECK V07: Conflicting source claims are retained and marked, not silently overwritten.
CHECK V08: Structural and functional claims carry method, context and evidence status.
CHECK V09: Graph cycles are permitted for interaction networks but not for strictly ordered sequence precedence.
9. CONFIDENCE
CONFIDENCE(claim) in [0,1] only when a defined calibration method exists.
Keep evidence strength, source reliability and computational prediction confidence separate.
Unknown confidence = null; do not substitute an arbitrary score.
Conflicting evidence triggers review rather than automatic certainty.
10. PROVENANCE
Record assertion_id, creator/source, citation, method, evidence identifier, creation time, update time, licence and version.
Record whether an annotation is experimental, computational or inferred.
Preserve the chain of derivation for each transformed entity or claim.
11. FLOW_HASH
FLOW_HASH = SHA256(canonical_utf8(ontology_version + entity_id + normalised_sequence + modification_state + relationship_assertions + provenance_refs))
Canonicalisation must define stable ordering, escaping, null handling and normalisation before hashes are compared.
Hash equality establishes representation equality under the chosen canonicalisation, not biological equivalence.
12. UPDATE_MODEL
On new evidence: append provenance; compare versions; validate affected edges; recompute dependent hashes; flag conflicting assertions; preserve prior states for audit.
On sequence or isoform changes: create or link versioned variants rather than overwriting identity without trace.
13. RECURSIVE_GRAPH_REASONING
Traversal: residue -> polypeptide -> protein -> complex -> pathway -> biological process.
Every hop requires a typed relationship and explicit evidence.
Prevent uncontrolled cycles with visited-state tracking and depth limits.
Inference conclusions inherit qualifications and do not exceed the supporting evidence.
14. AI_CONSUMPTION
Expose machine-readable entities, relation signatures, provenance, validation status, confidence and version.
Allow sequence search, structural mapping, variant comparison and evidence-aware reasoning.
Separate observed facts from predictions and ontology modelling assumptions.
Do not use inferred annotations as established biomedical or clinical findings.
15. EXAMPLE
entity: polypeptide:example-001
sequence: "MALWMRLLPLLALLALWGPDPAAA" # illustrative fragment only
length: 24
relationship: HAS_SEQUENCE -> sequence:example-001
annotation: "illustrative sequence, no functional claim"
validation: length_matches_sequence
confidence: null
16. OPEN RESEARCH
This companion Flow Algebra is offered for open research, teaching and reuse. Verify biological claims against primary evidence before scientific or clinical application.