Skip to main content

Flow Cytometry Clustering, UMAP and t-SNE

Use these tools to map a large panel onto two or three axes, find populations without drawing every gate, and measure cell cycle, proliferation, acquisition stability, and marker shifts between populations. They all run in your browser and use no compute usage. Clustering and dimensionality reduction can also run on a server, and that's the only part of this page that uses any.

Dimensionality Reduction

Dimensionality reduction maps a panel with many markers onto two axes you can plot, or three with UMAP. Click Dim. Reduction in the Analysis section of the sidebar and choose a method.

MethodWhat it is
UMAPUniform Manifold Approximation and Projection. It keeps local clusters together and keeps their positions relative to each other.
t-SNEClassic t-SNE, with perplexity and learning rate settings
PCAPrincipal components. Linear, fast, and interpretable

To run it, follow these steps.

  1. Check at least two parameters.
  2. Change the settings if you want to. The defaults are set from the number of events you have, so run with them first and tune afterward.
  3. Click Run UMAP, Run t-SNE, or Run PCA.

On a large file, Subsample starts below the file's event count, and the dialog box shows how many events the run will use.

When the run finishes, Conspecta adds a scatter plot on the new axes. The axes are UMAP-1 and UMAP-2, t-SNE-1 and t-SNE-2, or PC1 and PC2. They also appear under Computed in every axis menu, so you can put them on other plots or gate on them.

Each file keeps its own result from each method, so you can run UMAP on one file, then on the next, and step between them. Running a method again on the same file replaces that file's result.

A result only draws on the events it was computed from. When you switch to a file the run didn't include, the plot names the file it ran on and shows its settings, with three ways on:

  • Run on and this file's name runs the same settings on the file you're looking at, without the dialog box.
  • Show and the other file's name switches back to the file it ran on.
  • Run on all N samples together opens the dialog box on Working set with the same parameters, for one map you can compare across files.

Results are saved with the analysis, so a reopened analysis draws each plot on the files it ran on. If you change the compensation, the plot asks you to run it again. Export Figure leaves out a plot with nothing to draw for the file you're looking at, and says which one.

UMAP in 3D

With UMAP picked, the dialog box shows Dimensions. Choose 3D to add a third axis, UMAP-3, and the result is drawn as a 3D scatter on UMAP-1, UMAP-2 and UMAP-3. Turn it to see which islands sit apart in depth, then use Make 2D plot of this view to gate on the two axes you're facing. Plotting Three Channels in 3D covers turning the plot.

Clustering

Clustering finds populations for you, in place of gates you draw. Click Clustering in the Analysis section of the sidebar. Once the analysis has a run, it opens on the list of runs, where New clustering sets up another.

Choosing an Algorithm

AlgorithmWhat it doesParameters it takes
K-meansSplits events into the number of clusters you set. Fast and repeatableUp to 64
DBSCANFollows dense regions of any shape and leaves stray events as noiseUp to 8
SOM clusteringSorts events onto a map, then merges the map into populations, in the style of FlowSOMUp to 64
Graph clusteringGroups events with their nearest neighbors and finds the cluster count itself, in the style of PhenoGraphUp to 64
DensityFinds the busiest regions on a two-parameter plot and suggests gates around themThe two axes you pick

SOM clustering and Graph clustering are Conspecta's own implementations in the style of FlowSOM and PhenoGraph, and the dialog box says so. Describe them that way in a methods section.

DBSCAN takes at most eight parameters, because past eight dimensions the distances between events stop separating populations in a way you can trust.

All checks your fluorescence channels, up to the algorithm's limit, and leaves out scatter and time.

Run It and Read the Result

  1. Choose an algorithm.
  2. If you have more than one file loaded, choose what to run on under Run on. Running Across Several Files explains the choice.
  3. Check the parameters and change the settings if you want to.
  4. Click Run K-means, or the run button for the algorithm you chose.

When the run finishes, the dialog box shows each cluster with its event count and its share of the total. Type in the Name column to rename a cluster.

