Notes
AI & computational biology, with code
Working notes on applying LLMs, agents, and foundation models to bioinformatics workflows. Every post links to a runnable GitHub repo.
TYK2 in Crohn's disease: what actually failed
Two TYK2 inhibitors missed their primary endpoint in Crohn's and both programs were shut down. Reading the trials endpoint by endpoint, with a two-proportion test and a small Bayesian posterior, recovers the objective signal the pass/fail label threw away.
A Bayesian go/no-go for a drug candidate, in PyTorch
A go/no-go clinical decision built as Bayesian logistic regression in PyTorch. With 250 trials the Bayesian and frequentist estimates agree; the credible interval is the payoff, and the prior earns its keep when trials are few.
VIDRA: genetics as a dose, not a yes/no
A quick take on VIDRA from the Open Targets team, which estimates the genetic dose-response curve between gene activity and disease.
Geneformer from scratch, part 4: does it capture disease?
The hard test for a from-scratch Geneformer: read IBD disease state off the frozen embedding, see why it loses to PCA, and test what narrows the gap. Scale, weight tying, value-aware tokens.
Geneformer from scratch, part 3: does it capture cell types?
Test a from-scratch Geneformer: freeze the model, read cell type off its embedding on held-out patients, and race it against a plain PCA baseline.
Geneformer from scratch, part 2: a tiny BERT for cells
Build and train a tiny BERT for single cells from scratch: the transformer architecture, self-attention, and masked-gene prediction, with real code and results.
Geneformer from scratch, part 1: a cell is a sentence
Build Geneformer from scratch: turn scRNA-seq expression into a ranked sentence of gene tokens. Tissue-aware QC, the median trick, the gene vocabulary, and the patient split.
Three ways an LLM in the loop breaks reproducibility
A bioinformatician's view: the decision trail, the opaque code trail, and layered non-determinism, the three reproducibility problems that are new when an LLM writes (or runs) your analysis.
How to install a Claude Code Skill — Methods drafter walkthrough
How to install a Claude Code Skill at ~/.claude/skills/<name>/SKILL.md so every future Claude Code session loads it automatically — no re-pasting. Methods drafter walkthrough.
How to add a reusable Python tool to Claude — PubMed search example
How to add a reusable Python tool Claude can call from any notebook or claude CLI session. PubMed search walkthrough with the install pattern.
How to write your first Claude Code Skill — Methods drafter example
How to write your first Claude Code Skill — a persistent rule Claude loads automatically. Methods section drafter walkthrough, with the full SKILL.md.
Set up the Claude API on macOS or Linux — venv, API key, .env
Set up the Claude API on macOS or Linux: Python venv with the Anthropic SDK, an API key from console.anthropic.com, and a .env file. Cost notes and troubleshooting included.