Skip to main content

Locus Ontology

Genetic Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 15 October 2026
Audio Overview
FLOW ALGEBRA
Locus Ontology — Genetic Entities
Kireth Semantic Library | Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/genetic-entities/locus-ontology.html
Version: 1.0 | Locale: en-GB | Status: domain-grounded formal specification

flow "LocusOntology" v1.0 {
  DOMAIN: BiologicalEntity > GeneticEntity > GenomicLocus
  PURPOSE: Represent genomic positions, intervals, features and their evidence with assembly-aware coordinates.

  TYPES {
    Entity: {id: URI, label: String, type: URI}
    GenomeAssembly: Entity & {accession: String, version: String, taxon: URI}
    ReferenceSequence: Entity & {assembly: GenomeAssembly, accession: String, length_bp: Integer, topology: Linear|Circular}
    Locus: Entity & {reference: ReferenceSequence, start: Integer, end: Integer, strand: Plus|Minus|Unknown|NotApplicable, coordinate_system: ZeroBasedHalfOpen, evidence: EvidenceSet}
    GeneLocus: Locus & {gene: Gene?}
    VariantLocus: Locus & {variant: SequenceVariant?}
    RegulatoryLocus: Locus & {regulatory_feature: RegulatoryFeature?}
    MarkerLocus: Locus & {marker: GeneticMarker?}
    CytogeneticLocus: Entity & {chromosome: String, band: String, assembly: GenomeAssembly?}
    Gene: Entity
    Allele: Entity
    SequenceVariant: Entity & {reference_allele: String?, alternate_allele: String?}
    RegulatoryFeature: Entity
    GeneticMarker: Entity
    Evidence: {source: URI, method: String, date: Date?, confidence: Float, assembly: URI?}
    EvidenceSet: Set<Evidence>
    Mapping: {source_locus: Locus, target_locus: Locus, method: String, quality: Float, provenance: URI}
  }

  COORDINATE_CONVENTION {
    internal: ZeroBasedHalfOpen
    valid_interval: 0 <= start < end <= reference.length_bp
    length_bp(locus): locus.end - locus.start
    one_based_closed_to_internal(start1, end1): [start1 - 1, end1)
    internal_to_one_based_closed(start0, end0): [start0 + 1, end0]
    point_position_one_based(p): [p - 1, p)
    circular_origin_spanning: RepresentAsTwoSegmentsOrExplicitCircularInterval
    insertion_site: RepresentAsInterbasePositionWithSeparateType
  }

  RELATIONSHIPS {
    located_on(Locus, ReferenceSequence)
    belongs_to_assembly(ReferenceSequence, GenomeAssembly)
    locus_of(GeneLocus, Gene)
    variant_at(SequenceVariant, VariantLocus)
    marker_at(GeneticMarker, MarkerLocus)
    regulates(RegulatoryFeature, Gene)
    overlaps(Locus, Locus)
    contains(Locus, Locus)
    adjacent_to(Locus, Locus)
    maps_to(Locus, Locus, Mapping)
    supported_by(Locus, Evidence)
    has_allele_at(Allele, Locus)
  }

  RULES {
    R01: located_on(L, R) => L.reference = R
    R02: located_on(L, R) AND belongs_to_assembly(R, A) => assembly_of(L) = A
    R03: same_reference(A, B) AND A.start < B.end AND B.start < A.end => overlaps(A, B)
    R04: same_reference(A, B) AND A.start <= B.start AND A.end >= B.end => contains(A, B)
    R05: same_reference(A, B) AND (A.end = B.start OR B.end = A.start) => adjacent_to(A, B)
    R06: locus_of(L, G) => type(L) = GeneLocus
    R07: variant_at(V, L) => type(L) = VariantLocus
    R08: has_allele_at(A, L) => AlleleIsAssociatedWithLocus(A, L)
    R09: assembly_of(A) != assembly_of(B) => NOT_DIRECTLY_COMPARABLE(A, B)
    R10: maps_to(A, B, M) => M.source_locus = A AND M.target_locus = B
    R11: overlaps(A, B) DOES_NOT_IMPLY same_gene(A, B)
    R12: located_on(A, R) AND located_on(B, R) DOES_NOT_IMPLY functionally_related(A, B)
    R13: cytogenetic_band(C) => approximate_location(C) UNLESS sequence_mapping_verified(C)
    R14: gene_symbol_match(G1, G2) DOES_NOT_IMPLY locus_identity(G1, G2)
  }

  INFERENCE {
    validate_reference(L): reference_exists(L.reference) AND accession_version_known(L.reference)
    validate_bounds(L): 0 <= L.start AND L.start < L.end AND L.end <= L.reference.length_bp
    validate_strand(L): L.strand IN {Plus, Minus, Unknown, NotApplicable}
    infer_overlap(A, B): IF same_reference(A, B) THEN max(A.start, B.start) < min(A.end, B.end) ELSE Unknown
    infer_distance(A, B): IF same_reference(A, B) THEN max(0, max(A.start, B.start) - min(A.end, B.end)) ELSE Undefined
    infer_identity(A, B): same_reference(A, B) AND A.start = B.start AND A.end = B.end AND A.strand = B.strand
    liftover(L, target_assembly): MappingResult|Ambiguous|Unmapped
    resolve_multimapping: RetainAllCandidatesWithQualityAndProvenance
    interpret_regulatory_link: RequireFunctionalEvidenceBeyondProximity
  }

  CLASSIFICATION {
    by_feature: {Gene, Exon, Intron, Promoter, Enhancer, Variant, Marker, Intergenic, Other}
    by_reference: {Nuclear, Mitochondrial, Plastid, Plasmid, Viral, Other}
    by_coordinate_precision: {BaseResolved, IntervalResolved, Cytogenetic, Approximate, Unknown}
    by_evidence: {ExperimentallyValidated, Curated, ComputationallyPredicted, Unverified}
  }

  CONFIDENCE {
    range: [0.0, 1.0]
    evidence_weight: source_reliability * method_quality * assembly_match * mapping_quality
    aggregate: CalibratedEvidenceCombinationWithDependencyCorrection
    missing_evidence: UnknownNotZero
    ambiguous_mapping: PreserveAlternativesAndReduceCertainty
    conflicts: FlagForReview
    interpretation: ConfidenceIsEvidenceAssessmentNotBiologicalTruth
  }

  SEMANTIC_EQUIVALENCE {
    canonical_term: GenomicLocus
    contextual_aliases: {"genetic locus", "genomic location", "chromosomal location"}
    exact_equivalence: RequireSameReferenceAccessionVersionAndCoordinateConventionAndIntervalAndStrand
    cross_assembly_equivalence: RequireValidatedMappingAndPreserveUncertainty
    non_equivalence: {"locus" != "gene", "locus" != "allele", "locus" != "chromosome"}
    note: IdenticalCoordinatesCanReferToDifferentOverlappingFeatures
  }

  RECURSIVE_REASONING {
    input: Locus|Gene|Variant|Marker|CoordinateQuery
    step_1: NormaliseIdentifiersAndCoordinateSystems
    step_2: ResolveGenomeAssemblyAndReferenceSequence
    step_3: ValidateBoundsAndStrand
    step_4: RetrieveRelatedFeaturesAndEvidence
    step_5: EvaluateOverlapContainmentAndMappings
    step_6: ClassifyEvidenceAndConflicts
    step_7: PropagateOnlySoundTypedRelationships
    step_8: RecurseOnNewRelatedEntitiesUntilFixedPointOrDepthLimit
    termination: NoNewValidatedRelations OR depth >= configured_max_depth
    safeguards: CycleDetection, ProvenanceRetention, NoUnjustifiedIdentityInference
  }

  FLOW_HASH {
    algorithm: SHA-256
    canonicalisation: UTF-8 + StableFieldOrder + NormalisedIdentifiers + ExplicitAssemblyVersions
    inputs: {ontology_version, entity_ids, coordinates, relationship_assertions, evidence_ids, rule_versions}
    output: DeterministicDigest
    purpose: IntegrityAndChangeDetectionNotScientificValidation
  }

  UPDATE_MODEL {
    triggers: {NewAssembly, ReferenceRevision, GeneAnnotationUpdate, VariantReclassification, NewEvidence, MappingRevision}
    steps: [ValidateSource, VersionIncomingData, RecomputeAffectedMappings, ReevaluateDependentRelations, UpdateConfidence, RecalculateFlowHash, PreserveAuditHistory]
    policy: NeverSilentlyReplaceCoordinatesAcrossAssemblies
    provenance: PreservePriorAssertionsAndSupersessionLinks
  }

  AI_CONSUMPTION {
    format: TypedEntityRelationshipGraph
    required_context: {taxon, assembly_accession, assembly_version, reference_accession, coordinate_convention}
    output: {normalised_locus, feature_type, related_entities, inferred_relations, evidence, confidence, conflicts, flow_hash}
    behaviour: DistinguishObservedFromInferred; ReturnUnknownWhenUnresolved
    validation: SchemaChecks + CoordinateChecks + ProvenanceChecks + RuleConsistency
    intended_uses: {GenomicSearch, VariantAnnotation, ComparativeGenomics, KnowledgeGraphReasoning, ResearchEducation}
  }
}

NOTES
- The source page's visible public text identifies the Locus Ontology but does not expose its embedded specification; this is an independently composed domain-grounded Flow Algebra.
- Coordinate comparisons are meaningful only when reference accession/version and coordinate conventions are aligned.
- This specification is a declarative reasoning model, not a claim that a dedicated Flow Algebra runtime has executed it.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