cyto_compensate | R Documentation |
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 class 'GatingSet' cyto_compensate(x, spillover = NULL, select = 1, remove = FALSE, ...) ## S3 method for class 'flowSet' cyto_compensate(x, spillover = NULL, select = 1, remove = FALSE, ...) ## S3 method for class 'flowFrame' cyto_compensate(x, spillover = NULL, select = 1, remove = FALSE, ...)
x |
object of class |
... |
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) # 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") # Apply stored spillover matrix to GatingSet gs <- GatingSet(Activation) cyto_compensate(gs) # Remove applied compensation cyto_compensate(gs, remove = TRUE) # Apply saved spillover matrix csv file to GatingSet cyto_compensate(gs, "Spillover-Matrix.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.