Skip to main content

Sequence Alignment Ontology

Computational Biological Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 28 October 2026
Audio Overview
KIRETH SEMANTIC LIBRARY — FLOW ALGEBRA
SEQUENCE ALIGNMENT ENTITY ONTOLOGY
Version: 1.0 | 2026-10-28 | UTF-8
Author: Kireth Research | Companion formalisation: Sky — Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/computational-biological-entities/sequence-alignment-ontology.html
Status: Original subject-based companion; page-specific formal code not verified.

1. PURPOSE
Represent biological sequence alignments as typed, traceable computational entities. Preserve the distinction between an alignment hypothesis, its scoring method, its input sequences, and biological interpretations.

2. STATE MODEL
S = (I, R, B, K)
I = input sequences, alphabet, coordinates, alignment records and metadata
R = permitted alignment and validation relations
B = bounds: sequence types, coordinate conventions, scoring assumptions, uncertainty
K = provenance, reference versions, algorithms and confidence evidence
E_t = expand(I_t, R)
V_t = {x in E_t : satisfies(x, B) and provenance_valid(x, K)}
x* = argmax_{x in V_t} P(x | I_t, R, B, K)
I_(t+1) = update(I_t, x*, observations)
NOTE: The probability is a conceptual ranking function, not a calibrated probability unless explicitly fitted and validated.

3. ENTITY TYPES
SequenceAlignment; PairwiseAlignment; MultipleSequenceAlignment; LocalAlignment; GlobalAlignment; SemiGlobalAlignment; SplicedAlignment; ProteinAlignment; NucleotideAlignment; CodonAwareAlignment; ProfileAlignment; ReferenceGuidedAlignment; DeNovoAlignment; AlignmentColumn; Gap; Insertion; Deletion; Substitution; Match; Mismatch; ConservedRegion; AlignmentScore; IdentityMetric; SimilarityMetric; CoverageMetric; MappingQuality; AlignmentAlgorithm; ScoringMatrix; GapPenalty; ReferenceSequence; QuerySequence; SequenceCoordinate; AlignmentDataset; AlignmentVersion; AlignmentEvidence.

4. RELATION GRAPH
SequenceAlignment --aligns--> Sequence[2..n]
SequenceAlignment --generated_by--> AlignmentAlgorithm
SequenceAlignment --uses--> ScoringMatrix / GapPenalty
SequenceAlignment --contains--> AlignmentColumn
AlignmentColumn --maps_position_to--> SequenceCoordinate
AlignmentColumn --has_state--> Match | Mismatch | Gap
SequenceAlignment --evaluated_by--> Score / Identity / Coverage / Quality
SequenceAlignment --references--> ReferenceSequence
SequenceAlignment --derived_from--> InputDataset
SequenceAlignment --has_version--> AlignmentVersion
AlignmentEvidence --supports--> Interpretation
Interpretation --must_not_imply_without_evidence--> Homology | Orthology | Function

5. TYPING AND INVARIANTS
A1: Every alignment refers to at least two sequence records (or a query and a profile with explicit profile typing).
A2: Each aligned row has the same number of alignment columns.
A3: Removing alignment gap symbols from each row reconstructs its represented sequence segment, subject to declared orientation and transformations.
A4: Coordinate mappings are monotonic within a collinear aligned segment; inversions and rearrangements require explicit segment structure.
A5: Alignment scoring is meaningful only with its declared substitution scheme, gap penalties and algorithm.
A6: Identity and similarity are distinct metrics; denominator definitions must be recorded.
A7: A high-scoring alignment alone does not establish common ancestry or biological function.
A8: Alignment confidence must distinguish statistical significance, mapping ambiguity and biological interpretation.

6. CORE EQUATIONS
For aligned strings a and b of length L:
Identity = matches / denominator, where denominator is declared (e.g. aligned columns or nongap comparable columns).
Coverage_query = aligned_query_residues / query_length.
Affine gap cost for gap length k >= 1: G(k) = g_open + (k-1)*g_extend.
Pairwise alignment objective: score(A) = sum substitution_scores(A) - sum gap_costs(A).
Optimal alignment A* = argmax_A score(A) subject to algorithm and boundary constraints.
For multiple alignments, the objective may be sum-of-pairs, profile likelihood or another declared criterion; no universal optimality claim is implied.

