Deleted 58 Python files (~31K lines) that were experimental prototypes
and bootstrapping scripts now superseded by the Lean source of truth:
0-Core-Formalism/core/ (2 files):
- field_solver_emulator.py
- formalize_mass_number.py
0-Core-Formalism/lean/LeanGPT/ (17 files):
- All LLM bootstrapping scripts (algorithm_bootstrap, automated_conviction_loop,
classify_algorithms, external_model_bridge, genetic_hypothesis_generator,
group_algorithms_by_domain, hutter_prize_full_test, hutter_prize_test,
hypothesis_generator, mathematical_law_conviction, otom_pipeline,
performance_profiler, refine_algorithms_by_domain, skeptical_agent_concern_fix,
skeptical_agent_swarm, wgsl_hypothesis_runner)
0-Core-Formalism/lean/Semantics/ (1 file):
- expand_domains.py
0-Core-Formalism/otom/ (4 files):
- scripts/validate_routing.py
- tools/ene/ene_artifact_salvage_extractor.py
- tools/genetics/emit_selection_receipt.py
- tools/genetics/selection_metrics.py
2-Search-Space/ (14 files):
- FAMM/solve_famm_sorry.py
- GhostPivot/gist_pivot_poc.py
- PIST/hybrid_tsm_pist_torus.py, pist_sweep.py
- SVQF/microgrid_voxel_emulation.py
- manifold/ (9 files: api/server, collapse_editor, particle_interaction,
projection_engine, relativity_adapter, self_typing_engine, soliton_search,
substrate_bridge)
- search/generate_lut.py, ingest_pd.py, sweep_manifold.py
3-Mathematical-Models/ (20 files):
- dna_benchmark/compressors/ (5 files)
- pist_biological_polymorphic_shifter_v3*.py (5 files)
- fiber_optic_vibrational_tensor/fiber_optic_tensor_network.py
- manifold_compression/src/ (2 files)
- fix_kwargs_meta.py, fix_metadata.py, fix_remaining.py, fix_sbox.py
- genetics/Allelica/Allelica.py
These prototypes expressed formal concepts in Python that are now
formalized in Lean (747+ Lean modules). Per AGENTS.md, Lean is the
source of truth for formal claims.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| images | ||
| LICENSE | ||
| populations.csv | ||
| readme.md | ||
🚀 Allelica
🧬 Allelica
Now, I know what you must be thinking — “Allelica? Who’s she?”
And no, Allelica is not a woman.
The name comes from allele — alternate forms of a gene.
🧠 Very Quick Genetics (I promise)
Okay… but what is a gene?
A gene is a segment of DNA that codes for proteins. DNA is the genetic material that stores information and passes it down generations.
Now imagine this:
- A gene is like a chapter in a book (say, eye colour), everyone had the same chapter
- The slightly different versions of that chapter? → alleles
And since you inherit one copy from each parent, you always have two alleles → this pair is your genotype.
👀 Simple Example
Let’s say:
- B → brown eyes (dominant)
- b → blue eyes (recessive)
Then:
- BB → brown
- Bb → brown (but carries blue)
- bb → blue
This is why two brown-eyed parents can still have a blue-eyed child.
🧬 Tiny Note (before a biologist attacks me)
Yes, this is simplified. Real genetics is messier. This is just enough for this project.
📐 The Math Side of Allelica
Allelica works on the Hardy–Weinberg principle.
p^2 + 2pq + q^2 = 1
Where:
- p = frequency of dominant allele
- q = frequency of recessive allele
And:
- p² → homozygous dominant
- 2pq → heterozygous
- q² → homozygous recessive
📊 Example
If:
- q = 0.3 → blue allele
- p = 0.7
Then:
- q² = 0.09 → 9% blue-eyed
- p² = 0.49 → 49% BB
- 2pq = 0.42 → 42% carriers
These values stay constant unless external factors interfere.
🤖 So… what does Allelica actually do?
She:
- Takes allele frequency data
- Calculates genotype frequencies using Hardy–Weinberg
- Compares and visualizes them across 4 populations
🌍 Why I made this
This started with me thinking:
“Does UV or altitude affect allele frequencies?”
Then I found real examples (like malaria resistance varying by region), and that turned into:
👉 let’s build something that visualizes this
This was originally my class 12 project (very ugly version). This is the upgraded one.
🎥 Preview
📊 Genotype Frequencies
📊 Genotype Comparison
📈 Allele Frequencies
📊 Data Source
All allele frequency data was sourced from: gnomAD (Genome Aggregation Database)
| Gene | Trait | RS Number |
|---|---|---|
| TYR | Skin Pigmentation | rs1042602 |
| MC1R | Skin Pigmentation | rs1805007 |
| SLC24A5 | Skin Pigmentation | rs111310111 |
| EPAS1 | Altitude Adaptation | rs6743991 |
| HBB | Sickle Cell Trait | rs10768683 |
| LCT | Lactase Persistence | rs2304371 |
| FTO | Obesity Risk | rs62033438 |
| CFTR | Cystic Fibrosis | rs113993960 |
| ACKR1 | Malaria Resistance | rs2814778 |
| APOE | Alzheimers Risk | rs440446 |
⚙️ How to Run
Install dependencies:
pip install pandas numpy matplotlib
Run:
python Allelica.py
✨ Features
- 📊 Genotype frequency comparison across populations
- 🔬 Genotype comparison across genes
- 📈 Allele frequency visualization
- 📋 Console summaries with biological interpretation
- ✅ Input validation
- 💾 CSV output of results
🚀 Future Improvements
- 🗺️ v1.1 — Allele frequency heatmap across all genes and populations
- 🧬 v2.0 — BioPython integration for direct database querying instead of manual CSV input
- 🖤 v3.0 — Frontend interface (Allelica deserves to look as good as she works)
💡 Final Note
I could keep talking about genetics forever.
But this project is basically that — just with Python and graphs.


