Converter tool

FCS Flow Cytometry Analyzer

Open FCS 2.0, 3.0 and 3.1 files, compensate with the spillover matrix, plot with linear, log, arcsinh or logicle scales, draw hierarchical gates and export population statistics.

Up to 6 files, 3 million events each

1. Open FCS files

FCS Flow Cytometry Analyzer

Operator: Abdulla Al Fahad. How tools are built and checked

A flow cytometer writes every cell as one row of channel values, and what you read from it, the percentage of CD3-positive cells or the median PE of a subset, depends on three choices made after acquisition: how much of the neighbouring dye's light you subtract, how the axis is scaled, and where you draw the gates. This page reads the FCS file and lets you make those three choices step by step, keeping every population's count next to its parent.

It reads FCS 2.0, 3.0 and 3.1 in list mode, up to 3 million events per file and 6 files at once. Parsing, compensation, transforms, gating and statistics all run in the page, so a multi-million-event file never has to be uploaded anywhere before you look at it.

Key features

  • TEXT-segment reader with $BYTEORD, $PnB, $PnR, $PnE, $PnG, $TOT, $BEGINDATA and $NEXTDATA, for integer, float and double data
  • Spillover matrix from $SPILLOVER (3.1), $SPILL or $COMP, editable as CSV and applied as observed times the inverse of the matrix
  • Linear, log10, arcsinh (with your cofactor) and logicle axes, each with its own tick labels
  • Rectangle, ellipse, polygon, quadrant and histogram-range gates stored as children of whatever population the plot shows
  • Per-population count, percent of parent, percent of total, mean, median and CV for any channel
  • Overlay of several files on a histogram, plus statistics CSV, gated events CSV and a JSON gating template you can load into the next file

What the FCS reader keeps, how compensation and the transforms work, and what the gate template stores

The reader takes the header offsets first and falls back to $BEGINDATA and $ENDDATA when the header holds zeros, which large files do. Integer channels are masked to their $PnR when the range is a power of two, so a 10-bit detector stored in 16 bits is not read with stray high bits. Log-amplified channels ($PnE with a non-zero first number) are converted to linear values; channels with a $PnG gain are divided by it. ASCII ($DATATYPE A) and non-list modes are refused with a message instead of being guessed at.

Compensation uses the matrix as stored: row i holds how much of fluorochrome i spills into each detector, so the true signal is the observed row vector times the inverse matrix. A $COMP matrix has no channel names, so it is mapped onto the first n parameters, and that mapping is reported. Files chained with $NEXTDATA are detected, but only the first dataset is analysed.

How it works

Gates are stored in display coordinates together with the transform they were drawn on. A PE range drawn on an arcsinh axis with cofactor 150 keeps that cofactor, so changing the plot to logicle later does not move the gate, and the population mask is always computed from the same transformed values.

Logicle is the biexponential of Parks, Roederer and Moore (2006), B(x) = a e^(bx) - c e^(-dx) + f, with d solved so the curve is linear through zero. The page builds a lookup table of B and inverts it by interpolation; zero always lands at (A + W) / (M + A) of the axis and negative values mirror the positive ones around that point.

When this helps

  • A core-facility technician checks a collaborator's file by confirming the lymphocyte gate holds the expected share of events before booking more time.
  • A postdoc with 12 files from one experiment draws the gates once, saves the template, loads it into each file and exports one statistics CSV per file.
  • A student comparing an unstained and a stained tube overlays them on one histogram to see how far the stained peak moves on a logicle axis.

Opening a file

  1. Drop one or more .fcs files, or load the simulated four-colour example.
  2. Check the spillover matrix in the Compensation card and switch compensation on or off.
  3. Pick X and Y channels and a scale for each; choose a histogram by leaving Y empty.
  4. Choose a gate tool and draw on the plot; draw the next gate on a population you selected in the table to build the hierarchy.
  5. Read the table, then export statistics, gated events or the gating template.

Example

The simulated four-colour example (30,000 events; FITC leaks 12 % into PE, PE leaks 2 % into FITC)

Lymphocytes: rectangle FSC-A 45,000 to 80,000, SSC-A 10,000 to 38,000
PE+: arcsinh range (cofactor 150) from 2,000 upward, a child of Lymphocytes
Run once with compensation off, once with it on

PE+ child of the lymphocyte gate (19,696 events)

Compensation off: 9,254 events, 46.98 % of parent, median PE 5,883
Compensation on: 5,755 events, 29.22 % of parent, median PE 9,053
Median PE of the FITC+ population falls from 1,628 to 161

Limits

A matrix whose off-diagonal entries are all zero does nothing; check that its names match the file's $PnN labels, including -A or -H.

Changing the compensation after drawing gates changes which events fall inside them. The gates stay where you drew them, in the transformed units.

Linear axes hide most of a fluorescence histogram in the first few pixels. That is a property of the data, not a fault of the plot; switch to arcsinh or logicle.

Statistics describe the file in front of you. The page makes no clinical or diagnostic claim and is meant for research files.

  • Draw the quadrant cross on a plot whose axes are both compensated and arcsinh scaled, so the double-negative population sits in one tidy corner instead of being split by the scale's break.
  • The CV column uses the linear values. On a log-amplified channel it describes the converted linear numbers, which can differ from the CV an instrument prints in its log scale.

Common errors and how to fix them

The file starts with something other than FCS2.0, FCS3.0 or FCS3.1.
The file may be a different cytometry format such as LMD, or an archive. Export it again from the acquisition software as FCS.
The spillover matrix cannot be inverted.
Two channels have identical rows, or a row is all zeros. Correct the matrix text; the message appears under the textarea and the data stay uncompensated.
The file holds more events than the limit.
Reduce it in the instrument software, for example by gating on live cells and exporting that population, then reopen it.

Best practices

  • A saved gating template records whether its counts were compensated, and loading it switches compensation to match. Load it into a file only after its spillover matrix is entered, otherwise the counts are reported as uncompensated.
  • Name channels the same way in every file of an experiment; a template is refused when a gate names a channel the open file does not have.

What the display scales do to the numbers

A log axis cannot show zero or negative values, and compensation produces plenty of both, which is why compensated data on a log axis piles up against the lower edge. Arcsinh is linear near zero and logarithmic far from it; its cofactor sets where that change happens, and 150 is a common starting point for fluorescence channels while 5 is used for mass cytometry. Logicle does the same job with a parameter set (T, W, M, A) that defines the top of the scale, the width of the linear region and the number of decades.

None of the transforms changes the statistics. Means, medians and CVs are always taken from the compensated linear values, and only the gates and the plots use the transformed ones.

Frequently asked questions

Does it match what FlowJo or R's flowCore report for the same file?

The parser and the inverse-matrix compensation follow the FCS standard's definitions, and counts are exact tallies of the events inside each gate. The logicle table is checked against the function's defining properties (zero maps to (A + W) / (M + A), T maps to 1, B and B' agree at the join, negative values mirror positive ones) rather than against a published table, and gate boundaries drawn by hand will differ from yours, so expect small differences in percentages.

Why is my spillover matrix empty even though I compensated on the instrument?

Many instruments apply compensation during acquisition and write the matrix only as a note, or store it in a vendor keyword. The page reads $SPILLOVER, $SPILL and $COMP; paste any other matrix into the Compensation box in the CSV layout shown.

Can it open files with several datasets?

It detects them through $NEXTDATA and says how many it found, but analyses only the first. Split the file in the acquisition software to analyse the others.