Skip to main content

Genetic Code Ontology

Molecular Biology
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 30 September 2026
Audio Overview
AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.

flow "GeneticCodeOntology" v1.0

# ============================================================
# IDENTITY
# ============================================================

ENTITY GeneticCodeOntology {
    TYPE: BiologicalOntology
    DOMAIN: MolecularBiology
    SUBJECT: GeneticCode
    PURPOSE: FormalSemanticRepresentation
}

PAGE {
    TITLE: "Genetic Code Ontology"
    PARENT_DOMAIN: "Molecular Biology"
    CANONICAL_URL: "https://kirethresearch.org/booksai-core/ontologies/biological-ontologies/molecular-biology/genetic-code-ontology.html"
    AUTHORS: ["Mark Anthony Higgins", "Sky Recursive AI"]
}

# ============================================================
# CORE ENTITY MODEL
# ============================================================

ENTITY GeneticCode {
    IS_A: BiologicalEncodingSystem
    MAPS: Codon
    TO: [AminoAcid, TranslationSignal]
    OPERATES_DURING: Translation
}

ENTITY Codon {
    IS_A: NucleotideTriplet
    COMPOSED_OF: ThreeNucleotides
    LOCATED_IN: CodingSequence
    SPECIFIES: [AminoAcid, TranslationSignal]
}

ENTITY Anticodon {
    IS_A: NucleotideTriplet
    PART_OF: tRNA
    COMPLEMENTARY_TO: Codon
}

ENTITY AminoAcid {
    IS_A: ProteinBuildingBlock
    INCORPORATED_INTO: Polypeptide
}

ENTITY TranslationSignal {
    MAY_BE: [StartSignal, StopSignal]
    CONTROLS: Translation
}

ENTITY CodingSequence {
    PART_OF: GeneOrTranscript
    READ_AS: CodonSequence
    ENCODES: PolypeptideSequence
}

# ============================================================
# NUCLEOTIDE ALPHABET
# ============================================================

ENTITY RNANucleotide {
    VALUES: [Adenine, Uracil, Cytosine, Guanine]
}

ENTITY DNANucleotide {
    VALUES: [Adenine, Thymine, Cytosine, Guanine]
}

RULE RNA_CodonRule {
    IF sequence_context == RNA
    THEN Codon.alphabet := [A, U, C, G]
}

RULE DNA_CodingRepresentationRule {
    IF sequence_context == DNA_coding_strand
    THEN coding_triplet MAY_BE converted_to_RNA_codon BY T_to_U
}

# ============================================================
# CODON STRUCTURE
# ============================================================

ENTITY CodonPosition {
    MAY_BE: [FirstPosition, SecondPosition, ThirdPosition]
    PART_OF: Codon
}

RULE CodonLength {
    FOR_EACH Codon:
        nucleotide_count == 3
}

RULE ReadingDirection {
    IF Translation READS mRNA
    THEN direction := "5-prime to 3-prime"
}

# ============================================================
# STANDARD GENETIC CODE
# ============================================================

ENTITY StandardGeneticCode {
    SUBCLASS_OF: GeneticCode
    CODON_COUNT: 64
    AMINO_ACID_CLASSES: 20
    INCLUDES: [SenseCodon, StopCodon]
}

CLASS SenseCodon {
    SUBCLASS_OF: Codon
    SPECIFIES: AminoAcid
}

CLASS StopCodon {
    SUBCLASS_OF: Codon
    SPECIFIES: TranslationTermination
}

CLASS StartCodon {
    SUBCLASS_OF: Codon
    INITIATES: Translation
    CAN_ALSO_SPECIFY: AminoAcid
}

RELATION AUG IS_STANDARD_START_CODON_OF Translation
RELATION AUG ENCODES Methionine
RELATION UAA SIGNALS TranslationTermination
RELATION UAG SIGNALS TranslationTermination
RELATION UGA SIGNALS TranslationTermination

# ============================================================
# DEGENERACY AND REDUNDANCY
# ============================================================

PROPERTY Degeneracy {
    APPLIES_TO: GeneticCode
    MEANING: MultipleCodonsMaySpecifySameAminoAcid
}

