cyto_spillover_edit: Interactively Edit Spillover Matrices in Real-Time

View source: R/cyto_spillover_edit.R

cyto_spillover_editR Documentation

Interactively Edit Spillover Matrices in Real-Time

Description

cyto_spillover_edit provides an interactive shiny interface for editing fluorescent spillover matrices.

Usage

## S3 method for class 'GatingSet'
cyto_spillover_edit(
  x,
  parent = NULL,
  channel_match = NULL,
  spillover = NULL,
  axes_trans = NA,
  axes_limits = "machine",
  display = 2000,
  point_size = 3,
  axes_text_size = 1.7,
  axes_label_text_size = 2,
  title_text_size = 2,
  header_text_size = 1.5,
  viewer = FALSE,
  ...
)

## S3 method for class 'flowSet'
cyto_spillover_edit(
  x,
  channel_match = NULL,
  spillover = NULL,
  axes_trans = NA,
  axes_limits = "machine",
  display = 2000,
  point_size = 3,
  axes_text_size = 1.7,
  axes_label_text_size = 2,
  title_text_size = 2,
  header_text_size = 1.5,
  viewer = FALSE,
  ...
)

Arguments

x

an object of class flowSet or GatingSet.

parent

name of the parent population to plot when a GatingSet object is supplied.

channel_match

name of csv file matching the name of each sample to a fluorescent channel. The channel_match file must contain the columns "name" and "channel". The channel_match file not required to use cyto_spillover_edit but is used internally to automatically select channels associated with the selcted samples.

spillover

name of a square spillover matrix csv file or spillover matrix to edit. Setting spillover to NULL (the default) will result in extraction of the spillover matrix directly from the supplied samples (i.e. edit the spillover matrix constructed on the cytometer). Similarly, if the supplied file name does not exist the spillover matrix from the first sample will be used and the edited matrix will be saved to the specified file.

axes_trans

an object of class transformerList containing transformers to used to transform the fluorescent channels of the samples for visualisation.

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.

display

numeric passed to cyto_plot to control the number of events to be displayed in the plots, set to 2000 events by default.

point_size

integer passed to cyto_plot to control the size of the points in all plots, set to 3 by default.

axes_text_size

numeric pasedd to cyto_plot to control the size of axes text, set to 1.7 by default.

axes_label_text_size

numeric passed to cyto_plot to control the text size of axes labels, set to 2 by default.

title_text_size

numeric passed to cyto_plot to control the text size of titles above each plot, set to 2 by default.

header_text_size

numeric passed to cyto_plot_compensation to control size of the header text, set to 1.5 by default.

viewer

logical indicating whether the spillover matrix editor should be launched in the RStudio viewer pane, set to FALSE by default.

...

additional arguments passed to cyto_plot.

Details

cyto_spillover_edit takes on either a flowSet or GatingSet containing compensation controls and/or samples. It is recommended that samples be pre-gated based on FSC and SSC parameters to obtain a homogeneous population for calculation of fluorescent spillover. The compensation controls should also be transformed prior to using cyto_spillover_edit.

Users begin by selecting the unstained control and a stained control from dropdown menus of sample names. cyto_spillover_edit leverages cyto_plot to plot the stained sample and overlay the unstained control in black. Users should then select the channel associated with the selected control on the x axis and go through all other channels on the y axis.

The displayed spillover matrix is extracted directly from the flowSet or GatingSet unless another spillover matrix is supplied through the spillover argument. To edit the spillover matrix simply modify the appropriate cell in the the table. The new spillover matrix will be re-applied to the samples with each edit and automatically re-plotted so you can track changes in real-time.

To aid in selection of an appropriate spillover value, the median fluorescent intensity of the unstained control is indicated by a red line and median fluorescent intensity of the stained control is tracked with a purple line. These features can be turned off by de-selecting the check boxes. Changes to the spillover matrix are automatically saved to a csv file called "date-Spillover-Matrix.csv" in the case where the spillover is not specified or to the same name as the specified spillover.

Value

edited spillover matrix and save to designated spillover csv file. Saved filename defaults to date-Spillover-Matrix.csv is not specified.

Author(s)

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

See Also

cyto_spillover_compute

cyto_plot_compensation

cyto_plot


DillonHammill/CytoExploreR documentation built on March 2, 2023, 7:34 a.m.