12 — Gating

How a population is drawn from a cloud of events.

+ The questionA file holds a million events and a report gives a handful of percentages. Who draws the boundaries between them, how much does the display decide, and how many events make a result?

A gate is a decision about a cloud

After compensation, each event is a point in a space with one axis for every detector and pulse measurement. Cells of one kind form a cloud in that space, because they carry similar amounts of each marker and scatter light similarly, and the job of analysis is to say which events belong to which cloud. The traditional tool is the gate: a boundary drawn on a plot of two parameters, which keeps the events inside it and passes them to the next plot.

A sequence of gates is called a gating hierarchy. A typical analysis first plots time against a scatter or fluorescence signal and removes stretches where the flow was disturbed; a 2021 set of guidelines describes removing "possible clogs" this way. The analysis then removes doublets with a plot of area against height (Chapter 9). Next it removes dead cells with a viability dye and selects a lineage, a major family of related cell types such as T cells, before dividing that lineage into subsets. Every percentage in a report is a fraction of some parent gate, so "8 % of CD4 T cells" and "8 % of lymphocytes" describe very different numbers of cells.

32 — A gating hierarchy
SSC TIME clog removed FSC-A FSC-H VIABILITY CD45 SSC CD3 CD8 CD4 STABLE FLOW % of parent SINGLETS % of parent LIVE LEUKOCYTES % of parent T CELLS % of parent CD4, CD8 SUBSETS % of parent 8 % of CD4 T cells ≠ 8 % of lymphocytes schematic
ReadoutFocal detail
Plate 32 — Gates are applied in sequence, from stable flow and single cells through live cells and a lineage to subsets. Every reported percentage is a fraction of a parent gate, so the denominator must be stated.

The early gates are not formalities. As Chapter 9 showed, the doublet gate works only for particles comparable to or larger than the height of the beam, and the sorting guide of Chapter 6 names bacteria, yeast and platelets as exceptions. Vesicles are all far smaller than the beam, so for them the doublet gate is unavailable, and the problem it solves for cells reappears as the swarm detection of Chapter 19.

The display can move the boundary

A gate is drawn on a picture, and the picture depends on how the axis is scaled. Compensated data contain values near zero and below it, which a logarithmic axis cannot show (Chapter 10). Chapter 9 quoted the 2006 paper on the log artifact: the false peak and the pile-up of events at the baseline that log displays produce. The same paper described how log displays make compact populations look split in two. The paper's remedy is the logicle transform: a function that maps each value to a position on the axis, linear around zero and logarithmic at high values, with a parameter that sets the width of the linear region. Many analysis packages use the arcsinh transform, and so does mass cytometry, which tags antibodies with metal atoms instead of dyes and detects the metals by their mass (Chapter 24). The arcsinh transform has the same shape as the logicle, linear near zero and logarithmic at high values. Its parameter, called the cofactor, sets roughly where the linear region ends, in the data's own units, and is conventionally 150 for fluorescence and 5 for mass cytometry.

One file, two displays, two answers

For the material behind this guide, one exercise used a public data set of stained control blood cells that is distributed with open-source analysis software. A single file of 61,832 events was displayed with two logicle transforms that differed only in the width of the linear region. A gate was placed at the same position on the screen in each. Above it lay 2.413 % of events in one display and 0.996 % in the other: a 2.4-fold difference in a reported percentage, with no change to a single measurement. The figures come from one file; the size of the effect depends on where a population sits relative to zero.

33 — One file, two displays, two answers
NARROW LINEAR REGION 0 10² 10³ 10⁴ 10⁵ 2.413 % ABOVE WIDE LINEAR REGION 0 10³ 10⁴ 10⁵ 0.996 % ABOVE × 50 gate at the same screen position 1 10² 10⁴ log display: pileup at the baseline 2.4-fold, with no change in the data schematic histograms; percentages from one public file of stained control cells, 61,832 events
ReadoutFocal detail
Plate 33 — The transform does not change the data, but it moves where a boundary drawn on screen falls. In one file of 61,832 events, a gate at the same screen position caught 2.413 % on one display and 0.996 % on the other.

The transform does not change the data, but it changes where a person's eye places a boundary. A boundary placed in display coordinates therefore moves with the display. In a 2010 study, transforms with parameters fitted to the data reduced the misclassification of events compared with default settings. The transform and its parameters are therefore part of the analysis and must be recorded with it, as MIFlowCyt asks.

A gate drawn on screen moves with the display, the transform and the scale

A gate set by eye on one display, at one transform setting, on one instrument's scale moves when any of the three changes. Copying a gate template from one file to another without checking that the populations sit in the same place can cut through a population or include part of its neighbor. The error then appears in the report as a change in biology.

People gate differently

Manual gating is skilled judgment, and judgments differ. Staff of one manufacturer led a 2005 study that sent the same samples to many laboratories, and the manufacturer also supplied the reagents. For a measurement of responding T cells, the coefficients of variation between laboratories ranged from 17 to 44 %, and the authors concluded that analysis, "particularly gating," is a significant source of variability. Analyzing all the files centrally reduced the inter-laboratory variation by 5 to 20 %. The variation depended on how rare the population was: 18 to 24 % for samples with more than 0.5 % of cells responding, and 57 to 82 % for samples with fewer than 0.1 %.

