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.

·12 min

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.

Clinical trialsBayesian statisticsDrug discoveryCrohn's diseaseTYK2
·11 min

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.

Bayesian statisticsDrug discoveryPyTorchUncertainty quantificationClinical development
·3 min

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.

Human geneticsDrug discoveryBayesian statisticsOpen TargetsPaper notes
·16 min

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.

Single-cell RNA-seqGeneformerFoundation modelsLinear classifierPCAIBDWeight tyingTutorial
·14 min

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.

Single-cell RNA-seqGeneformerFoundation modelsLinear classifierPCACell typesTransformersTutorial
·15 min

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.

Single-cell RNA-seqGeneformerBERTTransformersSelf-attentionMasked language modelingFoundation modelsDeep LearningTutorial
·12 min

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.

Single-cell RNA-seqGeneformerFoundation modelsTransformersDeep LearningIBDTutorial
·7 min

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.

ReproducibilityClaude CodeBioinformaticsAIOpinion
·11 min

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.

FoundationsBeginnerClaude CodeSkillsScientific Writing
·12 min

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.

FoundationsBeginnerClaude APIToolsPubMedClaude Code
·9 min

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.

BeginnerClaude CodeSkillsScientific Writing
·5 min

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.

FoundationsSetupClaude APIReference