Skip to content

The gating graph

The central panel of PlatAnJr is a diagram. Each box is a node - usually a plot - and the wires between them carry populations. This is the whole analysis: what you see in the panel is exactly what gets saved as the project.

Node
A box that does something with a population. Most nodes are plots: a scatter plot, a histogram, a ribbon. Others are logic nodes, well lists or specialised analyses.
Gate
A selection defined on a node - a polygon on a scatter plot, a band on a histogram, a set of wells. Gates belong to the node they were drawn on.
Pin
A small coloured box on the edge of a node. Left edge = inputs, one per gate feeding the node. Right edge = outputs, one per gate the node produces. A pin's colour is the gate's colour, and its glyph is a thumbnail of the gate's shape.
Link
A wire from an output pin to a node. Populations flow left to right.

A node with no input links sees every event in the dataset. A node with one input link sees only the events inside that gate. A node with several input links sees the union of them.

Building the graph

Create a node

Use the project panel toolbar along the bottom of the panel:

Button Node
Scatter Plot Two-parameter chart node
Histogram One-parameter chart node
Contour Chart node drawn as contours
Ribbon Plot Ribbon plot - one histogram per parameter
Well vs Parameter plot Well ribbon plot - one histogram per well
SSM Spillover spreading matrix
Cell Cycle Cell cycle
Embedding Embedding node - tSNE, UMAP, autoencoder, PCA or FlowSOM of its input
Spectral Unmixing An Unmixer node - see Spectral unmixing
Phasor Adds phasor parameters and two chart nodes for them
AND / OR / XOR / NOT Logic nodes
FlowSOM FlowSOM clustering, with per-well statistics
Phenotype Phenotyping - the phenotypes of a marker panel and the cells they could be
PeacoQC PeacoQC - each well's acquisition quality, with margin and doublet filters

New nodes appear at the bottom-left of the canvas. Drag them where you want them. Double-clicking a cell of the Plot matrix (main toolbar) adds a chart node plotting that pair.

Connect two nodes

Drag from an output pin on the right edge of one node and drop it on the body of another. A link is drawn, an input pin appears on the receiving node, and it immediately replots against the gated population.

Dropping onto a node that already receives that gate does nothing - a gate can only feed a node once.

In Arrows mode a small ✕ box is drawn at the arrowhead end of every link. Click it and the link goes, together with the input pin it fed. The gate itself is untouched.

Switch between arrow and curve drawing with the Diagram Style button, which toggles between Arrows and Bezier. Bezier mode also hides the pins, which is what you want before copying a diagram into a figure.

Bezier links are drawn under the nodes, arrows over them. Each node keeps its pins in the order their links arrive, so links do not cross next to it, and a link that goes back to a node further left loops round and crosses over between the two nodes rather than through them.

Pins stick out of their nodes, so two nodes placed close side by side can have their pins crossed - the end of the output pin past the end of the input pin - and the link between them then loops round as a link going back does: over the top of both nodes, or under them, when one is much taller than the other. With Links without Loops ticked on the MoreOptions tab such a link is one curve instead, as in the cell diagram: level out of the output pin, level into the input pin, an S between them. So is a link to a node below or above its own that it overlaps. Only a link to a node standing wholly to the left of its own still loops round. The ✕ box stays at the end of the link either way, and the nodes reorder their pins to suit.

Delete a node

Click the red ✕ at the right end of the node's header. The node goes at once, without asking, together with the gates that belong to it and the links to and from it.

Moving around the canvas

Action Result
Drag a node's header or border Move that node
Left-drag on empty canvas Draw a selection rectangle
Left-drag inside a selection rectangle Move every node the rectangle touches
Click once on empty canvas Clear the selection
Right-drag on empty canvas Pan the whole diagram
Scroll bars on the right and bottom edges Scroll
Click or drag in the locator Move the view there

The locator, in the panel's bottom-right corner, draws the whole graph small, each node a block, with the part in view framed. Click in it to centre the view there, or drag to move the view around. It is hidden while the graph is empty, while a node fills the view, and when the panel is too small for it.

