FLOW ALGEBRA
Bacterial Strain Ontology v1.0
Kireth Semantic Library | Biological Entities > Microbial Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/microbial-entities/bacterial-strain-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Status: Independent formalisation; source page's embedded specification not exposed in retrieved HTML.
flow "BacterialStrainOntology" v1.0
# ---------- DOMAIN ----------
DOMAIN:
ontology: BacterialStrain
parent: MicrobialEntity
language: en-GB
scope: taxonomy, strain identity, genotype, phenotype, isolation, culture, provenance, and evidence
# ---------- TYPED ENTITIES ----------
ENTITY BacterialStrain <: BacterialPopulation {
strain_id: Identifier
scientific_name: TaxonName?
species_ref: BacterialSpecies?
designation: String
isolate_ref: BacterialIsolate?
genome_ref: GenomeSequence?
phenotypes: Set[PhenotypicTrait]
collection_accessions: Set[Accession]
evidence: Set[Evidence]
confidence: Real[0,1]
}
ENTITY BacterialSpecies <: Taxon
ENTITY BacterialIsolate <: BiologicalSample
ENTITY TypeStrain <: BacterialStrain
ENTITY ReferenceStrain <: BacterialStrain
ENTITY CultureCollection <: Repository
ENTITY Accession <: Identifier
ENTITY GenomeSequence <: SequenceRecord
ENTITY GeneticVariant <: MolecularVariant
ENTITY PhenotypicTrait <: BiologicalTrait
ENTITY AntimicrobialSusceptibility <: PhenotypicTrait
ENTITY IsolationEvent <: Event
ENTITY CultureEvent <: Event
ENTITY Evidence <: ProvenanceRecord
ENTITY Environment <: Context
ENTITY HostOrganism <: Organism
# ---------- RELATIONSHIPS ----------
RELATION BELONGS_TO_SPECIES(BacterialStrain, BacterialSpecies)
RELATION DERIVED_FROM_ISOLATE(BacterialStrain, BacterialIsolate)
RELATION HAS_GENOME(BacterialStrain, GenomeSequence)
RELATION HAS_VARIANT(BacterialStrain, GeneticVariant)
RELATION EXHIBITS_TRAIT(BacterialStrain, PhenotypicTrait)
RELATION HAS_SUSCEPTIBILITY(BacterialStrain, AntimicrobialSusceptibility)
RELATION DEPOSITED_IN(BacterialStrain, CultureCollection)
RELATION HAS_ACCESSION(BacterialStrain, Accession)
RELATION IS_TYPE_STRAIN_OF(TypeStrain, BacterialSpecies)
RELATION IS_REFERENCE_FOR(ReferenceStrain, Evidence)
RELATION ISOLATED_DURING(BacterialIsolate, IsolationEvent)
RELATION CULTURED_DURING(BacterialStrain, CultureEvent)
RELATION ORIGINATED_IN(BacterialIsolate, Environment)
RELATION ISOLATED_FROM_HOST(BacterialIsolate, HostOrganism)
RELATION SUPPORTED_BY(Assertion, Evidence)
RELATION RELATED_TO_STRAIN(BacterialStrain, BacterialStrain)
# ---------- INVARIANTS ----------
INVARIANT strain_id != null
INVARIANT confidence >= 0 AND confidence <= 1
INVARIANT TypeStrain SUBTYPE_OF BacterialStrain
INVARIANT strain_identity != species_identity
INVARIANT identical_species DOES_NOT_IMPLY identical_strain
INVARIANT identical_phenotype DOES_NOT_IMPLY identical_genotype
INVARIANT genome_similarity DOES_NOT_IMPLY strain_identity
INVARIANT antimicrobial_resistance REQUIRES drug, method, breakpoint_standard, date, evidence
INVARIANT type_strain_status REQUIRES nomenclatural_evidence
INVARIANT collection_accession IS repository_scoped
# ---------- INFERENCE ----------
RULE R01 SpeciesMembership:
IF BELONGS_TO_SPECIES(s, t)
THEN TYPE(s, BacterialStrain) AND TYPE(t, BacterialSpecies)
RULE R02 IsolateLineage:
IF DERIVED_FROM_ISOLATE(s, i) AND ISOLATED_DURING(i, e)
THEN HAS_ISOLATION_HISTORY(s, e)
RULE R03 StrainEvidence:
IF HAS_GENOME(s, g) AND VALIDATED(g) AND SUPPORTED_BY(HAS_GENOME(s,g), e)
THEN GENOMIC_CHARACTERISATION(s) WITH provenance=e
RULE R04 TypeStrainConstraint:
IF IS_TYPE_STRAIN_OF(s, species)
THEN BELONGS_TO_SPECIES(s, species)
PROVIDED nomenclatural_evidence_verified
RULE R05 SusceptibilityContext:
IF HAS_SUSCEPTIBILITY(s, a)
THEN REQUIRE a.drug AND a.method AND a.interpretation_standard
ELSE FLAG incomplete_susceptibility_claim
RULE R06 StrainIdentity:
IF matching_accessions(s1, s2) AND same_repository(s1, s2)
THEN CANDIDATE_SAME_STRAIN(s1, s2)
NOT AUTOMATICALLY SEMANTIC_EQUIVALENCE(s1, s2)
RULE R07 ConflictDetection:
IF conflicting_taxonomic_assignments(s)
THEN FLAG review_required
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
exact: same_verified_strain_identity_with_provenance
related: shared_lineage_or_supported_genomic_relatedness
distinct: different_verified_strain_identity
forbidden_shortcuts:
- same_species
- same_colony_morphology
- same_resistance_profile
- similar_genome_without_identity_validation
# ---------- CONFIDENCE ----------
CONFIDENCE:
score: weighted_evidence_quality * source_reliability * identity_consistency
range: [0,1]
preserve_uncertainty: true
contradictory_evidence: flag_and_reassess
no_unverified_numeric_claims: true
# ---------- PROVENANCE ----------
PROVENANCE:
required_fields:
- assertion_id
- source_identifier
- observation_or_method
- observation_date
- curator_or_institution
- version
- evidence_quality
preserve_original_records: true
record_revisions: true
# ---------- FLOW HASH ----------
FLOW_HASH:
canonicalise: [ontology_version, entity_types, relations, rules, evidence_refs]
digest: SHA-256
purpose: deterministic_change_detection
note: computed by implementation, not preassigned
# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
ingest: validated_new_taxonomic_genomic_or_phenotypic_evidence
validate: schema_and_provenance
compare: existing_assertions
resolve: preserve_conflicts_pending_review
recompute: [confidence, inference, flow_hash]
publish: versioned_state
rollback: supported
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
expose: [typed_entities, relationships, inference_rules, confidence, provenance, version]
interpret_as: formal_structural_reasoning_specification
avoid: [unsupported_strain_equivalence, invented_accessions, ungrounded_resistance_claims]
output: evidence_traceable_assertions
# ---------- VALIDATION EXAMPLES ----------
ASSERT BacterialStrain("example-strain-001")
ASSERT BELONGS_TO_SPECIES("example-strain-001", "example-species")
CHECK species_membership_does_not_establish_strain_equivalence
CHECK susceptibility_requires_test_context
CHECK type_strain_claim_requires_nomenclatural_source
CHECK every_inferred_assertion_retains_provenance
END FLOW
Download Code
Copy to Clipboard