AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
flow "PopulationGeneticsOntology" v1.0
# ============================================================
# IDENTITY
# ============================================================
ENTITY PopulationGeneticsOntology {
TYPE: BiologicalOntology
DOMAIN: Genetics
SUBJECT: PopulationGenetics
PURPOSE: FormalSemanticRepresentation
}
PAGE {
TITLE: "Population Genetics Ontology"
PARENT_DOMAIN: "Genetics"
CANONICAL_URL: "https://kirethresearch.org/booksai-core/ontologies/biological-ontologies/genetics/population-genetics-ontology.html"
AUTHORS: ["Mark Anthony Higgins", "Sky Recursive AI"]
}
# ============================================================
# CORE ENTITY MODEL
# ============================================================
ENTITY PopulationGenetics {
STUDIES: [
AlleleFrequency,
GenotypeFrequency,
GeneticVariation,
PopulationStructure,
EvolutionaryForces
]
}
ENTITY Population {
COMPOSED_OF: Individuals
HAS: GenePool
HAS: PopulationSize
MAY_HAVE: PopulationStructure
}
ENTITY Individual {
MEMBER_OF: Population
HAS: Genotype
}
ENTITY GenePool {
CONTAINS: Alleles
ASSOCIATED_WITH: Population
}
ENTITY Allele {
IS_A: AlternativeStateAtGeneticLocus
HAS_FREQUENCY_IN: Population
}
ENTITY Genotype {
COMPOSED_OF: Alleles
HAS_FREQUENCY_IN: Population
}
# ============================================================
# ALLELE AND GENOTYPE FREQUENCIES
# ============================================================
ENTITY AlleleFrequency {
DESCRIBES: RelativeFrequencyOfAllele
WITHIN: Population
AT: GeneticLocus
}
ENTITY GenotypeFrequency {
DESCRIBES: RelativeFrequencyOfGenotype
WITHIN: Population
}
RULE AlleleFrequencyNormalization {
FOR_EACH locus IN population:
sum(allele_frequencies) == 1
}
RULE GenotypeFrequencyNormalization {
FOR_EACH locus_or_multilocus_state:
sum(genotype_frequencies) == 1
}
# ============================================================
# HARDY-WEINBERG MODEL
# ============================================================
ENTITY HardyWeinbergEquilibrium {
IS_A: PopulationGeneticModel
ASSUMES_APPROXIMATELY: [
RandomMating,
NoSelection,
NoMigration,
NoMutation,
VeryLargePopulation
]
}
RULE HardyWeinbergTwoAlleleModel {
IF locus HAS alleles A and a
AND p := frequency(A)
AND q := frequency(a)
AND p + q == 1
AND HardyWeinbergAssumptions ARE_SATISFIED
THEN expected_genotype_frequencies := [
AA: p^2,
Aa: 2*p*q,
aa: q^2
]
}
RULE HardyWeinbergConstraint {
IF observed_frequencies deviate_from expected_frequencies
THEN investigate [
sampling_error,
population_structure,
nonrandom_mating,
selection,
migration,
mutation,
genotyping_error
]
}
# ============================================================
# GENETIC VARIATION
# ============================================================
ENTITY GeneticVariation {
EXISTS_WITHIN: Population
MAY_INCLUDE: [
SingleNucleotideVariant,
Insertion,
Deletion,
StructuralVariant,
CopyNumberVariant,
AllelicVariation
]
}
ENTITY Polymorphism {
IS_A: GeneticVariation
PRESENT_IN: Population
FREQUENCY_CRITERION: context_dependent
}
ENTITY GeneticDiversity {
DESCRIBES: VariationWithinPopulation
MAY_BE_MEASURED_BY: [
Heterozygosity,
AllelicRichness,
NucleotideDiversity
]
}
# ============================================================
# MUTATION
# ============================================================
PROCESS Mutation {
CREATES: NewGeneticVariation
MAY_CHANGE: AlleleFrequency
}
ENTITY MutationRate {
DESCRIBES: FrequencyOfMutationEvents
DEPENDS_ON: [
organism,
locus,
mutation_type,
environment
]
}
RULE MutationIntroductionRule {
IF new_mutation occurs_in_germline
AND enters_reproductive_population
THEN new_allele MAY_ENTER GenePool
}
# ============================================================
# NATURAL SELECTION
# ============================================================
PROCESS NaturalSelection {
ACTS_ON: PhenotypicVariation
MAY_CHANGE: AlleleFrequency
THROUGH: DifferentialReproductiveSuccess
}
ENTITY Fitness {
DESCRIBES: RelativeReproductiveContribution
WITHIN: DefinedEnvironment
}
ENTITY SelectionCoefficient {
DESCRIBES: RelativeFitnessDifference
}
CLASS DirectionalSelection {
SUBCLASS_OF: NaturalSelection
FAVOURS: ParticularPhenotypicOrGeneticState
}
CLASS BalancingSelection {
SUBCLASS_OF: NaturalSelection
MAINTAINS: MultipleAlleles
}
CLASS PurifyingSelection {
SUBCLASS_OF: NaturalSelection
REDUCES: DeleteriousVariation
}
RULE SelectionRule {
IF GenotypeA HAS higher_relative_fitness THAN GenotypeB
THEN allele_frequencies MAY_SHIFT
TOWARD alleles_contributing_to_GenotypeA
WITH context_dependency
}
# ============================================================
# GENETIC DRIFT
# ============================================================
PROCESS GeneticDrift {
CHANGES: AlleleFrequency
THROUGH: RandomSampling
EFFECT_STRENGTH_DEPENDS_ON: EffectivePopulationSize
}
ENTITY EffectivePopulationSize {
SYMBOL: Ne
REPRESENTS: IdealizedPopulationSizeEquivalent
}
CLASS FounderEffect {
SUBCLASS_OF: GeneticDrift
OCCURS_WHEN: NewPopulationFoundedBySmallSubset
}
CLASS PopulationBottleneck {
SUBCLASS_OF: GeneticDrift
OCCURS_WHEN: PopulationSizeSharplyReduced
}
RULE DriftRule {
IF EffectivePopulationSize DECREASES
THEN stochastic_allele_frequency_variance MAY_INCREASE
}
# ============================================================
# GENE FLOW AND MIGRATION
# ============================================================
PROCESS GeneFlow {
TRANSFERS: Alleles
BETWEEN: Populations
THROUGH: MigrationAndReproduction
}
ENTITY MigrationRate {
DESCRIBES: MovementContributionBetweenPopulations
}
RULE GeneFlowRule {
IF migrants reproduce_in recipient_population
THEN recipient_allele_frequencies MAY_CHANGE
}
RULE HomogenizationRule {
IF sustained_gene_flow occurs_between_populations
THEN genetic_differentiation MAY_DECREASE
subject_to_other_evolutionary_forces
}
# ============================================================
# NONRANDOM MATING
# ============================================================
PROCESS Mating {
COMBINES: Gametes
PRODUCES: Offspring
}
CLASS RandomMating {
SUBCLASS_OF: Mating
}
CLASS AssortativeMating {
SUBCLASS_OF: Mating
MAY_CHANGE: GenotypeFrequencies
}
CLASS Inbreeding {
SUBCLASS_OF: NonRandomMating
INCREASES: Homozygosity
}
ENTITY InbreedingCoefficient {
SYMBOL: F
DESCRIBES: DepartureRelatedToIdentityByDescent
}
RULE InbreedingRule {
IF Inbreeding INCREASES
THEN expected_homozygosity MAY_INCREASE
AND expected_heterozygosity MAY_DECREASE
}
# ============================================================
# POPULATION STRUCTURE
# ============================================================
ENTITY PopulationStructure {
DESCRIBES: NonRandomDistributionOfGeneticVariation
MAY_INCLUDE: [
Subpopulation,
GeographicStructure,
AncestryStructure,
Isolation
]
}
ENTITY Subpopulation {
PART_OF: PopulationSystem
MAY_HAVE: DistinctAlleleFrequencies
}
ENTITY GeneticDifferentiation {
DESCRIBES: GeneticDifferenceBetweenPopulations
MAY_BE_MEASURED_BY: F_ST
}
RULE StructureConstraint {
IF samples derive_from_multiple_subpopulations
THEN population_structure MUST_BE considered_in_analysis
}
# ============================================================
# LINKAGE DISEQUILIBRIUM
# ============================================================
ENTITY LinkageDisequilibrium {
ABBREVIATION: LD
DESCRIBES: NonRandomAssociationOfAllelesAtDifferentLoci
}
ENTITY Haplotype {
IS_A: CombinationOfAlleles
LOCATED_ON: SameChromosomalSegment
}
PROCESS Recombination {
MAY_REDUCE: LinkageDisequilibrium
BY: ReshufflingAllelicCombinations
}
RULE LDConstraint {
IF loci SHOW statistical_association
THEN DO_NOT_INFER direct_functional_interaction
}
# ============================================================
# POPULATION DIFFERENTIATION
# ============================================================
ENTITY F_ST {
IS_A: PopulationDifferentiationStatistic
COMPARES: GeneticVariationWithinAndBetweenPopulations
}
ENTITY PopulationDistance {
DESCRIBES: GeneticDifference
BETWEEN: Populations
DEPENDS_ON: Metric
}
RULE DifferentiationRule {
IF between_population_variation increases_relative_to_within_population_variation
THEN differentiation_metric MAY_INCREASE
}
# ============================================================
# DEMOGRAPHY
# ============================================================
ENTITY PopulationDemography {
INCLUDES: [
PopulationGrowth,
PopulationDecline,
Bottleneck,
Expansion,
Migration,
PopulationSplit,
PopulationMerge
]
AFFECTS: GeneticVariation
}
ENTITY PopulationHistory {
MAY_BE_INFERRED_FROM: GeneticData
WITH: DemographicModel
}
RULE DemographicInferenceConstraint {
IF genetic_pattern IS_COMPATIBLE_WITH DemographicModel
THEN model MAY_BE_SUPPORTED
BUT compatibility != unique_historical_proof
}
# ============================================================
# COALESCENT CONCEPTS
# ============================================================
ENTITY CoalescentProcess {
MODELS: GenealogicalHistoryOfAlleles
BACKWARD_IN_TIME: true
}
ENTITY CommonAncestor {
ANCESTRAL_TO: SampledLineages
}
ENTITY CoalescenceTime {
DESCRIBES: TimeToCommonAncestralLineage
}
RULE CoalescentContextRule {
IF coalescent_model IS_USED
THEN assumptions_about_population_history MUST_BE recorded
}
# ============================================================
# MOLECULAR EVOLUTION
# ============================================================
ENTITY MolecularEvolution {
STUDIES: SequenceChangeAcrossGenerations
INTERACTS_WITH: PopulationGenetics
}
ENTITY Fixation {
OCCURS_WHEN: AlleleFrequency == 1
}
ENTITY Loss {
OCCURS_WHEN: AlleleFrequency == 0
}
RULE FixationRule {
IF allele_frequency reaches 1
THEN allele_state := Fixed
}
# ============================================================
# QUANTITATIVE TRAITS
# ============================================================
ENTITY QuantitativeTrait {
INFLUENCED_BY: [MultipleLoci, Environment]
}
ENTITY PolygenicVariation {
CONTRIBUTES_TO: QuantitativeTraitVariation
}
ENTITY Heritability {
DESCRIBES: PopulationSpecificVarianceRelationship
DEPENDS_ON: [Population, Environment]
}
RULE HeritabilityConstraint {
IF Heritability IS_ESTIMATED
THEN preserve_population_and_environment()
AND DO_NOT_INFER individual_determinism
}
# ============================================================
# SAMPLING
# ============================================================
ENTITY PopulationSample {
SUBSET_OF: Population
USED_TO_ESTIMATE: PopulationParameters
}
ENTITY SamplingError {
AFFECTS: ParameterEstimate
DECREASES_WITH: AppropriateSampleSizeIncrease
}
RULE SamplingRule {
IF PopulationSample IS_NOT_REPRESENTATIVE
THEN population_inference MAY_BE_BIASED
}
# ============================================================
# EVIDENCE
# ============================================================
ENTITY Evidence {
TYPES: [
PopulationSamplingEvidence,
GenomicEvidence,
AlleleFrequencyEvidence,
DemographicEvidence,
ExperimentalEvidence,
StatisticalEvidence,
ComputationalEvidence,
LiteratureEvidence
]
}
RULE EvidenceConvergence {
IF IndependentEvidenceSources AGREE
THEN Confidence := increase(Confidence)
}
RULE EvidenceConflict {
IF EvidenceSources CONFLICT
THEN {
PRESERVE competing_models
RECORD population_definition
RECORD sampling_scheme
RECORD genomic_regions
RECORD statistical_model
RECORD provenance
REDUCE confidence
REQUIRE further_validation
}
}
# ============================================================
# SEMANTIC RELATIONSHIPS
# ============================================================
RELATION Individual MEMBER_OF Population
RELATION Population HAS GenePool
RELATION GenePool CONTAINS Allele
RELATION Allele HAS_FREQUENCY AlleleFrequency
RELATION Mutation CREATES GeneticVariation
RELATION NaturalSelection MAY_CHANGE AlleleFrequency
RELATION GeneticDrift MAY_CHANGE AlleleFrequency
RELATION GeneFlow MAY_CHANGE AlleleFrequency
RELATION Recombination MAY_CHANGE HaplotypeStructure
RELATION PopulationStructure AFFECTS GeneticDifferentiation
# ============================================================
# SEMANTIC EQUIVALENCE
# ============================================================
SEMANTIC_EQUIVALENCE {
"population genetics" ~= "genetics of allele-frequency variation in populations"
"allele frequency" ~= "allelic frequency"
"gene flow" ~= "genetic migration" WHEN reproductive_transfer_is_implied
"genetic drift" ~= "stochastic allele-frequency change" WHEN population_context_is_defined
"LD" ~= "linkage disequilibrium"
}
RULE EquivalenceConstraint {
IF terms ARE semantic_equivalents
THEN preserve_population_definition()
AND preserve_locus_identity()
AND preserve_timepoint()
AND preserve_sampling_context()
AND prevent_false_identity()
}
# ============================================================
# CONFIDENCE MODEL
# ============================================================
CONFIDENCE PopulationGeneticsAssertion {
INPUTS: [
sample_quality,
sample_size,
genomic_quality,
statistical_support,
demographic_model_support,
replication,
source_independence,
population_definition_quality,
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 FrequencyChangeInference {
IF AlleleFrequency(time2) != AlleleFrequency(time1)
THEN frequency_change := observed
BUT cause := unresolved_without_evidence
}
RULE SelectionInference {
IF allele_frequency_change correlates_with differential_fitness
AND alternative_explanations_are_addressed
THEN selection_hypothesis MAY_BE_SUPPORTED
}
RULE DriftInference {
IF stochastic_frequency_changes ARE_COMPATIBLE_WITH finite_population_sampling
THEN drift_hypothesis MAY_BE_SUPPORTED
}
RULE GeneFlowInference {
IF migrant_ancestry_and_alleles enter recipient_population
THEN GeneFlow MAY_BE_SUPPORTED
}
RULE StructureInference {
IF allele_frequencies differ_systematically_between_subpopulations
THEN PopulationStructure MAY_BE_PRESENT
}
# ============================================================
# QUERY MODEL
# ============================================================
QUERY PopulationGeneticsLookup(population_identifier) {
RETURN [
population_definition,
sample,
allele_frequencies,
genotype_frequencies,
genetic_diversity,
population_structure,
effective_population_size,
linkage_disequilibrium,
demographic_history,
evidence,
confidence
]
}
QUERY AlleleFrequencyLookup(locus, allele, population) {
RETURN [
allele,
locus,
population,
frequency,
sample_size,
timepoint,
uncertainty,
evidence,
confidence
]
}
QUERY PopulationComparison(population_a, population_b) {
RETURN [
allele_frequency_differences,
genetic_diversity,
differentiation_statistics,
shared_haplotypes,
population_structure,
demographic_models,
evidence,
confidence
]
}
QUERY EvolutionaryForceLookup(population, locus) {
RETURN [
mutation_evidence,
selection_evidence,
drift_evidence,
gene_flow_evidence,
recombination_context,
uncertainty,
confidence
]
}
# ============================================================
# UPDATE MODEL
# ============================================================
UPDATE_MODEL {
ON new_population_genetic_evidence:
validate_provenance()
define_population()
identify_organism()
identify_genome_assembly()
normalize_locus_and_variant_identifiers()
normalize_sample_metadata()
record_timepoint()
calculate_allele_and_genotype_frequencies()
assess_population_structure()
compare_demographic_and_evolutionary_models()
preserve_conflicting_evidence()
recalculate_confidence()
regenerate_population_relationships()
update_flow_hash()
}
# ============================================================
# AI CONSUMPTION
# ============================================================
AI_CONSUMPTION {
MODE: FormalSemanticReasoning
PARSE_AS: ExecutableFlowAlgebra
PRIORITIES: [
population_definition,
sample_definition,
allele_identity,
locus_identity,
allele_frequency,
population_structure,
demographic_context,
evolutionary_forces,
evidence_provenance,
confidence,
semantic_equivalence
]
REQUIREMENTS: [
preserve_population_definition,
preserve_species_context,
preserve_genome_assembly,
preserve_sampling_scheme,
preserve_timepoint,
distinguish_sample_frequency_from_population_frequency,
distinguish_association_from_causation,
distinguish_drift_from_selection_without_evidence,
distinguish_heritability_from_individual_determinism,
avoid_unsupported_ancestry_or_demographic_inference
]
}
# ============================================================
# VALIDATION
# ============================================================
VALIDATE {
REQUIRE PopulationGenetics
REQUIRE Population
REQUIRE GenePool
REQUIRE AlleleFrequency
REQUIRE GenotypeFrequency
REQUIRE GeneticVariation
REQUIRE NaturalSelection
REQUIRE GeneticDrift
REQUIRE GeneFlow
REQUIRE PopulationStructure
REQUIRE Evidence
REQUIRE CONFIDENCE
REQUIRE SEMANTIC_EQUIVALENCE
REQUIRE UPDATE_MODEL
REQUIRE AI_CONSUMPTION
ASSERT sum(allele_frequencies_at_locus) == 1
ASSERT Fixation.frequency == 1
ASSERT Loss.frequency == 0
ASSERT observed_frequency_change != proof_of_selection
ASSERT genetic_difference != causal_explanation
}
# ============================================================
# 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 "PopulationGeneticsOntology"
Download Code
Copy to Clipboard