top of page

AutoSpectral: basic workflow

  • Writer: olivertburton
    olivertburton
  • Oct 27
  • 2 min read

In this article, I'll cover the basic workflow for using AutoSpectral for unmixing spectral flow cytometry data.


To start, we need to get the relevant parameters for the cytometer. This tells AutoSpectral a lot about what you’re doing. In this example, we’ll use data from the Cytek Aurora.

asp <- get.autospectral.param(cytometer = "aurora", figures = TRUE)

Create a folder containing only the single-stained control FCS files describe the path to that folder here.

control.dir <- "~/AutoSpectral_data/Aurora_example/Aurora_controls"

With this information, we can create a draft of the control file. More detail on this will be included in a separate article here.

create.control.file(control.dir, asp)

For now, we’ll use the pre-filled control file, which you can get from Mendeley Data.

control.file <- "~/AutoSpectral_data/Aurora_example/aurora_fcs_control_file.csv"

Now we are ready to read in the fcs files, gate the cells and organize the experiment.

flow.control <- define.flow.control(control.dir, control.file, asp)

Check out the gating plots to be sure this has worked correctly.

CD8 T cell gating:

ree

CD14 monocyte gating:

ree

There are several parameters that control the automated gating. This is be covered in a separate article here.


Control cleaning is always recommended. The default option downsamples and sets universal negatives, provided these are specified in the control file. More detail on this in a separate article here.

flow.control <- clean.controls(flow.control, asp)

This generates scatter-matching plots showing the FSC/SSC of the positive events and events from the universal negative in the same region.


CD8 scatter-matching plot:

ree

CD14 scatter-matching plot:

ree

Spectra can now be isolated from the controls. To use the cleaned data, set use.clean.expr to TRUE.

spectra <- get.fluorophore.spectra(flow.control, asp, use.clean.expr = TRUE)

Check the spectral traces and heatmaps–do they look right?


Normalized fluorophore signatures:


ree

Spectral heatmap:

ree

Now we can unmix. In this example we're just going to cover basic unmixing using ordinary least squares, which is what you'll get in SpectroFlo on the Aurora. By default, AutoSpectral extracts a single AF parameter, much like selecting the "spectral unmixing with autofluorescence extraction" option. To unmix without AF extraction, remove this from the spectral matrix:

fluorophore.only.spectra <- spectra[rownames(spectra) != "AF", ]

We can unmix a single FCS file:

unmix.fcs("~/AutoSpectral_data/Aurora_example/Aurora_fully_stained/E1 Fresh_100ul_TS_BS_005.fcs",
          spectra, asp, flow.control, method = "OLS")

Or, if we have a bunch of files in the folder, we can unmix them all:

unmix.folder("~/AutoSpectral_data/Aurora_example/AutoSpectral/Aurora_fully_stained/",
             spectra, asp, flow.control, method = "OLS")

By default, parallel processing is off. To activate it for faster unmixing, set:

asp$parallel <- TRUE

Do this before calling the function, e.g., define.flow.control or clean.controls. Turn it off again at any point:

asp$parallel <- FALSE

Comments


bottom of page