To turn clusters into gates, check them, choose the axes under Project onto, and click Create N gates. Each cluster becomes a polygon gate in its cluster's color, and the gates appear in every statistic. The line under the axes names the plot the gates go on. That's the run's own cluster plot when it shows those axes, otherwise another plot of them, or a new one if the analysis has none.

A cluster that already has a gate from this run reads Gated and has no checkbox, so opening a run again never makes the same gate twice. Create N gates counts only the new ones.

Add to and Export CSV take the result out of the dialog, and each includes the cluster names you've typed.

  • Add to, then Figure, charts each file's share of each cluster on a figure. It appears only for a working-set run, because one file's cluster sizes have nothing to compare against.
  • Add to, then Notebook, adds a line naming the run and a table of the clusters to the end of a note you pick, or of a new one.
  • Add to, then Sheet, creates a sheet in the project with the same numbers.
  • Export CSV downloads the clusters and their sizes. For a run across several files, it downloads each file's share of each cluster.

The Cluster Plot

Each run adds a scatter plot colored by cluster. Its title names the algorithm and the channels, such as "K-means clusters · CD3, CD4". Click the plot's title bar, where it reads View run, to open the run that made it. To see the clusters apart, change its axes as you would on any plot, for example to UMAP-1 and UMAP-2 after a UMAP run.

Each cluster has its own color, the same one as in the run's table, and its number is printed where its events are densest. To hide the numbers, open the plot's color button, which reads Cluster ID, and clear Show cluster numbers. To see one cluster's events on their own, make gates from the run and double-click the cluster's gate.

Every cluster plot shows the run it's titled after. Running again adds a new plot and leaves the earlier ones as they were.

The colors only show on the files the run covered. Switch to another file and the plot turns plain, and its title bar reads Ran on and the file it ran on. Click it for three ways on:

  • Run on and this file's name runs the same algorithm and settings on the file you're looking at, without the dialog box. Each file then keeps its own clusters on the same plot, and you can step between them. The title bar reads Running and the algorithm until it finishes.
  • Show and the other file's name switches back to the file it ran on. If the plot holds runs on several files, it goes to the newest one.
  • Run on all N samples together opens the dialog box on Working set with the same settings. Cluster numbers from separate runs don't match between files, and one run across all of them gives every file the same clusters.

A plot reads Not colored in these cases.

  • Compensation was applied or removed after the run, so the assignments describe values the events no longer have
  • The run was saved before Conspecta kept assignments

Reopen a Run

Clustering in the sidebar opens on Clustering runs on this flow analysis, newest first, each with when it ran and who ran it.

ToDo this
Open a run's recordClick it in the list, or click its cluster plot's title bar. The record shows who ran it and when, how long it took, whether it ran in your browser or on the server, the settings, and the clusters with the names you gave them
Go back to the listPress All runs
Start another runPress New clustering. It starts from the default settings, so the run you were looking at stays as it was

An analysis keeps its 50 most recent runs, including one whose plot you later updated and one the assistant recorded. A run a plot still uses is kept however old it is. Runs pooled over many files take more room, so an analysis full of them keeps fewer.

To recompute the run you're looking at with its own settings, click Re-run K-means (the button names the run's algorithm). The colors come back on the same plot.

When you start a run from a cluster plot, Result goes to sets where the result goes. A new plot is the default. Choose Replace the colors on that run to recolor its plot instead. A run you start from the sidebar always gets a new plot.

Running Across Several Files

If you run a reduction or clustering on two files separately, you get unrelated axes, and each file numbers its clusters on its own. To compare samples, run them together.

When more than one file is loaded, both dialog boxes show Run on. Leave it on This file to run on the file you're looking at, or choose Working set to include every loaded file. Conspecta takes the same number of events from each file and runs the algorithm once over all of them, so every file is drawn on the same axes and inside the same cluster boundaries. The combined events exist only for the run, and no combined file appears in the sidebar.

Events per file sets how many events come from each file. An equal draw keeps a tube that ran four times as long as the others from dominating the map.

