FLOW ALGEBRA
Genome Ontology — Kireth Semantic Library
Version: 1.0 | Date: 2026-10-15 | Locale: en-GB
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/genetic-entities/genome-ontology-2.html
Authors: Mark Higgins — Sky (Recursive AI)
Status: Domain-grounded draft; source webpage not independently verified.
flow "GenomeOntology" v1.0
# 01 — PURPOSE AND SCOPE
ontology.id: "kireth:biological-entities:genetic-entities:genome"
ontology.label: "Genome Ontology"
ontology.parent: "Genetic Entity Ontology"
ontology.definition: "A genome is the complete genetic material of a biological entity or replicating genetic system, described with explicit scope and reference context."
ontology.scope: [nuclear_genome, organellar_genome, prokaryotic_genome, viral_genome, reference_genome, individual_genome, metagenomic_assembly]
ontology.exclusions: ["An individual gene is not itself a whole genome", "A transcriptome is not equivalent to a genome", "An assembly is a representation and may be incomplete"]
# 02 — TYPED ENTITIES
entity Genome { id: URI, taxon: Taxon?, source: BiologicalSample?, genome_type: GenomeType, molecule_type: MoleculeType, topology: Topology?, ploidy: Integer?, completeness: Completeness, provenance: Provenance }
entity Chromosome { id: URI, genome_id: URI, sequence: Sequence?, topology: Topology? }
entity Replicon { id: URI, genome_id: URI, molecule_type: MoleculeType, topology: Topology }
entity Gene { id: URI, location: GenomicInterval?, biotype: String? }
entity Allele { id: URI, locus: GenomicInterval?, variant: Variant? }
entity Variant { id: URI, reference: SequenceReference, position: GenomicInterval, change: String }
entity Sequence { id: URI, alphabet: MoleculeType, length: Integer, checksum: String? }
entity GenomeAssembly { id: URI, source_genome: URI?, contigs: List[Contig], assembly_level: String, version: String }
entity Contig { id: URI, sequence: Sequence, length: Integer }
entity ReferenceGenome { id: URI, assembly: GenomeAssembly, reference_scope: String, release: String }
entity Annotation { id: URI, target: URI, feature_type: String, method: String, evidence: Evidence }
entity GenomicInterval { reference_id: URI, start: Integer, end: Integer, strand: Strand?, coordinate_system: String }
entity BiologicalSample { id: URI, organism: Taxon?, collection_context: String? }
entity Taxon { id: URI, scientific_name: String }
entity Evidence { id: URI, source: URI, method: String, quality: Float? }
entity Provenance { creator: String?, method: String?, source: URI?, date: Date?, version: String? }
entity Confidence { score: Float, rationale: String, evidence: List[Evidence] }
enum GenomeType = [nuclear, mitochondrial, plastid, bacterial, archaeal, viral, plasmid, other]
enum MoleculeType = [DNA, RNA]
enum Topology = [linear, circular, segmented, unknown]
enum Completeness = [complete, near_complete, draft, partial, unknown]
enum Strand = [plus, minus, unknown]
# 03 — RELATIONSHIP SIGNATURES
relationship has_chromosome: Genome -> Chromosome
relationship has_replicon: Genome -> Replicon
relationship contains_gene: Genome -> Gene
relationship has_allele: GenomicInterval -> Allele
relationship has_variant: Genome -> Variant
relationship represented_by: Genome -> GenomeAssembly
relationship has_contig: GenomeAssembly -> Contig
relationship has_annotation: GenomeAssembly -> Annotation
relationship derived_from: GenomeAssembly -> BiologicalSample
relationship belongs_to_taxon: Genome -> Taxon
relationship located_on: Gene -> Chromosome | Replicon | Contig
relationship aligned_to: Sequence -> ReferenceGenome
relationship supported_by: Annotation -> Evidence
relationship supersedes: GenomeAssembly -> GenomeAssembly
relationship semantically_equivalent_to: URI -> URI
relationship differs_from: URI -> URI
# 04 — CLASSIFICATION RULES
rule GENOME_CLASSIFICATION:
if entity.type == Genome and entity.genome_type == mitochondrial
then classify(entity, "OrganelleGenome")
rule NUCLEAR_GENOME:
if entity.type == Genome and entity.genome_type == nuclear
then classify(entity, "NuclearGenome")
rule VIRAL_RNA_GENOME:
if entity.type == Genome and entity.genome_type == viral and entity.molecule_type == RNA
then classify(entity, "RNAViralGenome")
rule ASSEMBLY_NOT_GENOME:
if entity.type == GenomeAssembly
then prohibit(assert_type(entity, Genome))
# 05 — VALIDATION AND INVARIANTS
constraint unique_id: each entity.id is globally unambiguous within its namespace
constraint confidence_range: 0.0 <= Confidence.score <= 1.0
constraint interval_valid: GenomicInterval.start >= 0 and GenomicInterval.end > GenomicInterval.start
constraint interval_reference: interval positions must be interpreted relative to an identified reference sequence and coordinate convention
constraint assembly_completeness: assembly_level alone does not prove biological completeness
constraint genome_scope: distinguish organism-wide genetic material from nuclear-only and organelle-only datasets
constraint genome_size: length values must carry units and scope, including whether gaps and repeats are represented
constraint ploidy: ploidy applies only where biologically meaningful and must not be inferred from chromosome count alone
constraint variant_reference: variant coordinates require reference assembly version
constraint evidence: inferred gene functions must be marked as inferred rather than experimentally demonstrated
# 06 — GENOMIC OPERATIONS
operation sequence_genome(genome: Genome, sample: BiologicalSample) -> List[Sequence]
precondition: sample identity and sequencing provenance are recorded
output: raw or processed sequence observations with quality metadata
operation assemble_genome(sequences: List[Sequence], algorithm: String) -> GenomeAssembly
output: contigs, assembly statistics, algorithm version, parameter record
warning: reconstruction may be fragmented or misassembled
operation annotate_genome(assembly: GenomeAssembly, evidence: List[Evidence]) -> List[Annotation]
output: typed features and evidence-linked predictions
operation compare_genomes(a: GenomeAssembly, b: GenomeAssembly) -> Comparison
precondition: compatible reference conventions and versioned inputs
output: aligned regions, structural differences, sequence variation, uncertainty
operation infer_phylogeny(assemblies: List[GenomeAssembly], method: String) -> PhylogeneticHypothesis
output: hypothesis with support metrics and provenance
warning: genome similarity alone does not establish direct ancestry
# 07 — FLOW EXECUTION
flow.input:
genome_candidate: Genome?
assembly_candidate: GenomeAssembly?
reference: ReferenceGenome?
evidence: List[Evidence]
flow.pipeline:
- normalise_identifiers
- validate_entity_types
- resolve_genome_scope
- validate_sequence_coordinates
- classify_genome
- link_genes_replicons_and_variants
- attach_evidence_and_provenance
- assess_confidence
- resolve_semantic_equivalence
- detect_contradictions
- emit_graph_and_ai_consumption
flow.output:
entity_graph: TypedKnowledgeGraph
classifications: List[String]
unresolved_conflicts: List[String]
confidence: Confidence
flow_hash: String
# 08 — RECURSIVE REASONING
recursive_rule COMPONENT_MEMBERSHIP:
base: directly asserted component membership with evidence
step: traverse has_chromosome, has_replicon, and located_on edges
guard: only permitted containment relations; track visited identifiers
stop: no new supported entities or max_depth reached
output: transitive membership with derivation paths
recursive_rule ANNOTATION_PROPAGATION:
base: evidence-supported annotations on identified sequences
step: propagate only along approved, typed correspondence edges
guard: prohibit transfer based solely on name similarity
stop: evidence insufficient, conflict detected, or convergence reached
output: proposed annotations labelled as inferred
# 09 — CONFIDENCE
CONFIDENCE:
scale: [0.0, 1.0]
factors: [sequence_quality, assembly_contiguity, completeness, annotation_evidence, reference_compatibility, sample_provenance]
rule: "Do not equate assembly continuity with biological correctness."
aggregation: "Calibrate confidence by task; do not assume independent evidence without justification."
output: {score: Float, rationale: String, evidence_ids: List[URI], uncertainty: String}
# 10 — SEMANTIC EQUIVALENCE
SEMANTIC_EQUIVALENCE:
exact_identity: "Same persistent identifier and version, or independently validated identity."
equivalent_representation: "Different formats may encode the same reference sequence when checksums and coordinate semantics agree."
non_equivalence:
- "Genome != genome assembly"
- "Reference genome != every individual genome of a species"
- "Gene != allele"
- "Genome != transcriptome"
- "Nuclear genome != complete cellular genetic complement"
preserve: [assembly_version, reference_accession, organism_scope, coordinate_convention]
# 11 — FLOW HASH
FLOW_HASH:
canonicalisation: "Stable UTF-8 serialisation with sorted keys, normalised identifiers, explicit null handling and versioned schema."
algorithm: SHA-256
inputs: [ontology.id, ontology.version, entity_types, relationship_types, rules, constraints, evidence_references]
exclude: [volatile_execution_timestamp]
purpose: "Detect changes in the formal flow definition; not proof of biological truth."
# 12 — UPDATE MODEL
UPDATE_MODEL:
triggers: [new_assembly_release, corrected_annotation, new_variant_evidence, taxonomic_revision, changed_reference_coordinates]
steps:
- capture_previous_version
- ingest_new_evidence
- validate_schema_and_coordinate_compatibility
- compare_entity_and_relationship_changes
- re-evaluate_affected_inferences
- regenerate_confidence_and_flow_hash
- publish_versioned_change_log
preserve: [provenance, deprecated_identifiers, reproducible_reference_versions]
conflict_policy: "Retain competing claims with evidence and confidence until resolved."
# 13 — AI CONSUMPTION
AI_CONSUMPTION:
formats: [typed_graph, JSON-LD, RDF, human_readable_text]
required_fields: [ontology_id, entity_id, entity_type, relationships, source, provenance, confidence, version]
reasoning_modes: [classification, graph_traversal, evidence_based_inference, comparative_genomics, contradiction_detection]
safeguards:
- distinguish observed sequences from inferred annotations
- do_not_invent_missing_genomic_features
- expose_reference_and_assembly_versions
- preserve_uncertainty_and_conflicting_evidence
- prevent_cross_species_identity_assumptions
expected_output: "Traceable, versioned and evidence-linked genome knowledge."
# 14 — EXAMPLE INSTANCE (ILLUSTRATIVE, NOT A REAL DATASET)
example:
genome.id: "example:genome-001"
genome.genome_type: nuclear
genome.molecule_type: DNA
genome.completeness: draft
genome.belongs_to_taxon: "example:taxon-001"
genome.represented_by: "example:assembly-v1"
assembly.version: "1"
annotation.status: inferred
confidence.score: 0.75
confidence.rationale: "Illustrative score only; not experimentally calibrated."
# 15 — END
flow.status: "domain-grounded formal draft"
flow.validation: "Requires comparison with the published chapter and implementation-specific syntax checking."
end flow
Download Code
Copy to Clipboard