A CSV-to-XML protocol generator for an automated protein purification robot, paired with an Electron GUI that wraps it.
Automated protein purification is normally driven by a proprietary GUI where a scientist configures every step of a multi-hour run by hand — buffer flows, wash volumes, gradients, elutions, plate handling — and saves the result as a machine-specific XML protocol. That workflow doesn't scale to the kind of parameter sweeps and per-sample customization real research needs.
AutoWriter replaces the GUI drag-and-drop with a plain CSV. Rows describe the fluid steps; columns describe the parameters. Save the file, and a headless engine translates it into a hardware-executable XML protocol — ready to load into the robot. ProteinMakerApp is the Electron desktop wrapper around it: a polished editor + live protocol preview + one-click XML generation, all built for chemists who don't want to think about command lines.
Pure Python (stdlib + win32file for Windows file locking), PyInstaller-packaged as a single standalone .exe. The main ProtocolBuilder is ~1,860 lines and handles the interesting orchestration work:
DeckPlanner allocates well positions across a 4×5 deck grid (24-, 48-, 96-well plates and 50 mL tubes), scaling with sample count and auto-splitting volumes across wells when a plate can't hold the requested elution volume.3(5),2(4) expands to 5,5,5,4,4, one number per fractionation well."app speed", "Wash A1 speed", etc.) is registered in the XML's <globalparameters> so the operator can tweak them from the instrument's UI without regenerating.All of that gets serialized to a very specific XML dialect the robot understands, and the whole thing is verified against a canonical-diff test harness — generated XML is compared against golden files, with an --analyze mode that groups diffs by normalized pattern to catch systematic changes.
An Electron + TypeScript app that calls AutoWriter's cli_bridge.py as a subprocess and gets JSON back {xml, timing, errors}. It gives chemists a proper editor experience — syntax-aware CSV, live protocol preview, estimated run duration — without dropping them into a terminal. The two projects share knowledge of the CSV schema and the Protein Maker XML format, but neither depends on the other at runtime: AutoWriter runs headless in any pipeline; the app is a nice-to-have front door.