A working-set run has a few rules.

  • You can pick only parameters that every file in the set has, so the list gets shorter when you switch to Working set. A warning names the missing parameters and the files that lack them.
  • With compensation on, each file's events are corrected before they're combined, so the run sees the same values your plots show. If the matrix names a channel that one of the files doesn't have, the run stops and names that file.
  • You can run it in your browser with Local, which uses no compute usage, or on Conspecta's servers with Server, the same choice a single-file run has. The server uses the same events a local run would. Server appears once every file in the set has finished uploading. Flow Cytometry Compute covers what a server run uses.

For clustering, the results add a table of what share of each file's events fell in each cluster. Every file went through one run, so a cluster is the same population in every row.

Create N gates still draws gates on the file you're looking at. Each gate outlines that file's own events in the cluster, so it matches the plot in front of you. A cluster with none of this file's events gets no gate.

Density clustering has no Run on choice, because it reads one file's own density.

Specialized Tools

Open Cell analysis in the Analysis section of the sidebar to find these tools.

  • Cell cycle fits Gaussian peaks to a DNA histogram and splits it into G0/G1, S, and G2/M. It reports the percentage in each phase and the peak positions. It picks the DNA channel by name when it can (DAPI, PI, Hoechst, DRAQ, 7-AAD, SYTO 9, SYTOX Green).
  • Proliferation works on a dye-dilution channel (CFSE, CellTrace, CPD) and splits it into generations. It reports the number of generations, the division index, the percentage of cells that divided, and the event count in each generation. The division index and the percentage divided weight each generation by the starting cells it came from.
  • Kinetics looks for unstable stretches across acquisition time. Click Apply gates to gate them out.
  • Quality control also finds bad time windows, with the focus on excluding them. Flow files and templates covers it.

Cell Cycle and Proliferation report numbers only. Kinetics and Quality Control can add a time gate.

Applying a kinetics or quality-control time gate moves your whole gate tree under it. Conspecta creates a time gate on a Time histogram at the top of the tree and moves every top-level gate and plot under it, so it filters every population below. One undo takes it back.

Saved Results

In Cell Cycle, Proliferation, or Kinetics, click Save results to keep the numbers with the analysis. The next time you open that tool, they're on a Saved result card that names the channel, the file, and how long ago the run was. Remove result deletes it, after asking first.

In the Cell analysis menu, a green dot next to Cell Cycle, Proliferation, or Kinetics means it has a saved result. Quality Control gets a dot once you've applied its time gate.

Changing the compensation clears saved results, and so does switching to another file, since the numbers describe one file's events under one compensation.

MFI Comparison

MFI Comparison compares two populations marker by marker. Open Cell analysis in the sidebar and click MFI comparison. It's available once you've drawn at least two gates.

  1. Choose a Control population and a Sample population.
  2. Check the markers you want to compare.

For each marker, the table shows the median fluorescence intensity in each population, the fold change, the log₂ fold change, and a p-value from a Kolmogorov-Smirnov test. P-values below 0.05 are in bold. A bar on each row shows the direction and size of the shift.

T cells against the leukocytes they were gated from. CD3e rises nearly forty-fold, and the lineage cocktail falls.

If either population is empty, or the control's median is zero or below, the fold change reads n/a.

Export CSV downloads the whole table.

Run in Your Browser or on a Server

These tools run in your browser, on your computer. They skip the queue, use no compute usage, and keep your data in your session. On a very large file, your computer sets the limit. Subsample to fit, and each dialog box shows how many events it's using.

Clustering and Dim. Reduction also have a Compute Location setting with Local and Server. Choose Server to send the run to Conspecta's servers when your computer can't get through it, for one file or the whole working set. A server run uses compute usage as follows.

  • 1 for most algorithms
  • 5 for DBSCAN and Graph clustering

The number is the same whatever the run covers, and the dialog box shows it before you run. Density clustering always runs locally. Flow cytometry compute has the full table and how it's worked out.

Members with view-only access see the cluster colors on saved plots and can open MFI comparison. The other tools on this page need edit access.