decompensate-methods.RdReverse the application of a compensation matrix on a flowFrame
# S4 method for flowFrame,matrix decompensate(x, spillover) # S4 method for flowFrame,data.frame decompensate(x, spillover)
| x | flowFrame. |
|---|---|
| spillover | matrix or data.frame. |
a decompensated flowFrame
library(flowCore) f = list.files(system.file("extdata", "compdata", "data", package="flowCore"), full.name=TRUE)[1] f = read.FCS(f) spill = read.csv(system.file("extdata", "compdata", "compmatrix", package="flowCore"), ,sep="\t",skip=2) colnames(spill) = gsub("\\.","-",colnames(spill)) f.comp = compensate(f,spill) f.decomp = decompensate(f.comp,as.matrix(spill)) sum(abs(f@exprs-f.decomp@exprs))#> [1] 2.811873e-11#> [1] TRUE#> [1] TRUE