decompensate: Decompensate a flowFrame

Description Usage Arguments Value Examples

Description

Reverse the application of a compensation matrix on a flowFrame

Usage

1
2
3
4
5
## S4 method for signature 'flowFrame,matrix'
decompensate(x, spillover)

## S4 method for signature 'flowFrame,compensation'
decompensate(x, spillover)

Arguments

x

flowFrame.

spillover

matrix or data.frame or a compensation object

Value

a decompensated flowFrame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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))
all.equal(decompensate(f.comp,spill)@exprs,decompensate(f.comp,as.matrix(spill))@exprs)
all.equal(f@exprs,decompensate(f.comp,spill)@exprs)

flowCore documentation built on Nov. 8, 2020, 5:19 p.m.