peakAdjust: Translate and Scale Linear Data

Description Usage Arguments Details Value Examples

View source: R/peakAdjust.R

Description

Scale linear DNA content to have identical "G1" peak values

Usage

1
2
3
4
5
6
7
8
9
peakAdjust(
  fs,
  chan = "FL2.A",
  peaks,
  g1 = 200,
  ratio = 1.92,
  limits = NULL,
  ...
)

Arguments

fs

A flowSet with data to be transformed in channel in chan

chan

Character vector to specify the channel to normalize ("FL2.A")

peaks

An optional matrix of "G1" and "G2/M" peak values or a vector of "G1" values. If missing, peakFind() to identify the peaks within the range specified by range.search

g1

Value of the rescaled G1 peak (200)

ratio

G2 to G1 ratio to place missing peaks "G1" peaks given a corresponding "G2/M" peak, default value of 1.90

limits

Optional numeric vector of length 2 specifying the limits for the transformed data. If NULL, the instrument range for data in chan will be used. If FALSE the range will be -Inf to +Inf.

...

Optional arguments passed to peakFind() and then to flowStats::curv1Filter() including range.search, probs, bwFac and gridsize

range.search

A numeric vector of length 2 specifying the range of values in the original data in which peaks will be accepted. The default value of c(50, 500) is chosen to ignore apoptotic values and polyploid peaks in typical data

Details

This function scales linear DNA content in chan to align peaks corresponding to a "G1" population of cells. Data will be adjusted by scaling the values in each flowFrame to place the "G1" peak at the value in g1.

The position of the actual "G1" population (and "G2/M" population) is provided in the optional argument peaks. This can either be a vector of "G1" peak positions or a matrix of "G1" and "G2/M" peak positions. A larger matrix will be accepted, such as one produced with peakFind(), but only the first two columns will be used and treated as "G1" and "G2/M" positions, respectively. Missing values in "G1" that have a "G2/M" value will be replaced by a value derived from ratio. If the argument peaks is missing, the function peakFind() will be called with arguments range.search and ... to identify the peaks.

Transformed values will be trimmed to the range specified by limits or the instrument range for chan if limits = NULL. No trimming will occur if limits = FALSE.

Value

A transformed and scaled flowSet.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 fs <- readSet(system.file("extdata", "synch/", package = "flowExtra"))
 bf <- boundaryFilter("FL2.A")
 lg <- linearGate(fs)
 fs <- Subset(fs, bf & lg)
 o1 <- dnaplot(~FL2.A, fs, xlim = c(120, 380), main = "Raw", plot = FALSE)
 pks <- peakFind(fs, range.search = c(100, 400))
 fs.adj <- peakAdjust(fs, peaks = pks, g1 = 180)
 o2 <- dnaplot(~FL2.A, fs.adj, xlim = c(120, 380), main = "Adjusted", plot = FALSE)
 plot(o1, split = c(1, 1, 2, 1), more = TRUE)
 plot(o2, split = c(2, 1, 2, 1), more = FALSE)

ornelles/flowExtra documentation built on March 1, 2020, 9:33 a.m.