Compensation

Compute spillover from single-stain controls, apply it to your samples, and check the matrix against the controls before you trust a single gate.

The Compensate view

The Compensate view of the PBMC example: the controls section with negative reference and method, the matrix, and the check against 14 single-stain controls listing CD8 into CD4 with a 4.77% residual and three viability pairs flagged as autofluorescenceThe Compensate view of the PBMC example: the controls section with negative reference and method, the matrix, and the check against 14 single-stain controls listing CD8 into CD4 with a 4.77% residual and three viability pairs flagged as autofluorescence
The file matrix of the PBMC example, checked against its 14 single-stain controls.

The view has three parts: Compute from controls on the left; the workspace's Matrices and the selected one's editor; and Diagnostics for the selected matrix. Each sample uses one matrix at a time: the one from its file ($SPILLOVER, SPILL, $SPILL or $COMP), one of the workspace's, or none. The inspector shows a sample's matrix, and the sample list's Compensation menu changes it for a selection.

Computing spillover from controls

  1. Add the single-stain controls (cells or beads) and an unstained control to the workspace, and set their roles.
  2. In Compute from controls, check each control's Stained channel. CytoWeave guesses it from the file name; Set stained channel corrects it.
  3. Choose the Events used: a scatter gate excludes debris.
  4. Choose the Negative reference: the dim events of each control, or the unstained sample. Use a negative of the same kind as the positives (beads with beads, cells with cells).
  5. Choose the Method: Median difference (FACSDiva, FlowJo), or Robust regression (AutoSpill-style), the slope of a robust fit of each detector on the stained channel, as AutoSpill computes it.
  6. Click Compute spillover. The new matrix appears under Matrices, with a warning for any control that needs attention: fewer than 200 positive events, positives that are dim or not brighter than the negatives, or many events off scale.
  7. Click Apply to… and choose all samples, the current sample, the selected samples or a group.

Against the true spillover of the PBMC example, computed matrices are within 0.02 of the truth; on 15 real single-stain controls from a BD LSRFortessa, every entry is within 0.015 of FACSDiva's.

Checking a matrix against the controls

A spillover matrix can look plausible and still be wrong, and a wrong value bends every population that expresses that marker. Check against the controls is the definitive test: it compensates each single-stain control with the selected matrix and measures how far its positive events still sit above (or below) its negatives in every other detector.

When every control is clean, the check says so: no residual above 0.5% in any other detector.

Try it. The PBMC example's file matrix under-compensates APC into Alexa Fluor 700 (CD8 into CD4). The check finds that pair first and suggests about 15.8%; the true value is 15.7%.

Hint from the current sample is a weaker check for when there are no controls: it compares bright and dim events of each channel in the current sample. Biology differs between those events too, so treat its suggestions as hints.

Spreading and pair plots

Editing a matrix

New matrix starts from the identity; Duplicate and Edit a copy start from an existing one. Values are percent spillover, row fluorochrome into column detector. Type a value, or focus a cell and use the mouse wheel (⇧ for 1% steps); plots follow live, and every edit can be undone. Matrices also come from FlowJo workspaces and Gating-ML files, and travel with exported workspaces and Gating-ML.

Where to go next