genomicsblog

Add a note

Rob Patro

What they did

Patro, a self-described skeptic, describes a series of ports and features done with AI coding agents in his lab's genomics software: the mim index core, a Cuttlefish in-memory tile collation feature (about five times faster), sshash and piscem translated to Rust. Claude Code (Opus 4.6) translated the piscem mapping tool in about a day and a half, wrote the binary-file equivalence test harness and unit tests, instrumented a slow index build and fixed a cache-incoherent access pattern. He reports 100 percent concordance between the C++ and Rust versions on non-trivial test data across assay types.

In their words

"It was not a “one shot” solution; there were some hiccups in how multi-part archives were handled."

"In one step, Claude replaced what was an efficiently encoded Elias Fano sequence with O(1) select support with a Vec with a binary search."

Lessons they draw

  • Watch the process: he caught a silly data-structure substitution only because he was reading along (Patro).
  • Where the agent introduced a concurrency bug he located the cause himself; its fix was sub-optimal until he explained his better one (Patro).
  • Despite explicit instructions to follow the C++ data structures, Claude invented a different encoding; he kept it on a branch and had it produce the equivalent (Patro).
  • Have the agent write the equivalence test harness and tests, and ask for a phased implementation plan with correctness criteria per phase (Patro).

Limits of this account

Software-porting tasks in the author's own codebases; I read the post in two parts and did not read the final sections.

Search the collection

↑ ↓ move · Enter open · Shift+Enter original source · Esc close · Search index for agents

Keyboard shortcuts

Single keys work when you are not typing and no dialog is open. Turn them off if stray key presses move the page. ⌘K / Ctrl+K and Esc keep working.

/
Search the collection
⌘K / Ctrl+K
Open or close search
?
Show these shortcuts
h
Home
l
Lessons
a
Accounts
r
Replications
p
Papers
g
Guides and tools
d
Timeline
b
Bookmark the record you are reading (press again to remove it)
s
Your saved list and notes
← →
Previous and next record on an account, lesson, replication or paper page, and in a quick look
m
Switch between system, light and dark theme
t
Back to the top of the page
Open full page