spillover_ng-flowSet: Compute a spillover matrix from a 'flowSet', simplified API

Description Usage Arguments Details Value Author(s) References See Also

Description

Spillover information for a particular experiment is often obtained by running several tubes of beads or cells stained with a single color that can then be used to determine a spillover matrix for use with compensate.

Matching stain channels to compensation controls is done via a matching csv file (at the path given by matchfile) with columns 'filename' and 'channel'. The 'channel' entries should exactly match the channel names in the FCS files. The 'filename' should be the FCS file name of each compensation control which should also be the corresponding sample name in the flowSet. There should also be one unstained control with the 'channel' entry of 'unstained'.

The method also allows for x to be missing if path is provided, pointing to a directory containing the control FCS files.

By default, pregating is always done on the channels using this API, and the mode of the channel is used to compute the spillover matrix. FSC and SSC channels can be provided to allow a pregating on (approximately) a population in the FSC and SSC dimensions. Also by default, a norm2Filter is applied before computing the spillover. These defaults can be overridden using the pregate, method, and useNormFilt arguments.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## S4 method for signature 'flowSet'
spillover_ng(x, fsc = "FSC-A", ssc = "SSC-A",
             plot = FALSE, matchfile, path,
             useNormFilt = TRUE, patt = NULL, pregate = TRUE, method = "mode", ...)
## S4 method for signature 'missing'
spillover_ng(x, fsc = "FSC-A", ssc = "SSC-A",
             plot = FALSE, matchfile, path,
             useNormFilt = TRUE, patt = NULL, pregate = TRUE, method = "mode", ...)

## S4 method for signature 'missing'
spillover_ng(
  x,
  fsc = "FSC-A",
  ssc = "SSC-A",
  plot = FALSE,
  matchfile,
  path,
  useNormFilt = TRUE,
  patt = NULL,
  pregate = TRUE,
  method = "mode",
  ...
)

Arguments

x

A flowSet of compensation beads or cells

fsc

The name or index of the forward scatter parameter

ssc

The name or index of the side scatter parameter

plot

logical. Plots the kernel density for each channel when pregating. Displays the gate used. If pregate is set to FALSE, this argument is ignored.

matchfile

Name of the csv file holding the compensation control file to channel matching information.

path

A path to a directory containing the control files, to be used if x is not provided.

useNormFilt

logical Indicating whether to apply a norm2Filter first before computing the spillover

patt

An optional regular expression defining which parameters should be considered

pregate

logical Indicating whether to pregate using link{rangeGate} before computing the spillover

method

The statistic to use for calculation. Traditionally, this has been the median so it is the default. The mean is sometimes more stable.

...

Additional arguments passed to rangeGate.

Details

The algorithm used is fairly simple. First, using the scatter parameters, we restrict ourselves to the most closely clustered population to reduce the amount of debris. The selected statistic is then calculated on all appropriate parameters and the unstained values swept out of the matrix. Every sample is then normalized to [0,1] with respect to the maximum value of the sample, giving the spillover in terms of a proportion of the primary channel intensity.

Value

A matrix for each of the parameters

Author(s)

B. Ellis

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

compensate, spillover


flowStats documentation built on Nov. 8, 2020, 6:49 p.m.