This tutorial introduces the user to manipulating and analysing IMC data using FlowJo, following segmentation and pre-processing using Spectre's spatial data preparation or a similar pipeline. This provides a straightforward method for quantifying cellular expression and frequency data derived from segmented images.
Key preparation steps via Spectre
1. Arcsinh transformation. To prepare the data for analysis, the raw values are subject to arcsinh transformation with a co-factor of 1. These channels are indicated by the "_asinh" that is appended to the end of the channel name. These can be plotted on a linear axis typically between 0 and ~5.
2. Y-axis inversion. Programs such as HistoCat that typically deal with imaging data position x=0, y=0 in the top left corner. Programs that deal with numerical data, such as FlowJo, typically position x=0, y=0 in the bottom left corner. The result of this is that IMC images tend to be 'flipped' on the Y-axis. A key modification to the data within this R script is the addition of a second 'Y-axis' column, where the values are converted to negative. By doing this, FlowJo can render the image in the correct orientation.
1. Generate FCS files from the channel and mask TIFF files
2. Importing FCS files into FlowJo
The FCS files generated by Spectre include a file with all cells, and then one file per ROI. Depending on the exact setup, other combinations may be included. The files for each ROI will be the main files we work with.
Drag and drop these files into a FlowJo workspace, and save.
3. Axis settings
The first thing we will need to do is adapt the axis settings.
X & Y parameters
First, choose the X & Y axis parameters.
Using the 'T' button, select 'Customize Axis'.
Select both the X and Y parameters, and set them to linear. You can select the range using the + and - buttons. This will depend on the size of the ROI. In this demo dataset, the width and heigh of each ROI is 500 (um). You will need to set this range based on the largest ROI.
You can cycle through the files using the left and right green arrows.
If the files were processed in Spectre, there will be an additional 'y-invert' parameter.
As above, customise the axis and set it to linear. In this case, you will need to use the +/- buttons to set the range from 0 to the negative maximum range (e.g. 0 to -500).
If you compare the 'y' parameter (left) vs the 'y_invert' parameter (right), you will see that they are inverted.
For the raw data channels (i.e. the channels that are not arcsinh transformed) we recommend using a log setting between ~10^-1 and 10^2.
Arcsinh transformed data
For arcsinh transformed data (channels ending in '_asinh'), we recommend setting the channels to linear, with a range of approx 0 to 5. This cane be tailored for each channel as required.
Gating can be performed on segmented IMC data, much like with normal cytometry data. However, there are a number of important considerations that need to be taken into account. Here we will address these issues in the red boxes.
You can compare the channels across each ROI, to see how consistent they are.
Gates can be drawn as with typical cytometry data. And can be copied to the 'group' to apply the gates to all samples in that group.
Overlays of gated populations can be created, one per ROI. To do this, drag the ROI file onto the layout editor.
Next, drag the gated populations ontop of that plot.
Repeat for each ROI separately.
You can then adjust the X and Y paramters to be either cellular parameters (above) or the X and Y (y-invert) coordinates (below).
To help with visualisation, you can RIGHT CLICK on each plot individually, and turn 'Use Large Dots' ON.
These plots can be compared directly to the IMC images (e.g. CD20 image coloured in white below).
Interpreting spatial plots
Gating IMC data
Because of the physical overlap of cells in the IMC images, many markers may 'bleed' from one cell into another. For example, in this plot there are CD20+CD3+ cells which in normal cytometry data, we would call doublets.
The 'CD20+CD3+ cells' here are not doublets, but either:
- T cells (CD3+) picking up B cell (CD20+) signals, or
- B cells (CD20+) picking up T cell (CD3+) signals
To manage this, careful consideration must be given to the gating order – as described below.
In this case, we can see the distribution of each population. The region consisting largely of B cells (red) and doublets (orange) is the splenic white pulp, and the region consisting of largely T cells and 'other' cells is the red pulp. In this case, the 'doublets' are not actual doublets, but are CD3+ T cells that are receiving CD20+ from the overlap of the surrounding B cells. Because the CD20+ B cells are dominant in this scenario, gating CD3+ cells BEFORE CD20+ cells will prioritise and preserve the CD3 expressing cells.
5. Regional analysis
In the same way that you can gate on cellular parameters, you can gate on regions using the X and Y (y_invert) coordinates.
You can create overlays of these regions (left), in the same way we can create overlays of CD3/CD20 gates (right).
From here, you can either drag the phenotype gates onto the region gates, or drag the region gates onto the phenotype gates. You
Statistics can be added to measure the frequency of each cell type within a region (composition) or the percentage of each cell type that occurs in each region (distribution). These are two different ways of interpreting spatial data.
- Composition: this is a great way to ask what cell types make up a region. E.g. the white us made up of mostly B and T cells, whereas the red pulp is made up of T and 'other' cells. Depending on the experimental of disease context, this 'composition' may change. For example, comparing tumour samples that are responding or not responding to therapy, the composition of different tumour regions may change.
- Distribution: this is an alternative way of considering spatial data. Essentially, we ask how is each cell type distributed through the image. This may reveal a shift of where the cells are located depending on the experimental/disease context.