AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
PROTEIN DOMAIN ONTOLOGY
Kireth Semantic Library | Biological Entities / Protein Entities
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/protein-entities/protein-domain-ontology.html
Status: Domain-grounded formalisation; webpage's embedded specification not available in extracted text.
Version: 1.0 | Date: 2026-10-16
01. PURPOSE
Represent protein domains as identifiable sequence/structure regions with evolutionary, functional and contextual relationships. Do not equate a domain with an entire protein, a short motif, or an intrinsically disordered region.
02. TYPE SYSTEM
TYPE Protein = {id, sequence, organism?, accession?, isoform?, provenance}
TYPE ProteinDomain = {id, protein_id, start, end, family?, fold?, function?, evidence, confidence}
TYPE DomainFamily = {id, name, homologous_members, evidence}
TYPE DomainArchitecture = {protein_id, ordered_domain_instances, overlaps, evidence}
TYPE SequenceMotif = {id, pattern, coordinates?, evidence}
TYPE StructuralFold = {id, topology, evidence}
TYPE Function = {id, description, context}
TYPE Interaction = {domain_a, partner, interface?, condition?, evidence}
TYPE Annotation = {subject, predicate, object, source, method, timestamp, confidence}
TYPE Evidence = {source_id, method, quality, organism?, version}
TYPE CoordinateSystem = {reference_sequence, accession_version, indexing, inclusive_end}
TYPE Confidence = real in [0,1]
03. RELATIONSHIPS
RELATION part_of(ProteinDomain, Protein)
RELATION has_domain(Protein, ProteinDomain)
RELATION belongs_to_family(ProteinDomain, DomainFamily)
RELATION adopts_fold(ProteinDomain, StructuralFold)
RELATION contributes_to(ProteinDomain, Function)
RELATION binds(ProteinDomain, ProteinDomain|Protein|Molecule)
RELATION precedes(ProteinDomain, ProteinDomain)
RELATION overlaps(ProteinDomain, ProteinDomain)
RELATION homologous_to(ProteinDomain, ProteinDomain)
RELATION contains_motif(ProteinDomain, SequenceMotif)
RELATION supported_by(Annotation, Evidence)
RELATION equivalent_to(Annotation, Annotation)
04. WELL-FORMEDNESS CONSTRAINTS
RULE valid_coordinates(d,p) := d.protein_id=p.id AND 1<=d.start<=d.end<=length(p.sequence).
RULE domain_length(d) := d.end-d.start+1.
RULE domain_sequence(d,p) := substring(p.sequence,d.start,d.end) WHEN valid_coordinates(d,p).
RULE same_reference(d1,d2) := d1.protein_id=d2.protein_id AND reference_version(d1)=reference_version(d2).
RULE overlaps(d1,d2) := same_reference(d1,d2) AND max(d1.start,d2.start)<=min(d1.end,d2.end).
RULE precedes(d1,d2) := same_reference(d1,d2) AND d1.end<d2.start.
RULE no_coordinate_transfer := coordinates cannot transfer between isoforms without validated alignment.
RULE domain_not_motif := motif_match does not alone establish an independently folding domain.
RULE domain_not_function := domain family membership does not guarantee identical biochemical function.
RULE domain_not_fold := shared fold does not alone prove homology.
RULE partial_domain := fragments and truncated proteins require explicit completeness flag.
05. CLASSIFICATION
CLASS catalytic_domain : ProteinDomain
CLASS binding_domain : ProteinDomain
CLASS regulatory_domain : ProteinDomain
CLASS interaction_domain : ProteinDomain
CLASS transmembrane_domain : ProteinDomain
CLASS repeat_domain : ProteinDomain
CLASS immunoglobulin_like_domain : ProteinDomain
CLASS kinase_domain : ProteinDomain
CLASS zinc_finger_domain : ProteinDomain
CLASS SH2_domain : ProteinDomain
CLASS SH3_domain : ProteinDomain
CLASS PH_domain : ProteinDomain
NOTE classifications are non-exclusive; some are functional, others structural or family labels.
NOTE transmembrane helices are not automatically independently folding domains.
06. DOMAIN DETECTION FLOW
INPUT protein_sequence, reference_accession, domain_models, evidence_sources
STEP validate sequence alphabet and accession/version.
STEP align sequence to curated domain profile models (e.g. HMMs).
STEP record match interval, model accession, score, E-value and thresholds.
STEP resolve competing, nested and overlapping calls with family-specific rules.
STEP integrate structure predictions or experimental structures when available.
STEP attach evidence, provenance and calibrated confidence.
OUTPUT ordered domain annotations plus unresolved candidate regions.
RULE low_score_match => candidate_only, not asserted_domain.
RULE predicted_structure => predicted_evidence, not experimental_confirmation.
07. DOMAIN ARCHITECTURE
FUNCTION architecture(p) := sort([d | has_domain(p,d)], by=start).
FUNCTION architecture_signature(p) := ordered_family_ids(architecture(p)).
RULE architecture_similarity(p,q) := weighted_similarity(architecture(p),architecture(q)); retain domain order and multiplicity.
RULE repeat_copy_number(p,f) := count(d in architecture(p) where belongs_to_family(d,f)).
RULE fusion_candidate(p,q) := evidence of architecture combination; requires independent evolutionary support.
RULE domain_shuffling := hypothesis when architectures differ by insertion, deletion, duplication or rearrangement.
08. STRUCTURE AND FUNCTION
RULE structure_function_link(d,f) := contributes_to(d,f) only if evidence supports contextual role.
RULE catalytic_site(d) := site residues verified against reference coordinates and evidence.
RULE binding_interface(d,x) := interaction supported by structural, biochemical or curated evidence.
RULE conformational_change(d,s1,s2) := state transition supported by observation or model.
RULE allostery(d1,d2) := mechanistic regulatory link, not inferred solely from co-occurrence.
RULE disorder_qualification := intrinsically disordered segments may mediate function without classical globular folding.
09. EVOLUTIONARY REASONING
RULE homologous_to(d1,d2) := supported by statistically meaningful sequence/profile similarity and evolutionary context.
RULE orthology_paralogy := distinguish gene relationships from domain homology.
RULE convergent_fold := structural similarity may arise without demonstrable common ancestry.
RULE duplication_event := inferred from phylogenetic and architecture evidence, not repeat count alone.
RULE horizontal_transfer := possible explanation only with comparative genomic support.
10. RECURSIVE REASONING
FLOW DomainReasoning(p,depth,visited):
REQUIRE depth>=0.
IF p.id IN visited: RETURN cycle_reference(p.id).
LET visited2=visited UNION {p.id}.
LET domains=architecture(p).
LET annotations=validate_and_annotate(domains).
IF depth=0: RETURN annotations.
LET partners=verified_interaction_partners(domains).
LET downstream=MAP(partners, x -> DomainReasoning(x,depth-1,visited2)).
RETURN merge_without_duplicate_claims(annotations,downstream).
TERMINATION: bounded depth, visited-set cycle detection, finite evidence graph.
11. CONFIDENCE
CONFIDENCE(d,claim) := calibrated_score(sequence_support,structure_support,experimental_support,curation,context).
RULE confidence_range := 0.0<=CONFIDENCE<=1.0.
RULE missing_evidence := unknown; never assign zero as a synonym for false.
RULE conflicting_evidence := preserve both assertions and evidence provenance.
RULE propagated_confidence := never increase confidence solely through recursive restatement.
RULE model_prediction := distinguish prediction confidence from probability of biological truth.
12. SEMANTIC_EQUIVALENCE
SEMANTIC_EQUIVALENCE(a,b) := same biological referent, reference version and scope, supported by cross-reference or curated mapping.
RULE family_alias := synonymous family names can map to a canonical identifier.
RULE domain_instance_vs_family := not equivalent.
RULE motif_vs_domain := not equivalent.
RULE homologous_vs_equivalent := homology does not imply identity.
RULE coordinate_alias := equivalence requires matching reference sequence and coordinate convention.
13. FLOW_HASH
FLOW_HASH(record) := SHA256(canonical_utf8(ontology_version,canonical_ids,reference_versions,coordinates,relations,evidence_ids,rule_version)).
RULE canonical_order := sort sets and key/value fields deterministically before hashing.
RULE hash_semantics := content fingerprint, not scientific proof or confidence measure.
14. UPDATE_MODEL
UPDATE_MODEL(new_evidence):
validate source, licence, accession and version.
identify affected domains and dependent annotations.
retain prior versions and timestamps.
recompute impacted domain boundaries, relationships and confidence.
mark superseded or disputed claims without silent deletion.
regenerate FLOW_HASH for changed canonical records.
emit audit log and changed-claim summary.
15. AI_CONSUMPTION
AI_CONSUMPTION:
parse typed entities and relations before inference.
enforce reference-specific coordinates and evidence levels.
expose observed/predicted/inferred/unknown distinctions.
preserve taxonomic and experimental context.
do not infer clinical effects or disease causation from domain labels alone.
return provenance, confidence and uncertainty with every derived claim.
stop recursive traversal at configured depth or cycle.
16. VALIDATION TESTS
TEST kinase_annotation: a significant curated kinase profile match supports kinase-domain candidate; activity requires further evidence.
TEST SH2_binding: SH2 family suggests phosphotyrosine-binding capability, not a verified binding partner.
TEST overlapping_calls: overlapping family hits remain explicit until resolved by model-specific rules.
TEST isoform_change: domain coordinates must be remapped against the alternative isoform.
TEST missing_structure: sequence-supported domain remains possible without experimental structure.
TEST repeat_domains: architecture retains repeated copies and their order.
TEST cycle: recursive traversal halts at a visited protein node.
TEST update: changed reference accession invalidates coordinate-dependent annotations pending revalidation.
17. OUTPUT CONTRACT
OUTPUT ProteinDomainRecord {
canonical_id, protein_accession_version, start, end,
domain_family_id?, classification[], function_claims[],
structure_claims[], interactions[], evidence[],
confidence, uncertainty, provenance, flow_hash,
ontology_version, last_updated
}
18. LIMITATIONS
Domain boundaries and nomenclature depend on databases and evidence methods.
Not all protein domains fold independently or have a single conserved function.
Sequence prediction, structure prediction and experimental verification are distinct.
This Flow Algebra is a declarative reasoning specification; execution requires an implementing parser, evidence store and domain-analysis engine.
END FLOW ALGEBRA