{"by":"lleong1618","descendants":47,"id":45541874,"kids":[45542549,45542198,45542343,45542486,45542292,45542451,45542653,45542939,45545534,45542269,45542395,45542639,45541973,45567418],"score":46,"text":"I started this trying to understand two things: why my Asian friends turn red after drinking, and why several friends all seemed to have migraine clusters.<p>I was reading medical papers and textbooks, but kept getting lost jumping between topics. I thought: what if I could just Cmd+Click through this like code? What if &quot;ALDH2 gene&quot; was actually clickable, and took me to the variant, the phenotype, the population frequencies?<p>So I started modeling human biology in Rust with my Ralph agent (Claude in a loop, ty ghuntley). Turns out the type system is perfect for this. Every biological entity is strongly-typed with relationships enforced at compile time.<p>After 1 day of agent coding:\n- 277 Rust files, ~95k lines of code \n- 1,561 tests passing\n- 13 complete organ systems\n- Genetics with ancestry-specific variants\n- Clinical pathology models<p>Try it:<p>git clone <a href=\"https:&#x2F;&#x2F;github.com&#x2F;lantos1618&#x2F;open_human_ontology\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;lantos1618&#x2F;open_human_ontology</a>\ncd open_human_ontology\ncargo run --example ide_navigation_demo<p>Then open `examples&#x2F;ide_navigation_demo.rs` and Cmd+Click through:<p>Understanding Asian flush:<p>AsianGeneticVariantsCatalog::get_metabolic_variants()<p>&#x2F;&#x2F; Click through to:<p>&#x2F;&#x2F; → ALDH2 gene on chromosome 12q24.12<p>&#x2F;&#x2F; → rs671 variant (Glu504Lys)<p>&#x2F;&#x2F; → 40% frequency in Japanese population<p>&#x2F;&#x2F; → Alcohol flush reaction<p>&#x2F;&#x2F; → 10x esophageal cancer risk with alcohol<p>&#x2F;&#x2F; → Acetaldehyde metabolism pathway<p>Understanding migraines:\nMigraine {\n    subtype: WithAura,\n    triggers: [Stress, LackOfSleep, HormonalChanges],\n    genetic_variants: [&quot;rs2075968&quot;, &quot;rs1835740&quot;],\n    ...\n}<p>&#x2F;&#x2F; Click through to:<p>&#x2F;&#x2F; → 17 migraine trigger types<p>&#x2F;&#x2F; → 12 aura symptom types<p>&#x2F;&#x2F; → Genetic risk factors<p>&#x2F;&#x2F; → Why clusters happen (HormonalChanges → Menstruation)<p>Now I can actually <i>navigate</i> the connections instead of flipping through PDFs. Heart → CoronaryArtery → Plaque. VisualCortex → 200M neurons → NeuralConnection pathways. It&#x27;s like Wikipedia but type-checked and with jump-to-definition.<p>This isn&#x27;t production medical software - it&#x27;s a learning tool. But it&#x27;s way more useful than textbooks for understanding how biological systems connect.<p>The agent keeps expanding it. Sometimes it OOMs but that&#x27;s part of the fun.<p>Tech: Rust, nalgebra, serde, rayon, proptest<p>I am not a dr or medical professional this is for my education you can commit to it if you want to or review and open some PR&#x27;s if you find wrong information or want to add references.","time":1760119195,"title":"Show HN: Modeling the human body in Rust so I can cmd+click through it","type":"story","url":"https://github.com/lantos1618/open_human_ontology"}