Learn R Programming

plateCore (version 1.30.0)

compensate: Compensate a flowPlate to correct for the effects of spillover.

Description

Flow samples are often stained with multiple types of fluorophores. Unfortunately, the emission spectra for these different fluorophores often overlap, and the signals must be corrected before proceeding with the analysis. Compensate adjusts for spillover using the method implemented in the package flowCore. Unlike flowCore, compensate only adjusts for the dyes/fluorophores listed in wellAnnotation.

Usage

"compensate"(x, spillover)

Arguments

x
A flowPlate
spillover
The compensation matrix where the row and column names match the fluorescence channels of the flowPlate.

Value

Returns a compensated flowPlate.

See Also

See Also compensation-class

Examples

Run this code
library(plateCore)
data(plateCore)

# Create the compensation matrix
comp.mat <- spillover(x=compensationSet,unstained=sampleNames(compensationSet)[5],
patt=".*H",fsc="FSC-H",ssc="SSC-H",method="median")

## Get the lymphocytes
rectGate <- rectangleGate("FSC-H"=c(300,700),"SSC-H"=c(50,400))
pbmcPlate <- Subset(pbmcPlate, rectGate)

# Create a flowPlate from the sample data in plateCore
fp <- flowPlate(pbmcPlate,wellAnnotation,plateName="P1")

# apply the compensation matrix
fp <- compensate(fp,comp.mat)

Run the code above in your browser using DataLab