FLOW ALGEBRA
Gut Microbiome Ontology v1.0
Kireth Semantic Library | Entity Graph > Biological Entities > Microbial Entities
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/microbial-entities/gut-microbiome-ontology.html
Status: Independently constructed formalisation; webpage's embedded specification not available for comparison.
flow "GutMicrobiomeOntology" v1.0
# 1. TYPE SYSTEM
type GutMicrobiome <: Microbiome
type GutHabitat <: AnatomicalHabitat
type Host <: Organism
type MicrobialTaxon <: Taxon
type MicrobialPopulation <: Population
type MicrobialCommunity <: Community
type MicrobialGene <: GeneticEntity
type Metabolite <: ChemicalEntity
type MetabolicPathway <: BiologicalProcess
type Diet <: Exposure
type Medication <: Exposure
type Sample <: BiologicalSample
type Observation <: Evidence
type TimePoint <: TemporalEntity
# 2. CORE ENTITY CONSTRAINTS
entity GutMicrobiome {
host: Host
habitat: GutHabitat
community: MicrobialCommunity
observation_time: TimePoint?
evidence: Observation[]
}
entity MicrobialPopulation {
taxon: MicrobialTaxon
abundance: Real? # measurement and normalisation method required
detection_limit: Real?
}
# 3. TYPED RELATIONSHIPS
relation HOSTED_BY(GutMicrobiome, Host)
relation LOCATED_IN(GutMicrobiome, GutHabitat)
relation CONTAINS_COMMUNITY(GutMicrobiome, MicrobialCommunity)
relation HAS_POPULATION(MicrobialCommunity, MicrobialPopulation)
relation CLASSIFIED_AS(MicrobialPopulation, MicrobialTaxon)
relation ENCODES(MicrobialGene, MetabolicPathway)
relation PRODUCES(MetabolicPathway, Metabolite)
relation ASSOCIATED_WITH(MicrobialTaxon, Metabolite)
relation EXPOSED_TO(Host, Exposure)
relation SAMPLED_FROM(Sample, GutMicrobiome)
relation SUPPORTS(Observation, Assertion)
relation OBSERVED_AT(Observation, TimePoint)
relation INTERACTS_WITH(MicrobialPopulation, MicrobialPopulation)
# 4. TAXONOMY AND DOMAIN NOTES
# The gut microbiome includes microorganisms, their genes and surrounding
# environmental context; microbiota denotes the microorganisms themselves.
# Bacteria, archaea, microbial eukaryotes and viruses may be represented;
# viruses are acellular biological entities, not cellular microorganisms.
# Taxonomic labels and ranks are versioned to their reference database.
# 5. INFERENCE RULES
rule CommunityMembership:
HAS_POPULATION(c,p) and CONTAINS_COMMUNITY(g,c)
=> MEMBER_OF_GUT_MICROBIOME(p,g)
rule TaxonPresence:
MEMBER_OF_GUT_MICROBIOME(p,g) and CLASSIFIED_AS(p,t)
and DETECTED_IN(p,s) and SAMPLED_FROM(s,g)
=> DETECTED_TAXON_IN(t,g,s)
rule PotentialMetabolicCapacity:
DETECTED_GENE_IN(gene,s) and ENCODES(gene,pathway)
=> POTENTIAL_PATHWAY_IN(pathway,s)
# Potential genetic capacity is not proof of active expression or flux.
rule ExposureAssociation:
EXPOSED_TO(h,e) and HOSTED_BY(g,h) and ASSOCIATED_CHANGE(g,e,obs)
=> OBSERVED_EXPOSURE_ASSOCIATION(g,e,obs)
# Association alone does not establish causation.
rule TemporalComparison:
SAMPLED_FROM(s1,g) and SAMPLED_FROM(s2,g)
and TIME_BEFORE(s1,s2) and COMPARABLE_PROTOCOL(s1,s2)
=> ELIGIBLE_FOR_LONGITUDINAL_COMPARISON(s1,s2)
# 6. VALIDATION AND SAFETY
constraint EveryGutMicrobiomeHasHostAndHabitat
constraint EveryQuantitativeAbundanceHasUnitAndMethod
constraint EveryObservationHasProvenanceAndTimestamp
constraint TaxonIdentificationHasReferenceVersion
constraint RelativeAbundanceDoesNotImplyAbsoluteCellCount
constraint DetectionDoesNotImplyViability
constraint AssociationDoesNotImplyCausation
constraint NoClinicalDiagnosisFromMicrobiomeProfileAlone
# 7. SEMANTIC EQUIVALENCE
SEMANTIC_EQUIVALENCE("intestinal microbiome", "gut microbiome", context="general")
SEMANTIC_EQUIVALENCE("intestinal microbiota", "gut microbiota", context="general")
NOT_EQUIVALENT("gut microbiome", "gut microbiota", reason="genes and environment included in broader microbiome concept")
NOT_EQUIVALENT("taxon detected", "active colonisation")
# 8. CONFIDENCE
CONFIDENCE(assertion) := calibrated_score(
evidence_quality,
method_validity,
reproducibility,
sampling_representativeness,
temporal_relevance,
taxonomy_resolution
)
# Store calibration method and uncertainty; do not invent numeric confidence.
# 9. PROVENANCE
PROVENANCE(assertion) := {
source_document,
sample_identifier,
collection_timestamp,
sequencing_or_assay_method,
reference_database_version,
processing_pipeline_version,
author,
licence,
uncertainty
}
# 10. FLOW HASH
FLOW_HASH := SHA256(canonicalise(
ontology_version,
entity_types,
relations,
rules,
constraints,
evidence_identifiers,
provenance
))
# Recompute whenever canonical inputs change.
# 11. RECURSIVE UPDATE MODEL
UPDATE_MODEL(new_observation) := {
validate(new_observation);
append_immutable_evidence(new_observation);
resolve_entity_identity();
update_supported_assertions();
invalidate_dependent_inferences();
recompute_confidence_and_uncertainty();
recompute_FLOW_HASH();
publish_versioned_state();
}
# 12. AI CONSUMPTION
AI_CONSUMPTION := {
expose_typed_graph: true;
preserve_evidence_links: true;
distinguish_observed_from_inferred: true;
distinguish_correlation_from_causation: true;
preserve_sampling_and_method_limits: true;
report_unknowns_explicitly: true;
prohibit_unsupported_health_claims: true;
return_version_and_FLOW_HASH: true;
}
# 13. EXAMPLE QUERY
query "Which microbial taxa were detected in a host's gut sample?" {
require: Sample, Host, Observation;
traverse: SAMPLED_FROM -> CONTAINS_COMMUNITY -> HAS_POPULATION -> CLASSIFIED_AS;
return: taxon, abundance_if_measured, method, timestamp, confidence, provenance;
exclude: unsupported_disease_inference;
}
end flow
Download Code
Copy to Clipboard