compute_spill: Calculate a Spillover Matrix from Diva Controls

View source: R/comp_compute_spill.R

compute_spillR Documentation

Calculate a Spillover Matrix from Diva Controls

Description

Calculate a spillover matrix, given compensation control FCS files in DIVA convention.

Usage

compute_spill(ff, fsc.thresh = 30000, path = NULL, show = FALSE)

Arguments

ff

A flowFrame, used to specify fluorescence parameter names. Please note, the parameters in ff MUST be original - that is, there must not have been a "nice.names" or "swap.names" maneuver prior to calling this function!

fsc.thresh

A threshold to be applied on the FSC-A parameter, to eliminate debris

path

The directory containing the comp control tubes. If not given, path is assumed to be the current working directory.

show

Logical, should we show our work?

Details

This function computes a spillover matrix using the data in a collection of compensation control FCS files. These files MUST reside in the same directory. We assume that the acquisition program was Diva. Other vendors/conventions are not currently supported.

There is an (optional) pre-gating step on FSC-A, designed to eliminate debris. The default value for this parameter assumes no adjustment (normalization) of the original values.

The method involves doing linear regression on the spill data, to derive the slope of the data of y versus x, where x is the stained parameter, and y is all other parameters. Regression occurs iteratively, eliminating outliers in an attempt to find a robust slope.

Please note that setting show = TRUE will be very slow, and with large numbers of parameters may overwhelm your graphics capability.

Value

The calculated spillover matrix.


rogerswt/wadeTools documentation built on Feb. 16, 2023, 7:47 a.m.