Standardized panels and central analysis narrow the spread. A 2016 study used five standardized eight-color panels across nine laboratories, and one manufacturer's staff were among its authors. The study's authors found variation below 10 % across sites for large, easily identified subsets such as CD4 T cells, and higher variation for dim subsets and for those reached through many gates. Software itself is a variable as well. In the exercise described in the note on displays, two programs were given the same workspace, a saved analysis with its gates already drawn. They gave different counts for 44 of 48 combinations of population and sample, by up to 3.8 %, for a reason not yet traced.

Algorithms, clusters and maps

Automated methods replace hand-drawn boundaries with rules applied identically to every file. In a 2013 community benchmark, 14 groups submitted 36 sets of results. Many algorithms agreed with expert gating at a level the organizers judged sufficient for reliable use, and combining several algorithms scored better than any single one. In the benchmark's sample-classification part, 12 submissions classified all 359 samples of an acute myeloid leukemia data set correctly; half of the samples had been supplied with their known classes for training. The authors of the 2016 nine-laboratory study found that automated gating matched central manual analysis "for all tested panels." Benchmarks of this kind score algorithms against expert manual gates, so they measure agreement with people rather than truth.

Clustering goes further and groups events without predefined gates. The authors of a 2016 comparison of 18 clustering methods found one of them, FlowSOM, best or near best on every data set, and given its speed they recommended it as a first choice. Clusters are often shown on two-dimensional maps made by the methods called t-SNE and UMAP, which place similar events near one another. Such maps distort. A 2019 analysis found that the relative position of clusters on a t-SNE plot is "almost arbitrary" and depends mostly on random initialization, the random layout from which the method starts. A 2023 study showed that reducing many dimensions to two inevitably distorts distances. Both studies come from single-cell genomics, and the point carries over by analogy: a map shows which events are similar, not how far apart populations are.

What n is

A tube may contain a million events, but they come from one sample of one donor, processed once. The events measure that sample precisely, but they cannot show how a second donor, or a second preparation from the same donor, would differ. Treating events as independent replicates is called pseudoreplication. A 1984 paper defined it as using statistics to test for effects when the replicates are not independent, and the same paper reported it in about a quarter of 176 ecological studies. In cytometry the replicate is the donor, the patient or the independent preparation, and the events within a tube decide only how precisely each sample's frequency is known.

That within-tube precision follows the counting statistics of Chapter 8, applied to events rather than photoelectrons. What matters is the number of events in the population of interest, not the total.

How many events a rare population needs

A frequency estimated from r events of interest has a counting spread of about 1 ÷ √r. One hundred events give about 10 %, four hundred about 5 %. For a population at 1 in 10,000 cells, collecting 100 of them takes 1,000,000 events; at 1 in 100,000, it takes 10,000,000. That is why tests for residual disease, which look for the few abnormal cells left after treatment, acquire millions of cells per sample (Chapter 22). The arithmetic is derived for this guide and assumes events arrive independently.

34 — How many events a rare population needs
0 10 % 20 % 30 % 10 100 1,000 10,000 COUNTING SPREAD EVENTS IN THE POPULATION (LOG) 32 % 5 % 1 % 1 ÷ √r 10 % count the population, not the total TOTAL EVENTS TO COLLECT 100 OF THE POPULATION 1 in 10,000 → 1,000,000 events 1 in 100,000 → 10,000,000 events derived; events assumed independent
ReadoutFocal detail
Plate 34 — A frequency estimated from r events has a counting spread of about 1 ÷ √r: 100 events give 10 %. Collecting 100 events of a population at one in 10,000 takes a million events; at one in 100,000, ten million.

The 2005 study's figures make the same point from the other side: the rarest populations were the least reproducible between laboratories. Raw intensities are no easier to compare between instruments than the percentages of rare populations are between laboratories. In the 2024 study of Chapter 5, scientists at the US National Institute of Standards and Technology found that the raw fluorescence intensities of the same cells varied widely between four instruments, while values converted to antibodies bound per cell agreed closely. That contrast is the case for calibration made in Chapter 17.

Write the analysis down as a specification

For an assay, document the gating hierarchy with example plots, and name the control that sets each boundary (Chapter 11). Record the transform and its parameters, the minimum number of events in the reported population, and the software and its version. Validate the software as part of the assay, and treat a change of template, transform or version as a change to be verified. In a study design, count donors or independent preparations as n, never events.

+ What this chapter established
  • Gates select events in sequence, from time and doublets through viability and lineage to subsets, and every percentage is a fraction of a parent gate.
  • The transform changes how populations look and where a boundary drawn by eye falls: one file gave 2.413 % or 0.996 % with no change in the data.
  • Gating is a major source of variation between laboratories; standardized panels, central analysis and automated gating reduce it, measured against expert gates.
  • Events are not replicates: n is the number of donors or preparations, and a rare population's precision depends on how many of its own events were counted, and 100 events give a counting spread of about 10 %.
Created with Claude (Anthropic).
Educational reference material, not engineering, regulatory or clinical advice. Product and company names referenced are the property of their respective owners.