Show HN: Modeling the human body in Rust so I can cmd+click through it
46 points| lleong1618 | 4 months ago |github.com
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 "ALDH2 gene" was actually clickable, and took me to the variant, the phenotype, the population frequencies?
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.
After 1 day of agent coding: - 277 Rust files, ~95k lines of code - 1,561 tests passing - 13 complete organ systems - Genetics with ancestry-specific variants - Clinical pathology models
Try it:
git clone https://github.com/lantos1618/open_human_ontology cd open_human_ontology cargo run --example ide_navigation_demo
Then open `examples/ide_navigation_demo.rs` and Cmd+Click through:
Understanding Asian flush:
AsianGeneticVariantsCatalog::get_metabolic_variants()
// Click through to:
// → ALDH2 gene on chromosome 12q24.12
// → rs671 variant (Glu504Lys)
// → 40% frequency in Japanese population
// → Alcohol flush reaction
// → 10x esophageal cancer risk with alcohol
// → Acetaldehyde metabolism pathway
Understanding migraines: Migraine { subtype: WithAura, triggers: [Stress, LackOfSleep, HormonalChanges], genetic_variants: ["rs2075968", "rs1835740"], ... }
// Click through to:
// → 17 migraine trigger types
// → 12 aura symptom types
// → Genetic risk factors
// → Why clusters happen (HormonalChanges → Menstruation)
Now I can actually navigate the connections instead of flipping through PDFs. Heart → CoronaryArtery → Plaque. VisualCortex → 200M neurons → NeuralConnection pathways. It's like Wikipedia but type-checked and with jump-to-definition.
This isn't production medical software - it's a learning tool. But it's way more useful than textbooks for understanding how biological systems connect.
The agent keeps expanding it. Sometimes it OOMs but that's part of the fun.
Tech: Rust, nalgebra, serde, rayon, proptest
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's if you find wrong information or want to add references.
dleeftink|4 months ago
[0]: https://jku-vds-lab.at/tools/
[1]: https://jku-vds-lab.at/publications/2009_bioinformatics_cale...
lleong1618|4 months ago
pacoWebConsult|4 months ago
lovecg|4 months ago
lleong1618|4 months ago
it seems sound to get structure but on real values and source grounding is needed to be validated.
just a poc
jll29|4 months ago
Scientific views may change over time based on new results, and even body properties like blood pressure or BMI are not constant per person but bound to vary; so perhaps a Body should be modeled as a view or snapshot of a set of time series?
I would like to encourage you to take a scientist's view: if you had not just one (your own) but two models, how would you evaluate which is "better" - in other words the evaluation question. You could set a particular task and perhaps finding out something works better with your model than with a full-text index of the textbook you used and a simple Lucene search interface?
Are you planning to connect your model to any kind of visualization? Should be useful.
rafram|4 months ago
ShrimpHawk|4 months ago
unknown|4 months ago
[deleted]
jstrieb|4 months ago
https://www.youtube.com/watch?v=Rt3XyeFHvt4 (poorly transcribed here: https://www.janestreet.com/tech-talks/algorithm-for-precisio...)
If I recall correctly, he used miniKanren along with formalized, structured data extracted from medical research. Unfortunately, his son has since passed away.
lleong1618|4 months ago
There's nothing that is not actionable, you can always do science.
rfl890|4 months ago
lleong1618|4 months ago
I did spot checks on random files with research agents and it seems to be ok for a claude code loop.
I'm not a Dr'
Please! is anyone a DR
koakuma-chan|4 months ago
jvanderbot|4 months ago
The latter feels a bit less hacker. Akin to saying "I got someone on fiver to mod this game look how cool it is". Sure, ideas are something, but as AI gets better this is less hacker and more just "Tool worked".
nomilk|4 months ago
tehlike|4 months ago
unknown|4 months ago
[deleted]
lleong1618|4 months ago
overtone1000|4 months ago
HeavyStorm|4 months ago
After the "this meeting could have been an email", we get the "code could have been html"
WillAdams|4 months ago
https://github.com/davidson16807/relativity.scad/wiki/Human-...
sixo|4 months ago
dietr1ch|4 months ago
I'd try generating markdown to be rendered in logseq by teaching the AI how to link and whatnot in my AGENT.md (or whatever people call their project-local instruction/context file).
From outside, I'd not trust hallucinated stuff, but it'd be neat to start a project where knowledgeable humans did oversee all the proposed changes.
lleong1618|4 months ago
csunoser|4 months ago
moron4hire|4 months ago
stronglikedan|4 months ago
unknown|4 months ago
[deleted]
lleong1618|4 months ago
honest take - decent at getting a quick understanding of what the ALDH2 process is like but struggles with harder modelling, the experiment gave better insights into ai then medical. (slop is countable with exa mcp (ground truthing, research, anti hallucinations).