Title: | Automatic and interactive quality control for flow cytometry data |
---|---|
Description: | The package is able to perform an automatic or interactive quality control on FCS data acquired using flow cytometry instruments. By evaluating three different properties: 1) flow rate, 2) signal acquisition, 3) dynamic range, the quality control enables the detection and removal of anomalies. |
Authors: | Gianni Monaco [aut], Chen Hao [ctb] |
Maintainer: | Gianni Monaco <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.37.0 |
Built: | 2024-12-10 06:15:33 UTC |
Source: | https://github.com/bioc/flowAI |
This data set contain three flowFrame objects created by subsetting three FCS files of an Aging study made in Singapore. The samples were stained with a panel aimed to identify B cell subpopulations. The data is stored as a flowSet object, a class implemented in the flowCore package to handle FCS files in R.
data(Bcells)
data(Bcells)
A flowSet containing 3 flowFrames
For a set of FCS files, flow_auto_qc performs a complete and automatic quality control. It consists in the detection and removal of anomalies by checking three properties of flow cytometry: 1) flow rate, 2) signal acquisition, 3) dynamic range.
flow_auto_qc( fcsfiles, remove_from = "all", output = 1, timeCh = NULL, timestep = NULL, second_fractionFR = 0.1, alphaFR = 0.01, ModeDevFR = NULL, decompFR = "cffilter", ChExcludeFS = c("FSC", "SSC"), outlier_binsFS = FALSE, pen_valueFS = 500, max_cptFS = 3, ChExcludeFM = c("FSC", "SSC"), sideFM = "both", neg_valuesFM = 1, html_report = "_QC", mini_report = "QCmini", fcs_QC = "_QC", fcs_highQ = FALSE, fcs_lowQ = FALSE, folder_results = "resultsQC", ... )
flow_auto_qc( fcsfiles, remove_from = "all", output = 1, timeCh = NULL, timestep = NULL, second_fractionFR = 0.1, alphaFR = 0.01, ModeDevFR = NULL, decompFR = "cffilter", ChExcludeFS = c("FSC", "SSC"), outlier_binsFS = FALSE, pen_valueFS = 500, max_cptFS = 3, ChExcludeFM = c("FSC", "SSC"), sideFM = "both", neg_valuesFM = 1, html_report = "_QC", mini_report = "QCmini", fcs_QC = "_QC", fcs_highQ = FALSE, fcs_lowQ = FALSE, folder_results = "resultsQC", ... )
fcsfiles |
It can be a character vector with the filenames of the FCS files, a flowSet or a flowFrame. |
remove_from |
Select from which of the three steps the anomalies have to
be excluded in the high quality FCS file. The default option |
output |
Set it to 1 to return a flowFrame or a flowSet with high
quality events only. Set it to 2 to return a flowFrame or a flowSet with an
additional parameter where the low quality events have a value higher than
10,000. Set it to 3 to return a list with the IDs of low quality cells.
Set it to any other value if no R object has to be returned. Default is
|
timeCh |
Character string corresponding to the name of the Time Channel
in the set of FCS files. By default is |
timestep |
Numerical value that specifies the time step in seconds. In
other words, it tells how many seconds one unit of time corresponds to. By
default is |
second_fractionFR |
The fraction of a second that is used to split the
time channel in order to recreate the flow rate. Set it to
|
alphaFR |
The level of statistical significance used to accept anomalies
detected by the ESD outlier detection method. The default value is |
ModeDevFR |
If defined, it will remove parts of the flow rate that are a number of standard deviation from the mode of the trend. To perform this filter, add the number to multiply to the standard deviation. It is suggested a number between 1 and 2. Default is NULL, hence not performed. |
decompFR |
Default is "cffilter" and it will use the Christiano-Fitzgerald method to calculate the trend and cycle components. Any other value will perform Loess regression to predict the trend line. In this case the cycle component will be the distances from the trend line. |
ChExcludeFS |
Character vector with the names or name patterns of the
channels that you want to exclude from the signal acquisition check. The
default option, |
outlier_binsFS |
logical indicating whether outlier bins (not events)
have to be removed before the changepoint detection of the signal
acquisition check. The default is |
pen_valueFS |
The value of the penalty for the changepoint detection
algorithm. This can be a numeric value or text giving the formula to use;
for instance, you can use the character string |
max_cptFS |
The maximum number of changepoints that can be detected for
each channel. The default is |
ChExcludeFM |
Character vector with the names or name patterns of the
channels that you want to exclude from the signal acquisition check. The
default option, |
sideFM |
Select whether the dynamic range check has to be executed on
both limits, the upper limit or the lower limit. Use one of the options:
|
neg_valuesFM |
Scalar indicating the method to use for the removal of
the anomalies from the lower limit of the dynamic range. Use |
html_report |
Suffix to be added to the FCS filename to name the HTML
report of the quality control. The default is |
mini_report |
Name for the TXT file containing the percentage of
anomalies detected in the set of FCS files analyzed. The default is
|
fcs_QC |
Suffix to be added for the filename of the new FCS containing a
new parameter where the low quality events only have a value higher than
10,000. The default is |
fcs_highQ |
Suffix to be added for the filename of the new FCS
containing only the events that passed the quality control. The default is
|
fcs_lowQ |
Suffix to be added for the filename of the new FCS containing
only the events that did not pass the quality control. The default is
|
folder_results |
Character string used to name the directory that
contains the results. The default is |
... |
additional parameters passed to read.flowSet to provide flexibility over how the FCS files are read in. |
A complete quality control is performed on flow cytometry data in FCS format. By default the analysis returns:
1. a flowFrame or flowSet object containing new FCS files with only high quality events
and a directory named resultsQC containing:
1. a set of new FCS files with a new parameter to gate out the low quality events a value larger than 10,000 is assigned to them only,
2. a set of HTML reports, one for each FCS file, that include graphs and table indicating where the anomalies were detected,
3. a single TXT file reporting the percentage of events removed in each FCS file.
Gianni Monaco, Chen Hao
## a sample dataset as flowSet object data(Bcells) ## quality control on a flowFrame object resQC <- flow_auto_qc(Bcells[[1]], html_report = FALSE, mini_report = FALSE, fcs_QC = FALSE, folder_results = FALSE)
## a sample dataset as flowSet object data(Bcells) ## quality control on a flowFrame object resQC <- flow_auto_qc(Bcells[[1]], html_report = FALSE, mini_report = FALSE, fcs_QC = FALSE, folder_results = FALSE)
The call of the flow_iQC
function opens a Shiny application that allows
to perfom a complete and interactive quality control of an FCS file. The
framework of the interactive quality control is complementary to the
automatic one of the flow_auto_qc
function. Hence, the anomalies
are manually selected from the evaluation of three main properties of
flow cytometry: 1) flow rate, 2) signal acquisition, 3) dynamic range.
flow_iQC()
flow_iQC()
Chen Hao, Gianni Monaco
if (interactive()) flowAI::flow_iQC()
if (interactive()) flowAI::flow_iQC()