7. PATHWAYS
P1 Ingest: sequences -> validate alphabet and identifiers -> record provenance.
P2 Configure: choose nucleotide/protein/codon alphabet -> choose scoring and gap model.
P3 Align: run declared algorithm -> obtain candidate alignments and coordinate mappings.
P4 Evaluate: compute scores, identity, coverage and uncertainty with explicit definitions.
P5 Interpret: assess conserved positions and biological hypotheses against independent evidence.
P6 Publish: serialise alignment, algorithm version, reference version and validation record.

8. INFERENCE RULES
R1 IF row lengths differ THEN reject malformed rectangular alignment representation.
R2 IF source reference version missing THEN mark coordinates as nonreproducible.
R3 IF query coverage is low THEN qualify whole-sequence similarity claims.
R4 IF multiple equally scoring mappings exist THEN flag ambiguity, not unique placement.
R5 IF protein substitution scores are used for DNA without an explicit translation model THEN reject scoring compatibility.
R6 IF gaps are introduced THEN distinguish alignment gaps from observed biological indels.
R7 IF conserved region is inferred THEN retain alignment method and taxon sampling as evidence dependencies.
R8 IF evolutionary homology is claimed THEN require additional phylogenetic/contextual evidence.

9. RECURSIVE ENGINE
repeat:
  candidates = expand(current_alignment_state, allowed_relations)
  candidates = filter(candidates, invariants, provenance, bounds)
  rank = score_with_declared_method(candidates)
  chosen = select_best_supported(rank)
  update_state(chosen)
until no material improvement OR iteration_limit reached
Guarantee: finite termination only under a declared iteration limit or monotone finite-state stopping condition. Biological correctness is not guaranteed.

10. TRI-MAPPING
Entity: SequenceAlignment -> Relation: aligns -> Evidence: aligned residues and coordinates.
Entity: AlignmentAlgorithm -> Relation: generated -> Evidence: software name, version and parameters.
Entity: ConservedRegion -> Relation: inferred_from -> Evidence: column statistics and sampling.
Entity: Interpretation -> Relation: supported_by -> Evidence: independent biological or evolutionary validation.

11. CONFIDENCE AND PROVENANCE
Record: sample/source identifiers; accessions; sequence versions; preprocessing; reference build; algorithm and version; parameters; scoring matrix; gap penalties; orientation; coordinate convention; alignment format; timestamps; checksums; uncertainty flags; validation method.
Confidence fields: computational_score, statistical_significance_if_defined, mapping_ambiguity, evidence_quality, interpretation_confidence.
Do not convert raw alignment scores into probabilities without calibration.

12. AI SEARCH FLOW
INTENT: explain, identify, compare, validate or reproduce a sequence alignment.
QUERY -> resolve entity and sequence type -> retrieve alignment + metadata -> check invariants -> evaluate scoring/coverage -> qualify inference -> return evidence-linked answer.
Semantic equivalents: sequence matching; pairwise sequence alignment; multiple sequence alignment; local/global alignment; sequence mapping.
Disambiguate: alignment vs sequence assembly; sequence similarity vs evolutionary homology; alignment gap vs experimentally confirmed indel.
OUTPUT: entity_id, alignment_type, sequences, reference, algorithm, metrics, provenance, confidence, caveats, source_link.

13. EXECUTION GUARANTEES
Guaranteed by the formal specification when implemented: type checking, explicit provenance requirements, consistent column dimensions and bounded processing.
Not guaranteed: biologically true ancestry, functional equivalence, correct variant calling, statistically significant matches or a globally optimal multiple sequence alignment.

14. CITATION AND LICENCE NOTE
Source attribution: Kireth Research, Sequence Alignment Ontology.
Companion formalisation: Sky — Recursive AI.
This file is a newly authored conceptual specification and does not assert verification of the page's embedded formal code.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