/genome: endless procedural double-helix viewer over the live CPIC gene catalogue#67
Conversation
…ayer 7 The organ view showed tan limb-shaped strays floating in the lower body — a foot, forearm/leg "bone shafts", and detached pieces below the abdomen. They weren't organs: they were connective tissue misfiled as organ. Root cause: FMA's is_a tree files ligaments/tendons/membranes under /viscera/solid_organ/ligament_organ and /membrane_organ. tissue_of walks that chain and hits the "viscus" TYPEKEY (→ layer 3 organ) before recognising them as connective. The UI's connective layer (7) was defined but NO tissue type ever mapped to it — it was a dead compartment end to end. So interosseous membrane of leg/forearm, calcaneal tendon, long plantar ligament, stylohyoid/ thyrohyoid/vocal ligaments, retinacula, iliotibial tract, tarsal plates, and the superior-oblique trochlea all rendered as organ-layer strays. Fix: - bake_torso_splat.py: a "connective" TYPEKEY (ligament organ / membrane organ / tendon / aponeurosis / fascia / retinaculum), placed after muscle and before the organ-group keys so it wins over viscus. Added connective to TISSUE_RGB (ivory 224,219,204), TISSUE_OPACITY (0.60), TISSUE_CONTAINERS, SYSTEM_OF. - soabake + helixbake layer_of (scratch emitters): "connective" => 7. - bake_body_v3.py + audit_body_semantics.py LAYER_OF mirrors: connective => 7. - audit_body_semantics.py: new QA-3 assertion that interosseous membrane / calcaneal tendon / long plantar ligament / iliotibial tract are layer 7 (regression guard). Fixed a latent bug it exposed — the eyeball check's bare "retina" matched "retinaculum"; tightened to \bretina\b. Validated against the FMA is_a tree before re-emit: exactly 39 concepts move to connective (21 from organ, 16 from skin, 2 from muscle); zero real organs move. New layer histogram: organ 151→130, connective 0→39. The lowest organ concepts are now real pelvic organs (testis/prostate/bladder) — no foot, no limb bones. Re-emitted as the stamped 20260629c artifacts (geometry byte-identical to 20260629b — only the per-concept tissue/layer changed, so no mesh re-read or slicer-fill needed; body.blocks is unchanged, the server LOD asset stays valid). Dockerfile + manifest bumped to 20260629c. QA-3 audit passes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RhpwkHGgia2TuDFvdnuQdE
A new /genome route — an infinite golden-angle double helix that visualises the
GUID address space CPIC lives in, rather than a sized mesh. Standalone
(GenomeHelix.tsx), shares nothing with the working /cpic CpicCockpit, so it
can never break it (same isolation discipline as /helix vs /body).
Cheap by construction — pure repetition placed by a function of the address:
- One instanced sugar-bead per strand + one instanced rung, a fixed pool of
240 base-pairs (THREE.InstancedMesh). Position is a pure function of the
integer step: angle = step·goldenAngle, y = step·rise. No baked geometry.
- Endless: the 240 instances are a sliding WINDOW over an infinite strand —
scroll advances, the same instances re-address higher steps, ends fade into
fog. Infinite length, constant instance count, no reallocation.
- Fractal: the wheel grows density; spacing subdivides ×16 per tier, so zoom
descends the 16-ary cascade ("scale = the next cascade level"). The golden
angle (most-irrational) makes the scaffold aperiodic — endless, not looped.
- CPIC as sparse lit loci: the 16 canonical CPIC level-A pharmacogenes
(CYP2D6, CYP2C19, TPMT, DPYD, SLCO1B1…) light up as labelled white rungs in
the vast scaffold — the tiny dataset in a huge address space, made visual.
Prototype scope: the gene set is the hardcoded canonical CPIC-A list at
placeholder golden-scatter addresses. Next step (not done here): light loci
from the real graph via POST /api/cpic/reason (the existing gene→diplotype→
phenotype→drug 2-hop), making each rung an expandable real gene. tsc + vite
build clean.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhpwkHGgia2TuDFvdnuQdE
…cpic Replace the hardcoded gene placeholders with the REAL pharmacogene set: - GET /api/cpic/catalog on mount → the live gene list lights the loci; the canonical CPIC-A list stays only as a fallback when the endpoint is absent (old deploy), so /genome always renders. Header shows live vs fallback + the real gene count. - Each gene gets a STABLE address from an FNV-1a hash of its name (linear-probe on the rare collision) → same gene, same locus forever; addressability with zero storage, the whole point of the scaffold. - Click a lit locus (drag-aware: ignored while orbiting) raycasts the rung InstancedMesh and hands off to the working reasoner at /cpic?gene=<gene>. - CpicCockpit now honors ?gene= as its initial gene (additive, backward- compatible — no param ⇒ the existing default), so the handoff lands on the clicked gene and its diplotype→phenotype→recommendation 2-hop. The scaffold (golden-angle, windowed-endless, 16-ary zoom) is unchanged; only the loci became real and clickable. tsc + vite build clean. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RhpwkHGgia2TuDFvdnuQdE
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughAdds a new connective tissue type (layer 7) to the body bake and audit pipeline tools. Introduces a ChangesConnective tissue layer 7 in bake pipeline
GenomeHelix page and asset bump
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What
A new
/genomeroute — an endless procedural double helix that visualises the GUID address space CPIC lives in, rather than a sized mesh. Standalone (GenomeHelix.tsx); shares nothing with the working/cpicCpicCockpit, so it can never break it (same isolation discipline as/helixvs/body).The premise: the OGAR GUID address space is billions of slots (HEEL·HIP·TWIG cascade); CPIC fills almost none of it. So this isn't a fixed mesh — it's an infinite scaffold that is the address space, with the sparse real pharmacogenes lighting up loci in it.
How (cheap by construction — repetition placed by a function of the address)
THREE.InstancedMesh). Position is a pure function of the integer step:angle = step·goldenAngle,y = step·rise. No baked geometry, no forced shape.scrolladvances, the same instances re-address higher steps, the ends fade into fog. Infinite length, constant instance count, no reallocation.density; spacing subdivides ×16 per tier, so zoom descends the 16-ary cascade ("scale = the next cascade level"). The golden angle (most-irrational) makes the scaffold aperiodic — endless, not looped.Real CPIC data (not placeholders)
GET /api/cpic/catalog(the live gene list); the canonical CPIC level-A list is only a fallback when the endpoint is absent (old deploy), so/genomealways renders. The header showslivevsfallback+ the real gene count.InstancedMeshand hands off to the working reasoner at/cpic?gene=<gene>.CpicCockpitnow honors?gene=as its initial gene (additive, backward-compatible — no param ⇒ the existing default), so the handoff lands on the clicked gene and its diplotype→phenotype→recommendation 2-hop.Scope / safety
/genomeroute +GenomeHelix.tsx; the only edit to existing code is the additive?gene=read inCpicCockpit.tsx./cpicbehaviour is unchanged when no param is present.Verification
tsc --noEmit+vite buildclean./api/cpic/catalog+/api/cpic/reasonare the existing endpoints the working/cpiccockpit already uses;/genomeconsumes the catalog read-only and deep-links into the reasoner.Follow-ups (not in this PR)
🤖 Generated with Claude Code
https://claude.ai/code/session_01RhpwkHGgia2TuDFvdnuQdE
Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes