cyto_compensate
will apply a saved spillover matrix csv file to all
samples. The csv file must contain the fluorescent channels as both the
colnames (i.e. first row) and rownames (i.e. first column). If no
spillover
csv file is supplied, the spillover matrix will be extracted
directly from the first element of x
. To select a different sample for
spillover matrix extraction supply the index or name of the sample to the
select
argument. Compensation applied to samples can be easily removed
by setting the remove
argument to TRUE.
cyto_compensate(x, ...) # S3 method for GatingSet cyto_compensate(x, spillover = NULL, select = 1, remove = FALSE, ...) # S3 method for flowSet cyto_compensate(x, spillover = NULL, select = 1, remove = FALSE, ...) # S3 method for flowFrame cyto_compensate(x, spillover = NULL, select = 1, remove = FALSE, ...)
x | |
---|---|
... | not in use. |
spillover | name of the spillover matrix csv file (e.g.
"Spillover-Matrix.csv") saved in the current working directory or spillover
matrix object of class |
select | index or name of the sample from which the spillover matrix
should be extracted when no spillover matrix file is supplied to
|
remove | logical indicating whether applied compensation should be removed from the supplied samples, set to FALSE by default. |
a compensated flowFrame
, flowSet
or GatingSet
object.
Dillon Hammill, Dillon.Hammill@anu.edu.au
# Load in CytoExploreRData to access data library(CytoExploreRData) # Apply stored spillover matrix to flowSet cyto_compensate(Activation)#> A flowSet with 33 experiments. #> #> column names(18): FSC-A FSC-H ... APC-Cy7-A Time #># Save spillover matrix in correct format spill <- cyto_spillover_extract(Activation)[[1]] rownames(spill) <- colnames(spill) write.csv( spill, "Spillover-Matrix.csv" ) # Apply saved spillover matrix csv file to flowSet cyto_compensate(Activation, "Spillover-Matrix.csv")#> A flowSet with 33 experiments. #> #> column names(18): FSC-A FSC-H ... APC-Cy7-A Time #># Apply stored spillover matrix to GatingSet gs <- GatingSet(Activation) cyto_compensate(gs)#> A GatingSet with 33 samples# Remove applied compensation cyto_compensate(gs, remove = TRUE)#> A GatingSet with 33 samples# Apply saved spillover matrix csv file to GatingSet cyto_compensate(gs, "Spillover-Matrix.csv")#> A GatingSet with 33 samples