Learn R Programming

openCyto (version 1.10.3)

mindensity2: An improved version of mindensity used to determines a cutpoint as the minimum point of a kernel density estimate between two peaks.

Description

Analogous to the original openCyto::mindensity(), mindensity2 operates on a standard flowFrame. Its behavior is closely modeled on the original mindensity() whenever possible. However, the underlying peak-finding algorithm (improvedMindensity) behaves significantly differently.

Usage

mindensity2(fr, channel, filterId = "", positive = TRUE, pivot = FALSE,
  gate_range = NULL, min = NULL, max = NULL, peaks = NULL, ...)

Arguments

fr
a flowFrame object
channel
the channel to operate on
filterId
a name to refer to this filter
positive
If TRUE, then the gate consists of the entire real line to the right of the cutpoint. Otherwise, the gate is the entire real line to the left of the cutpoint. (Default: TRUE)
pivot
logical value. If TRUE, we choose as the two peaks the largest peak and its neighboring peak. See details.
gate_range
numeric vector of length 2. If given, this sets the bounds on the gate applied. If no gate is found within this range, we set the gate to the minimum value within this range if positive is TRUE and the maximum value of the range otherwise.
min
a numeric value that sets the lower boundary for data filtering
max
a numeric value that sets the upper boundary for data filtering
peaks
numeric vector. If not given , then perform peak detection first by .find_peaks
...
Additional arguments for peak detection.

Value

  • a rectangleGate object based on the minimum density cutpoint

Examples

Run this code
gate <- mindensity2(fr, channel = "APC-A") # fr is a flowFrame

Run the code above in your browser using DataLab