cyto_spillover_compute uses the method described by Bagwell & Adams 1993 to automatically calculate the fluorescent spillover matrix using single stain compensation controls.

cyto_spillover_compute(
  x,
  parent = NULL,
  axes_trans = NULL,
  channel_match = NULL,
  spillover = NULL,
  axes_limits = "machine",
  ...
)

Arguments

x

object of class flowSet or GatingSet containing transformed and gated compensation controls.

parent

name of the population to use for the spillover calculation when a GatingSet object is supplied, set to the last node of the GatingSet by default (e.g. "Single Cells"). For greater flexibility, users can specify a parent population for each control, which will be extracted for the spillover calculation (e.g. Lymphocytes for CD4 APC or Myeloid Cells for CD11b FITC). The parent populations for each control can also be specified in a parent column in the channel match CSV file or in cyto_details.

axes_trans

object of class transformerList generated by a cyto_transformer which contains the transformer definitions used to transform the data. Transformer definitions are only required when a flowSet object is supplied.

channel_match

name of csv file to associate a fluorescent channel with each of the compensation controls. The channel_match file should contain a "name" column with the names of the compensation controls and a "channel" column to associate a fluorescent channel with each compensation control. Users need not generate this file by hand as it will be created following the channel selection process. This information can also be added directly to the samples using cyto_details_edit.

spillover

name of the output spillover csv file, set to "Spillover-Matrix.csv" by default.

axes_limits

options include "auto", "data" or "machine" to use optimised, data or machine limits respectively. Set to "machine" by default to use entire axes ranges. Fine control over axes limits can be obtained by altering the xlim and ylim arguments.

...

additional arguments passed to cyto_plot.

Value

spillover matrix and write spillover matrix to csv file named in accordance with spillover.

Details

cyto_spillover_compute supports spillover matrix calculation for both internal or universal unstained reference populations based on channel selection. cyto_spillover_compute expects the fluorescent channels of the samples to be pre-transformed. Attempts will be made to transform the data internally (using biexponential transformations) if it looks like the data has not been transformed.

cyto_spillover_compute begins by the user selecting which fluorescent channel is associated with each compensation control from a dropdown menu. The results of these selections are saved to a csv file called "Compensation-Channels.csv" which can be passed to the channel_match argument on subsequent runs to bypass the channel selection process. In cases where multiple controls are supplied for the same channel, the control with the greatest signal in the designated channel (MedFI) will be used for the calculation.

Following channel selection, cyto_spillover_compute runs through each compensation control and plots the density distribution in the associated channel. If a universal "Unstained" compensation control is supplied, the unstained compensation control will be overlaid onto the plot as a reference for gating. Users can then gate the positive signal for spillover calculation using an interval gate. If no universal unstained compensation control is supplied, users are expected to gate the negative and then the positive signal for each compensation control.

The percentage spillover is calculated based on the median fluorescent intensities (MedFI) of the positive populations relative to that of the reference negative population(s). The calculated spillover matrix is returned and written to a named csv file for future use.

References

C. B. Bagwell \& E. G. Adams (1993). Fluorescence spectral overlap compensation for any number of flow cytometry parameters. in: Annals of the New York Academy of Sciences, 677:167-184.

See also

Author

Dillon Hammill, Dillon.Hammill@anu.edu.au

Examples

if (FALSE) { library(CytoExploreRData) # Bypass directory check for external files options("CytoExploreR_wd_check" = FALSE) # Load in compensation controls fs <- Compensation gs <- GatingSet(Compensation) # Gate using cyto_gate_draw gt <- Compensation_gatingTemplate cyto_gatingTemplate_apply(gs, gt) # Channel match fille cmfile <- system.file("extdata", "Compensation-Channels.csv", package = "CytoExploreRData" ) # Compute fluorescent spillover matrix spill <- cyto_spillover_compute(cyto_extract(gs, "Single Cells"), channel_match = cmfile, spillover = "Example-spillover.csv" ) # Compensate samples gs <- cyto_compensate(gs, spill) # Return CytoExploreR_wd_check to default options("CytoExploreR_wd_check" = TRUE) }