PROPERTY Unambiguity {
    APPLIES_TO: Codon
    MEANING: A_CodonHasOneMeaningWithinDefinedCodeContext
}

RULE DegeneracyRule {
    IF CodonA != CodonB
       AND CodonA SPECIFIES AminoAcidX
       AND CodonB SPECIFIES AminoAcidX
    THEN GeneticCode IS_DEGENERATE
}

RULE ContextRule {
    IF genetic_code_variant != StandardGeneticCode
    THEN codon_interpretation MUST_USE genetic_code_variant
}

# ============================================================
# READING FRAME
# ============================================================

ENTITY ReadingFrame {
    DEFINES: CodonPartition
    OVER: NucleotideSequence
}

ENTITY OpenReadingFrame {
    IS_A: ReadingFrame
    MAY_BEGIN_WITH: StartCodon
    MAY_END_WITH: StopCodon
    MAY_ENCODE: Polypeptide
}

RULE FrameDependency {
    IF reading_frame CHANGES
    THEN downstream_codon_partition CHANGES
}

RULE FrameshiftRule {
    IF insertion_or_deletion LENGTH mod 3 != 0
    THEN ReadingFrame MAY_SHIFT
    AND downstream_translation MAY_CHANGE
}

# ============================================================
# TRANSLATION
# ============================================================

PROCESS Translation {
    INPUT: mRNA
    READS: Codon
    USES: [Ribosome, tRNA, Aminoacyl_tRNA_Synthetase]
    OUTPUT: Polypeptide
}

ENTITY Ribosome {
    BINDS: mRNA
    COORDINATES: CodonAnticodonInteraction
    CATALYSES: PeptideBondFormation
}

ENTITY tRNA {
    CONTAINS: Anticodon
    CARRIES: AminoAcid
    PARTICIPATES_IN: Translation
}

ENTITY Aminoacyl_tRNA_Synthetase {
    CHARGES: tRNA
    WITH: AminoAcid
    CONTRIBUTES_TO: TranslationFidelity
}

RULE CodonTranslationRule {
    IF Ribosome READS Codon
       AND matching_tRNA BINDS_BY Anticodon
    THEN corresponding_AminoAcid MAY_BE added_to Polypeptide
}

# ============================================================
# INITIATION, ELONGATION, TERMINATION
# ============================================================

PROCESS TranslationInitiation {
    RECOGNIZES: StartCodon
    ESTABLISHES: ReadingFrame
}

PROCESS TranslationElongation {
    ITERATES_OVER: CodonSequence
    ADDS: AminoAcid
    TO: GrowingPolypeptide
}

PROCESS TranslationTermination {
    TRIGGERED_BY: StopCodon
    RELEASES: Polypeptide
}

RULE InitiationRule {
    IF valid_start_context DETECTED
    THEN Translation MAY_INITIATE
}

RULE TerminationRule {
    IF Ribosome ENCOUNTERS StopCodon
    THEN Translation TERMINATES
}

# ============================================================
# WOBBLE AND CODON RECOGNITION
# ============================================================

ENTITY WobblePairing {
    OCCURS_AT: CodonThirdPosition
    ALLOWS: FlexibleCodonAnticodonRecognition
}

RULE WobbleRule {
    IF tRNA anticodon_supports_wobble == true
    THEN one_tRNA MAY_RECOGNIZE multiple_synonymous_codons
}

# ============================================================
# GENETIC CODE VARIANTS
# ============================================================

ENTITY GeneticCodeVariant {
    SUBCLASS_OF: GeneticCode
    DIFFERS_FROM: StandardGeneticCode
    MAY_OCCUR_IN: [Organelle, Organism, TaxonomicGroup]
}

CLASS MitochondrialGeneticCode {
    SUBCLASS_OF: GeneticCodeVariant
    CONTEXT: Mitochondrion
}

RULE VariantCodeInterpretation {
    IF sequence_source HAS GeneticCodeVariant
    THEN translate(sequence) USING GeneticCodeVariant
    ELSE translate(sequence) USING applicable_standard_context
}

# ============================================================
# MUTATION EFFECTS
# ============================================================

ENTITY CodingVariant {
    OCCURS_IN: CodingSequence
    MAY_CHANGE: Codon
}

