T18-L03 · AI for lab data · Level 3 Builder · 16-minute read, plus 3 hours of doing

The count only one person can make

Three months ago you learned to count cells with Cellpose (T18-L01 · Count Cells With a Ready-Made Model and Check It by Hand). It worked so well that your group now uses your counts every week. There's a catch: the counts come from you, clicking through the interface with settings you remember. When you were away for a week, a colleague did the counting. Her numbers were about ten per cent higher. Nobody could say whether the cells had changed, her settings had changed, or the model had.

In an imaging lab this is the weekly count behind a figure. In a molecular-biology lab it's the nuclei count every transfection is normalised to, across hundreds of wells. In both cases other people's results now depend on something you built, and it only works when you're in the room.

This book shows you how to turn the clicks into a small pipeline your group can rerun: a script, a settings file, a pinned software version and model file, a sample dataset with known-good counts, a check that says PASS or FAIL, and a README. You'll write the script with an AI coding assistant, and you'll learn what to check in what it writes. You are at Level 3 Builder: colleagues depend on this pipeline, so when it's wrong, their results are wrong too. The sample check is how they know it isn't.

After this you can

  • Turn a manual Cellpose count into a script that reads every setting from one file.
  • Pin the software version and the exact model file, so a rerun uses the same model.
  • Ship a sample dataset with known-good counts and a check that says PASS or FAIL.
  • Write a README that a colleague can follow without asking you.
  • Use an AI coding assistant to write the script, and catch the code it writes for an older version.

Before you start