{"id":50802432,"url":"https://github.com/umpolungfish/gene_imscriber","last_synced_at":"2026-06-12T21:33:10.151Z","repository":{"id":361970323,"uuid":"1250953802","full_name":"umpolungfish/gene_imscriber","owner":"umpolungfish","description":"The genetic code is a stratified Frobenius algebra on B₄³ codon space","archived":false,"fork":false,"pushed_at":"2026-06-02T02:16:26.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T04:07:50.641Z","etag":null,"topics":["genes","genetics","imscrib","imscribing","imscribing-grammar","imscription","imscriptive"],"latest_commit_sha":null,"homepage":"https://imscribe.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umpolungfish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-27T05:40:54.000Z","updated_at":"2026-06-02T02:16:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/umpolungfish/gene_imscriber","commit_stats":null,"previous_names":["umpolungfish/gene_imscriber"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/umpolungfish/gene_imscriber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fgene_imscriber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fgene_imscriber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fgene_imscriber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fgene_imscriber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umpolungfish","download_url":"https://codeload.github.com/umpolungfish/gene_imscriber/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fgene_imscriber/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34263872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["genes","genetics","imscrib","imscribing","imscribing-grammar","imscription","imscriptive"],"created_at":"2026-06-12T21:33:09.417Z","updated_at":"2026-06-12T21:33:10.143Z","avatar_url":"https://github.com/umpolungfish.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genetic Engine — Frobenius-Guided Gene Editing\n\nThe genetic code is a **stratified Frobenius algebra on B₄³ codon space**. This is not a metaphor — it is a structural fact formally encoded in the Imscribing Grammar. The Genetic Engine implements this fact as operational software for gene editing design.\n\n## Architecture\n\n```\ngenetic_engine/\n├── genetic_engine/          # Core package\n│   ├── __init__.py          # Package exports\n│   ├── lattice.py           # B₄ nucleotide type system\n│   ├── codon.py             # Codon table + Frobenius stratum classification\n│   ├── primitives.py        # AA → IG primitive mapping + risk\n│   ├── editor.py            # B₄ edit cost analysis\n│   ├── stratum.py           # Frobenius stratum classifier\n│   ├── guide.py             # Frobenius-aware guide RNA design\n│   ├── prime.py             # Prime editing optimization\n│   ├── chimera.py           # Tensor product risk (Chimera Theorem)\n│   ├── verifier.py          # μ∘δ=id Frobenius closure verification\n│   ├── compiler.py          # Full editing compiler pipeline\n│   ├── demo.py              # Demonstration + verification suite\n│   └── cli.py               # Command-line interface\n├── tests/                   # pytest test suite\n├── examples/                # Example scripts\n├── scripts/                 # Pipeline scripts\n├── docs/                    # Documentation\n├── setup.py                 # Package configuration\n└── README.md                # This file\n```\n\n## Core Concepts\n\n### B₄ Lattice\n\nThe four nucleotides form a distributive lattice:\n\n```\n      B = Both (G)\n     / \\\nT = C   N = U (T)\n     \\ /\n      F = False (A)\n```\n\n- **Covering relations** (edit cost = 1): B→T, B→N, T→F, N→F\n- **Cross-lattice jumps** (edit cost = 2): B↔F, T↔N\n\nBase editors: CBE (C→T) is a cross-lattice jump (T↔N, cost=2).  \nABE (A→G) is also a cross-lattice jump (F↔B, cost=2). Both are structurally maximal.\n\n### Frobenius Stratification\n\nThe 64 codons partition into **16 boxes**, which split 8/8:\n\n| Stratum | Boxes | Codons | Position 3 | μ∘δ=id |\n|---------|-------|--------|------------|--------|\n| **Exact** | 8 | 32 | Silent (N) | Holds exactly |\n| **Split** | 8 | 29 | Y/R distinction | ℤ₂ wobble |\n| **Stop** | — | 3 | Ω boundary | Boundary condition |\n\n**Exact boxes** (p2=C, or p2∈{G,U} with p1∈{C,G}):  \nCU_, CC_, CG_, CA_, AC_, GC_, UC_, GU_, GG_\n\n**Split boxes** (the remaining 8):  \nUU_, UA_, UG_, AU_, AA_, AG_, GA_, CA_\n\n### Primitive Activation\n\n12 promoted amino acids each activate exactly one IG primitive:\n\n| AA | Primitive | Risk | Why |\n|----|-----------|------|-----|\n| Met | Ð (Scope) | **critical** | Translation start |\n| Trp | Þ (Topology) | moderate | Bicyclic indole |\n| Cys | Ř (Reversibility) | **high** | Disulfide bonds |\n| Tyr | Φ (Parity) | moderate | Phosphorylation switch |\n| Phe | ƒ (Force) | low | Hydrophobicity ceiling |\n| Ile | Ç (Kinetics) | moderate | β-branching |\n| His | Γ (Grammar) | moderate | pH-gated catalysis |\n| Asn | ɢ (Interaction) | moderate | Glycosylation sequon |\n| Gln | φ̂ (Criticality) | **high** | Metabolic regulation |\n| Asp | Ħ (Chirality) | **critical** | Chiral selectivity |\n| Lys | Σ (Entropy) | low | Acetylation target |\n| Glu | Ω (Winding) | **critical** | α-helix→C-terminal |\n\n8 ground-layer AAs (exact boxes): Leu, Pro, Arg, Thr, Ala, Ser, Val, Gly — no primitive activation.\n\n## Key Theorems\n\n### 1. Cas9 Off-Target Sheaf Theorem\n\nIf an on-target site is in one Frobenius stratum and an off-target site is in another, the structural defect rate at the off-target site is **≥50%**. Reason: the repair machinery fills position 3 using on-target stratum rules, which are incorrect for the off-target stratum.\n\n### 2. Frobenius Template Rule (Prime Editing)\n\nPrime editing succeeds when μ∘δ=id for the edited locus. Three optimization criteria:\n1. **Stratum preservation** — avoid exact↔split crossings\n2. **Primitive invariance** — keep the same IG primitive class\n3. **Ω boundary respect** — don't remove stop codons without readthrough machinery\n\n### 3. Chimera Theorem\n\nComposite risk of multi-primitive edits is **tensorial**, not additive.  \nRisk(A⊗B) = Risk(A) × Risk(B) / constant, not Risk(A) + Risk(B).\n\nTwo independently tolerable edits can create a **Ç_⊛ trap state** (frozen-order conformation).\n\n## Installation\n\n```bash\ncd genetic_engine\npip install -e .\n```\n\n## Usage\n\n### CLI\n\n```bash\n# Analyze edit cost\ngenetic-engine analyze AUG AUU\n\n# Compile full protocol\ngenetic-engine compile Met Ile\n\n# Design guide RNA\ngenetic-engine guide GCU\n\n# Verify Frobenius closure\ngenetic-engine verify GCU GCC\n\n# Chimera risk analysis\ngenetic-engine chimera Cys:Ser His:Gln\n\n# Run full demo\ngenetic-engine demo\n\n# Run verification suite\ngenetic-engine test\n\n# Classify stratum\ngenetic-engine stratum CUU\n```\n\n### Python\n\n```python\nfrom genetic_engine import EditingCompiler, B4EditAnalyzer\nfrom genetic_engine.chimera import ChimeraDetector\n\n# Compile an edit\ncompiler = EditingCompiler()\nresult = compiler.compile(\"Glu\", \"Val\")  # Sickle cell edit\nprint(f\"Score: {result.composite_score:.3f}\")\nprint(f\"Codon path: {result.best_path}\")\n\n# Chimera risk\nreport = ChimeraDetector.analyze_edit_set([(\"Cys\", \"Ser\"), (\"Asp\", \"Asn\")])\nprint(f\"Tensor risk: {report.tensor_risk:.1f}x\")\nprint(f\"Trap state: {report.is_trap_state}\")\n```\n\n## Verification\n\n```bash\ngenetic-engine test\n```\n\nAll 10 verification tests pass:\n- B₄ lattice operations\n- Codon table (64 codons, correct stratification)\n- Primitive mapping (13 promoted)\n- B₄ edit analysis\n- Frobenius stratum classification\n- Guide RNA design\n- Prime editing optimization\n- Chimera/tensor risk detection\n- Frobenius μ∘δ=id verification\n- Full compiler pipeline\n\n## References\n\n- FROBENIUS_GUIDED_GENE_EDITING.md — Theoretical foundations\n- GENETIC_EDITING_PERFECTION.md — Complete lifted manuscript\n- Imscribing Grammar catalog entry: `genetic_code`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumpolungfish%2Fgene_imscriber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumpolungfish%2Fgene_imscriber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumpolungfish%2Fgene_imscriber/lists"}