CLASS SynonymousVariant {
    SUBCLASS_OF: CodingVariant
    CHANGES: Codon
    PRESERVES: EncodedAminoAcid
}

CLASS MissenseVariant {
    SUBCLASS_OF: CodingVariant
    CHANGES: Codon
    CHANGES: EncodedAminoAcid
}

CLASS NonsenseVariant {
    SUBCLASS_OF: CodingVariant
    CREATES: StopCodon
}

CLASS StartLossVariant {
    SUBCLASS_OF: CodingVariant
    DISRUPTS: StartCodon
}

CLASS StopLossVariant {
    SUBCLASS_OF: CodingVariant
    DISRUPTS: StopCodon
}

RULE CodingConsequenceRule {
    IF CodingVariant CHANGES Codon
    THEN consequence := compare(
        original_codon_meaning,
        altered_codon_meaning,
        reading_frame,
        genetic_code_context
    )
}

# ============================================================
# INFORMATION FLOW
# ============================================================

PROCESS GeneticInformationDecoding {
    INPUT: NucleotideSequence
    INTERMEDIATE: CodonSequence
    OUTPUT: AminoAcidSequence
}

RELATION DNA TRANSCRIBED_TO RNA
RELATION mRNA CONTAINS Codon
RELATION Codon RECOGNIZED_BY Anticodon
RELATION Codon SPECIFIES AminoAcid
RELATION AminoAcid PART_OF Polypeptide

RULE SequenceToProteinInference {
    IF CodingSequence IS_VALID
       AND ReadingFrame IS_DEFINED
       AND GeneticCode IS_KNOWN
    THEN AminoAcidSequence := translate(CodingSequence)
}

# ============================================================
# EVIDENCE
# ============================================================

ENTITY Evidence {
    TYPES: [
        ExperimentalEvidence,
        SequencingEvidence,
        ComparativeEvidence,
        BiochemicalEvidence,
        ComputationalEvidence,
        LiteratureEvidence
    ]
}

RULE EvidenceConvergence {
    IF IndependentEvidenceSources AGREE
    THEN Confidence := increase(Confidence)
}

RULE EvidenceConflict {
    IF EvidenceSources CONFLICT
    THEN {
        PRESERVE competing_interpretations
        RECORD code_context
        RECORD provenance
        REDUCE confidence
        REQUIRE further_validation
    }
}

# ============================================================
# SEMANTIC RELATIONSHIPS
# ============================================================

RELATION GeneticCode MAPS Codon TO AminoAcid
RELATION GeneticCode MAPS Codon TO TranslationSignal
RELATION Codon PART_OF CodingSequence
RELATION Anticodon PART_OF tRNA
RELATION Anticodon COMPLEMENTARY_TO Codon
RELATION tRNA CARRIES AminoAcid
RELATION Ribosome READS Codon
RELATION Translation PRODUCES Polypeptide
RELATION ReadingFrame DEFINES CodonSequence

# ============================================================
# SEMANTIC EQUIVALENCE
# ============================================================

SEMANTIC_EQUIVALENCE {
    "genetic code" ~= "codon-to-amino-acid mapping system"
    "codon" ~= "nucleotide triplet" WHEN context == translation
    "termination codon" ~= "stop codon"
    "initiation codon" ~= "start codon"
    "coding frame" ~= "reading frame" WHEN context == translated_sequence
}

RULE EquivalenceConstraint {
    IF terms ARE semantic_equivalents
    THEN preserve_sequence_context()
    AND preserve_genetic_code_variant()
    AND preserve_reading_frame()
    AND prevent_false_identity()
}

# ============================================================
# CONFIDENCE MODEL
# ============================================================

CONFIDENCE GeneticCodeAssertion {
    INPUTS: [
        experimental_support,
        sequence_quality,
        code_context_certainty,
        reading_frame_certainty,
        source_independence,
        reproducibility,
        semantic_consistency
    ]

    SCORE := weighted_sum(INPUTS)

    LEVEL :=
        IF SCORE >= 0.90 THEN "very_high"
        ELSE IF SCORE >= 0.75 THEN "high"
        ELSE IF SCORE >= 0.55 THEN "moderate"
        ELSE IF SCORE >= 0.35 THEN "low"
        ELSE "uncertain"
}