Undock Project Window floats the panel in its own window - useful on a second monitor. The window has a taskbar button of its own and opens maximized; the main window shrinks to its toolbar and bottom panel, and moves to another screen when there is one. Click the button again, or close the floating window, to dock it back, and the main window returns as it was.

Filling the view with one node

The maximize box in a node's title bar, between the caption and the red ✕, fills the panel's view with that node, over the rest of the graph - the way to work on a large ribbon or FlowSOM node without undocking. Click it again and the node goes back where it was, moved with the graph if you scrolled meanwhile. One node fills the view at a time, and it follows the panel as it is resized.

It is a way of looking, like scrolling: the project keeps the node's normal place and size, and nothing counts as a change to save.

Taking a picture of the graph

Screenshot - the camera at the right end of the project panel toolbar - takes the whole graph as one picture, the nodes scrolled out of view too, puts it on the clipboard and shows it in a Snap window with a Save button. A graph larger than the largest picture the graphics card can make is scaled down. The locator is not in the picture.

The active node

Click a node's body (not its chart) to make it the active node. The active node is drawn highlighted, and two things follow from it:

  • The plate heat map colours each well by how many of that well's events reach the node - that is, by its input population. See Heat map.
  • Some operations use the active node's population.

Click the same node again to deactivate it and return the heat map to showing all events.

The node menu

Click the small box at the left end of a node's header to open its menu:

Item Effect
Smooth Smooth the curves of a histogram node - every line on it, the dark matter and the per-gate lines too
Create Gates Automatic gating - quadrants on a 2-D plot, bands on a histogram. See Gate types
Show Dark Matter Also draw the events that did not reach this node, in grey, behind the ones that did
Histogram as line Draw histograms as a line instead of filled bars
Show gate colors On a 2-D chart, paint each event in the colour of the input gate it came in by, instead of the density colours
Export Choose an output folder and a parameter list, then write one CSV per gate on this node, named after the gate and holding that gate's events
Save Write this node - its gates and its settings - to a .gat file. The dialog opens in the plate's INFO folder and offers the gates' names as the file name (Monos+Lymps.gat)
Load as New Gate Read a .gat file back in as a new node on the canvas. The dialog opens in the plate's INFO folder too
Clone Add a copy of this node - its gates and its settings - as a new node, a little below and right of it. The copy has no input links, so it sees every event until you connect it
Save Gated Community Write the events of one of the node's gates out as a new plate - see below

The menu follows the node: items that do not apply to it - Smooth on a 2-D plot, Show gate colors on a histogram, Export on a node without gates - are greyed out.

Clone and Load as New Gate keep gate names unique: a gate that comes in under a name another gate already has gets a number - Monos becomes Monos_1, or Monos_2 when Monos_1 is taken too. See Saving and reusing gates.

You can also right-click the node body: right-click on the caption renames the node, and right-click on its colour patch sets its colour.

Show Dark Matter

Turning this on is the quickest sanity check in the whole application. If your gated population sits in a corner of a cloud that is mostly grey, you have gated on a tail. If the grey is somewhere else entirely, your gating tree is doing what you intended.

Save Gated Community

Writes the events of one of the node's gates - it asks which when the node has several - as a new plate: one FCS file per well, holding only the events in that gate, in a subfolder of your data folder named after the gate. The INFO folder is copied along with it, so the result opens as a plate in its own right.

This is how you hand a cleaned-up population to another tool, or split a plate into subsets for separate analysis.

Colour

Every gate has a colour, and by default events belonging to a gate are drawn in that colour on every plot, not just the one the gate was drawn on. That is what makes a gating strategy readable: draw a lymphocyte gate on FSC/SSC and the lymphocytes light up in every downstream plot at once.

  • Show gate colors on the node menu paints a 2-D chart in the colours of the gates its events came in by.
  • MoreOptions ▸ Color Scheme for Gates chooses the palette new gates are taken from.

When an event belongs to several gates, the one with the higher colour priority wins.

Saving

The graph, its gates, its node positions and the scales it uses are all one project file. See Projects.