Learn R Programming

openCyto (version 1.10.3)

flowClust.2d: Automatic identification of a population of interest via flowClust based on two markers

Description

We cluster the observations in fr into K clusters. We set the cutpoint to be the point at which the density between the first and second smallest cluster centroids is minimum.

Usage

flowClust.2d(fr, xChannel, yChannel, filterId = "", K = 2,
  usePrior = "no", prior = list(NA), trans = 0, plot = FALSE,
  target = NULL, transitional = FALSE, quantile = 0.9,
  translation = 0.25, transitional_angle = NULL, min = NULL, max = NULL,
  ...)

Arguments

fr
a flowFrame object
xChannel,yChannel
character specifying channels to be gated on
filterId
A character string that identifies the filter created.
K
the number of clusters to find
usePrior
Should we use the Bayesian version of flowClust? Answers are "yes", "no", or "vague". The answer is passed along to flowClust.
prior
list of prior parameters for the Bayesian version of flowClust. If usePrior is set to no, then the list is unused.
trans
numeric indicating whether the Box-Cox transformation parameter is estimated from the data. May take 0 (no estimation), 1 (estimation) or 2 (cluster-specific estimation). NOTE: for the Bayesian version of flowClust, this value cannot be 2.
plot
a logical value indicating if the fitted mixture model should be plotted. By default, no.
target
a numeric vector of length 2 (number of dimensions) containing the location of the cluster of interest. See details.
transitional
logical value indicating if a transitional gate should be constructed from the target flowClust cluster. By default, no.
quantile
the contour level of the target cluster from the flowClust fit to construct the gate
translation
a numeric value between 0 and 1 used to position a transitional gate if transitional = TRUE. This argument is ignored if transitional = FALSE. See details
transitional_angle
the angle (in radians) of the transitional gate. See details. Ignored if transitional = FALSE.
min
A vector of length 2. Truncate observations less than this minimum value. The first value truncates the xChannel, and the second value truncates the yChannel. By default, this vector is NULL and is ignored.
max
A vector of length 2. Truncate observations greater than this maximum value. The first value truncates the xChannel, and the second value truncates the yChannel. By default, this vector is NULL and is ignored.
...
additional arguments that are passed to flowClust

Value

  • a polygonGate object containing the contour (ellipse) for 2D gating.

Details

The cluster for the population of interest is selected as the one with cluster centroid nearest the target in Euclidean distance. By default, the largest cluster (i.e., the cluster with the largest proportion of observations) is selected as the population of interest.

We also provide the option of constructing a transitional gate from the selected population of interest. The location of the gate can be controlled with the translation argument, which translates the gate along the major axis of the targest cluster as a function of the appropriate chi-squared coefficient. The larger translation is, the more gate is shifted in a positive direction. Furthermore, the width of the transitional gate can be controlled with the quantile argument.

The direction of the transitional gate can be controlled with the transitional_angle argument. By default, it is NULL, and we use the eigenvector of the target cluster that points towards the first quadrant (has positive slope). If transitional_angle is specified, we rotate the eigenvectors so that the angle between the x-axis (with the cluster centroid as the origin) and the major eigenvector (i.e., the eigenvector with the larger eigenvalue) is transitional_angle.

Examples

Run this code
gate <- flowClust.2d(fr, xChannel = "FSC-A", xChannel = "SSC-A", K = 3) # fr is a flowFrame

Run the code above in your browser using DataLab