outlierGate: Create an outlier gate

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/gates.R

Description

Define gating thresholds to remove outlier events for a particular channel.

Usage

1
outlierGate(x, name, nmads=3, type=c("both", "upper", "lower"))

Arguments

x

A flowFrame object like that constructed by poolCells.

name

A string specifying the name of the channel in x from which intensities are to be extracted.

nmads

A numeric scalar specifying the number of median absolute deviations (MADs) beyond which an event can be considered an outlier.

type

A string specifying the type of outliers to be removed.

Details

Outliers are defined as events with intensities that are more than nmads median absolute deviations from the median of the intensity distribution. The lower gate threshold is defined as the median minus nmads MADs, while the upper gate threshold is defined as the median plus nmads MADs. If type="upper", only large outliers are removed (e.g., dead/alive stains), so the lower threshold is set to -Inf. If type="lower", only small outliers are removed (e.g., DNA), so the upper threshold is set to Inf.

Value

A rectangleGate object with lower and upper thresholds defined from x.

Author(s)

Aaron Lun

See Also

poolCells, rectangleGate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
example(poolCells)
ogate <- outlierGate(ff, "X1")
ogate

ogate <- outlierGate(ff, "X2", type="upper")
ogate

ogate <- outlierGate(ff, "X3", type="lower")
ogate

sff <- Subset(ff, ogate) # for actual gating.

cydar documentation built on April 17, 2021, 6:01 p.m.