A four-part function to clean single-color controls in order to extract fluorophore signatures. Any part can be run independently:
Stage 1: PeacoQC to eliminate flow artefacts.
Stage 2: Trimming to eliminate extreme events.
Stage 3: Autofluorescence noise removal using PCA unmixing on matching unstained (cells only).
Stage 4: Brightest event selection from positive, universal negative from matching negative, and downsampling to speed up RLM spectra optimization.
clean.controls(
flow.control,
asp,
time.clean = FALSE,
trim = FALSE,
trim.factor = NULL,
af.remove = FALSE,
universal.negative = TRUE,
downsample = TRUE,
negative.n = asp$negative.n,
positive.n = asp$positive.n,
scatter.match = TRUE,
scrub = FALSE,
intermediate.figures = FALSE,
main.figures = TRUE,
parallel = FALSE,
verbose = TRUE
)A list prepared using define.flow.control, containing
the data and essential information about the cytometer and data structure.
The AutoSpectral parameter list, prepared using
get.autospectral.param.
Logical, default is FALSE. Whether to run PeacoQC to
remove time-based inconsistencies in the controls.
Logical, default is FALSE. Whether to remove extreme events
(positive and negative) from controls.
Numeric. Default is asp$rlm.trim.factor. Required if
trim = TRUE.
Logical, default is FALSE. Whether to remove intrusive
autofluorescence contamination from cell controls using PCA-based
identification and gating. Requires universal negatives to be defined in the
control file and in flow.control.
Logical, default is TRUE. Whether to use a
universal negative sample as the negative for spectral extraction. Requires
universal negatives to be defined in the control file and in flow.control.
Logical, default is TRUE. Whether to reduce cell and bead
control events to speed up processing.
Integer. Number of events to include in the downsampled
negative population. Default is asp$negative.n.
Integer. Number of events to include in the downsampled
positive population. Default is asp$positive.n.
Logical, default is TRUE. Whether to select negative
events based on scatter profiles matching the positive events. Defines a
region of FSC and SSC based on the distribution of selected positive events.
Logical, if TRUE allows for re-cleaning of already cleaned
data, provided there are clean data in flow.control.
Logical, if TRUE returns additional figures to
show the inner workings of the cleaning, including definition of low-AF cell
gates on the PCA-unmixed unstained and spectral ribbon plots of the AF
exclusion from the unstained. Default is FALSE to speed up processing.
Logical, if TRUE creates the main figures to show the
impact of intrusive autofluorescent event removal and scatter-matching for
the negatives.
Logical, default is FALSE, in which case parallel processing
will not be used. Parallel processing will likely be faster when many small
files are read in. If the data is larger, parallel processing may not
accelerate the process much.
Logical, default is TRUE. Set to FALSE to suppress messages.
Returns a modified flow.control with the original data intact. New, cleaned
data and corresponding factors are stored in new slots.