Cytometry - compensation, gating, and the readable workspace
Lesson 6 of 6 · Your instrument, end to end
1 · Learn the move · Template pattern
PARALLEL TRACK - complete this one only if pl1 pointed you here. Flow cytometry hides its record in plain sight: an FCS file's text segment - parameters, voltages, acquisition context - reads as plain text and almost nobody looks; the data segment does not read at all - that is what flowCore, FlowKit, or fcsparser are for. Your FlowJo .wsp is XML: a legible record of every gate a human drew. The template pattern turns this into discipline: a fixed gating-record template - population, parent, channels, gate coordinates or method, compensation source, event counts in and out - extracted from the .wsp rather than transcribed from memory. Fill it twice and gate drift becomes a diff instead of an argument. The non-negotiable: compensation. Uncompensated data gates cheerfully into nonsense, so the spillover matrix travels with every analysis - no exceptions.
Author my cytometry record pipeline: (1) a script using [fcsparser/FlowKit] that extracts from each .fcs the parameter list, $PnN/$PnS names, event count, and the spillover matrix from the text segment; (2) a .wsp parser that fills my gating-record template per population: POPULATION / PARENT / CHANNELS / GATE METHOD+COORDS / COMP SOURCE / EVENTS IN -> OUT / PERCENT OF PARENT; (3) a drift check that diffs two experiments' filled templates gate by gate, flagging coordinate shifts beyond [tolerance]; (4) a hard stop with a named error if any sample lacks a spillover matrix. Anything not in the files = [NEEDS: ...], never reconstructed from what my panel usually looks like.
2 · Your turn. You write the prompt
Two months of a treatment study produced eight .fcs batches and one evolving FlowJo workspace, and your PI just asked whether the live-cell gate moved between March and May. The workspace knows - it is XML. Build the extraction that fills a gating template from each timepoint and diffs them, instead of eyeballing screenshots side by side.
Remember: the AI sees only your prompt, not this page. If the situation isn't in your prompt, it doesn't exist.
Optional. These shape the output when you run your prompt below, not your score.