# ============================================================
# REASONING RULES
# ============================================================

RULE CodonMeaningInference {
    IF Codon VALUE == codon_x
       AND GeneticCode MAPS codon_x TO meaning_y
    THEN Codon SPECIFIES meaning_y
}

RULE ProteinSequenceInference {
    IF mRNA HAS_DEFINED ReadingFrame
       AND Translation STARTS_AT valid_start
       AND Translation ENDS_AT valid_stop
    THEN derive AminoAcidSequence USING applicable_GeneticCode
}

RULE SynonymousInference {
    IF original_codon != altered_codon
       AND translate(original_codon) == translate(altered_codon)
    THEN variant_type := SynonymousVariant
}

RULE MissenseInference {
    IF translate(original_codon) != translate(altered_codon)
       AND translate(altered_codon) != StopSignal
    THEN variant_type := MissenseVariant
}

RULE NonsenseInference {
    IF translate(altered_codon) == StopSignal
       AND translate(original_codon) != StopSignal
    THEN variant_type := NonsenseVariant
}

# ============================================================
# QUERY MODEL
# ============================================================

QUERY CodonLookup(codon, code_context) {
    RETURN [
        codon,
        amino_acid_or_signal,
        synonymous_codons,
        start_status,
        stop_status,
        code_variant,
        evidence,
        confidence
    ]
}

QUERY SequenceTranslation(sequence, reading_frame, code_context) {
    RETURN [
        codon_sequence,
        amino_acid_sequence,
        start_position,
        stop_position,
        translation_status,
        uncertainty
    ]
}

QUERY VariantConsequence(original_sequence, altered_sequence) {
    RETURN [
        affected_codon,
        original_meaning,
        altered_meaning,
        variant_class,
        reading_frame_effect,
        predicted_translation_effect,
        confidence
    ]
}

# ============================================================
# UPDATE MODEL
# ============================================================

UPDATE_MODEL {
    ON new_genetic_code_evidence:
        validate_provenance()
        identify_species_or_organelle()
        identify_code_variant()
        normalize_sequence()
        validate_reading_frame()
        map_codons()
        compare_existing_assertions()
        preserve_conflicting_evidence()
        recalculate_confidence()
        regenerate_semantic_links()
        update_flow_hash()
}

# ============================================================
# AI CONSUMPTION
# ============================================================

AI_CONSUMPTION {
    MODE: FormalSemanticReasoning
    PARSE_AS: ExecutableFlowAlgebra

    PRIORITIES: [
        sequence_identity,
        genetic_code_context,
        reading_frame,
        codon_mapping,
        translation_signal,
        evidence_provenance,
        confidence,
        semantic_equivalence
    ]

    REQUIREMENTS: [
        distinguish_DNA_triplet_from_RNA_codon,
        distinguish_codon_from_anticodon,
        preserve_reading_frame,
        preserve_sequence_direction,
        preserve_species_context,
        preserve_organelle_context,
        use_correct_genetic_code_variant,
        avoid_unsupported_functional_inference
    ]
}

# ============================================================
# VALIDATION
# ============================================================

VALIDATE {
    REQUIRE GeneticCode
    REQUIRE Codon
    REQUIRE Anticodon
    REQUIRE AminoAcid
    REQUIRE ReadingFrame
    REQUIRE Translation
    REQUIRE Evidence
    REQUIRE CONFIDENCE
    REQUIRE SEMANTIC_EQUIVALENCE
    REQUIRE UPDATE_MODEL
    REQUIRE AI_CONSUMPTION

    ASSERT Codon.nucleotide_count == 3
    ASSERT Anticodon PART_OF tRNA
    ASSERT Codon != Anticodon
    ASSERT GeneticCode != Genome
    ASSERT GeneticCode != Gene
}

# ============================================================
# FLOW HASH
# ============================================================

FLOW_HASH {
    ALGORITHM: SHA-256
    INPUT: canonicalize(
        entities,
        relations,
        processes,
        rules,
        semantic_equivalence,
        confidence_model,
        update_model,
        ai_consumption
    )
    PURPOSE: integrity_and_version_tracking
}

END flow "GeneticCodeOntology"
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