FLOW ALGEBRA
TITLE: Regulatory Sequence Ontology
VERSION: 1.0
DOMAIN: Biological Entities / Genetic Entities
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/genetic-entities/regulatory-sequence-ontology.html
AUTHORS: Mark Higgins — Sky (Recursive AI)
STATUS: Domain-grounded formalisation; source page not independently verified
DATE: 2026-10-15
# 1. PURPOSE
flow "RegulatorySequenceOntology" v1.0
purpose: Represent genomic regulatory sequences, their molecular interactions, context-dependent effects on gene expression, and evidence-backed inference.
# 2. TYPES
type RegulatorySequence <: GenomicSequence
type Promoter <: RegulatorySequence
type Enhancer <: RegulatorySequence
type Silencer <: RegulatorySequence
type Insulator <: RegulatorySequence
type Operator <: RegulatorySequence
type ResponseElement <: RegulatorySequence
type Terminator <: RegulatorySequence
type UTRRegulatoryElement <: RegulatorySequence
type SpliceRegulatoryElement <: RegulatorySequence
type Gene <: GeneticEntity
type Transcript <: RNAEntity
type TranscriptionFactor <: Protein
type RNA_Polymerase <: ProteinComplex
type ChromatinState <: EpigeneticState
type CellContext <: BiologicalContext
type Evidence <: ProvenanceRecord
type GenomicInterval = {assembly:str, chromosome:str, start:int, end:int, strand:enum(+,-,unknown)}
type Effect = enum(activation,repression,insulation,termination,splicing,context_dependent,unknown)
type Confidence = real[0,1]
# 3. ENTITY SCHEMA
entity RegulatorySequence {
id: URI
label: str
subtype: RegulatorySequenceType
location: GenomicInterval?
sequence: str?
species_taxon: str
target_genes: set<Gene>
cell_contexts: set<CellContext>
molecular_partners: set<Protein>
observed_effect: Effect
evidence: set<Evidence>
confidence: Confidence
version: str
}
# 4. CORE RELATIONSHIPS
relation is_a(RegulatorySequence, GenomicSequence)
relation located_at(RegulatorySequence, GenomicInterval)
relation regulates(RegulatorySequence, Gene, CellContext)
relation binds(Protein, RegulatorySequence, CellContext)
relation recruits(RegulatorySequence, RNA_Polymerase, CellContext)
relation affects_transcription(RegulatorySequence, Gene, Effect, CellContext)
relation affects_splicing(SpliceRegulatoryElement, Transcript, CellContext)
relation supported_by(Assertion, Evidence)
relation overlaps(RegulatorySequence, GenomicInterval)
relation interacts_with(RegulatorySequence, RegulatorySequence, CellContext)
relation conserved_in(RegulatorySequence, Taxon)
relation has_chromatin_state(RegulatorySequence, ChromatinState, CellContext)
# 5. CLASSIFICATION
class Promoter: typically associated with transcription initiation near a transcription start site.
class Enhancer: can increase target-gene transcription, potentially over long genomic distances.
class Silencer: can decrease transcription in a specific cellular context.
class Insulator: may influence enhancer-promoter communication or chromatin boundaries.
class Operator: DNA site recognised by regulatory proteins, particularly in prokaryotic operons.
class ResponseElement: binding site involved in a signal-dependent regulatory response.
class Terminator: sequence contributing to transcription termination.
class UTRRegulatoryElement: transcript-associated element affecting stability, localisation or translation.
class SpliceRegulatoryElement: sequence affecting splice-site selection or RNA processing.
# 6. VALIDATION INVARIANTS
rule valid_interval(i): i.start >= 0 AND i.end > i.start
rule valid_DNA(s): every_symbol(s) in {A,C,G,T,N} # N denotes unresolved base
rule valid_confidence(c): 0 <= c <= 1
rule coordinate_system: all intervals specify reference assembly and chromosome.
rule strand_semantics: unknown strand does not imply positive strand.
rule association_not_causation: proximity or binding alone does not prove functional regulation.
rule context_specificity: regulatory effects must retain tissue, cell state and assay context when known.
rule uncertainty: absent evidence is not evidence of no regulation.
# 7. TRANSCRIPTIONAL REGULATION
flow transcription_regulation(sequence, target, context):
require valid_regulatory_sequence(sequence)
retrieve binding_evidence(sequence, context)
retrieve chromatin_evidence(sequence, context)
retrieve perturbation_evidence(sequence, target, context)
infer candidate_effect with evidence_weighting
return {target, context, effect, confidence, provenance}
# 8. ENHANCER-TARGET INFERENCE
flow enhancer_target(enhancer, gene, context):
features = {distance, chromatin_contact, accessibility, histone_marks,
expression_covariation, perturbation_results}
exclude unsupported certainty from distance alone
score = calibrated_model(features, context)
return candidate_relation(enhancer, gene, score, provenance)
# 9. PROMOTER AND INITIATION
flow promoter_initiation(promoter, gene, context):
identify transcription_start_site(gene, context)
evaluate transcription_factor_occupancy(promoter, context)
evaluate polymerase_recruitment(promoter, context)
return initiation_hypothesis with confidence and evidence
# 10. REPRESSION AND INSULATION
flow repression(sequence, target, context):
detect repressor_binding and chromatin_effects
assess measured expression change after perturbation
distinguish direct repression from indirect effects
return context_bound_effect
flow insulation(boundary, enhancer, promoter, context):
evaluate chromatin_architecture and boundary occupancy
test altered enhancer_promoter_interaction
return insulation_hypothesis with uncertainty
# 11. SEQUENCE VARIATION
flow variant_impact(variant, sequence, context):
require overlaps(variant, sequence.location)
compare reference_and_alternate_motifs
assess allele_specific_binding where available
assess expression_or_splicing_evidence
return predicted_effect, confidence, provenance
# 12. REGULATORY NETWORK
flow build_regulatory_network(genes, sequences, context):
nodes = genes UNION sequences UNION interacting_proteins
edges = supported_regulatory_relationships(context)
annotate edges with effect, confidence, evidence, version
return typed_contextual_graph(nodes, edges)
# 13. RECURSIVE REASONING
flow recursive_regulatory_inference(seed, context, max_depth=4):
frontier = {seed}
visited = {}
for depth in range(0,max_depth):
candidates = expand_supported_relationships(frontier, context)
candidates = remove_cycles_and_duplicates(candidates, visited)
candidates = propagate_uncertainty_without_false_independence(candidates)
visited = visited UNION candidates
frontier = candidates
if empty(frontier): break
return ranked_graph(visited)
# 14. CONFIDENCE
CONFIDENCE:
range: [0,1]
inputs: assay_quality, biological_replication, context_match,
independent_validation, perturbation_support, model_calibration
policy: preserve source-level uncertainty; do not multiply correlated evidence as independent.
example: motif_match_only -> candidate_binding_site, not confirmed_target_regulation
# 15. SEMANTIC EQUIVALENCE
SEMANTIC_EQUIVALENCE:
promoter ≈ transcription_initiation_regulatory_region [context-dependent]
enhancer ≈ distal_positive_regulatory_element [not universal]
cis_regulatory_element ≈ locally encoded regulatory sequence [ontology-specific]
rule: same genomic coordinates do not guarantee same functional role.
rule: synonyms require taxon, molecular context and definition alignment.
rule: regulatory_sequence != regulatory_protein.
# 16. PROVENANCE
provenance.require:
- source_database_or_publication
- assay_method
- reference_genome_assembly
- genomic_coordinates
- taxon
- cell_or_tissue_context
- date_accessed
- analysis_pipeline_version
- confidence_method
# 17. FLOW HASH
FLOW_HASH:
algorithm: SHA-256
canonicalise: UTF-8, stable key order, normalised whitespace, explicit nulls
input: ontology_version + entity_types + relations + rules + source_identifiers
output: lowercase_hex_digest
note: digest calculated by implementation; no fabricated hash value.
# 18. UPDATE MODEL
UPDATE_MODEL:
triggers: new_reference_assembly, new_assay, revised_gene_annotation,
corrected_variant, new_functional_evidence, ontology_revision
steps:
- preserve previous_version
- validate incoming evidence and coordinate conventions
- resolve identifiers and lift-over only with explicit provenance
- recalculate context-specific regulatory relationships
- update confidence and semantic mappings
- regenerate FLOW_HASH
- publish change_log and rollback_reference
# 19. AI CONSUMPTION
AI_CONSUMPTION:
representation: typed knowledge graph + human-readable flow
retrieval_keys: sequence_id, genomic_interval, gene_id, taxon, cell_context
outputs: classified_entity, candidate_targets, effects, confidence, evidence
safeguards:
- distinguish observed interactions from inferred regulation
- disclose unsupported or low-confidence associations
- do not extrapolate across organisms or cell types without qualification
- retain provenance and reference assembly
- never treat model predictions as experimentally validated facts
# 20. EXAMPLE
example:
input: {entity_type: Enhancer, target_gene: GENE_X, cell_context: CELL_A}
observation: {accessible_chromatin: true, perturbation_reduces_expression: true}
inference: {relation: activates_transcription, status: supported_hypothesis}
confidence: requires_calibration
provenance: illustrative_only_not_real_experiment
# 21. CROSS-ONTOLOGY LINKS
links:
- Gene Ontology
- Genome Ontology
- DNA Ontology
- RNA Ontology
- Genetic Marker Ontology
- Chromosome Ontology
- Transcription Factor Ontology
- Epigenetics Ontology
- Sequence Variant Ontology
# 22. LIMITATIONS
This is a research ontology formalisation, not a claim of universal mechanisms.
Regulatory elements may overlap, have multiple functions, or act differently by context.
Genome assembly changes can alter coordinates; functional annotations may be provisional.
END FLOW ALGEBRA
Download Code
Copy to Clipboard