outlierGate {cydar} | R Documentation

## Create an outlier gate

### Description

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

### Usage

    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

    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.

[Package cydar version 1.18.0 Index]