gate_flowclust_2d.Rd
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.
gate_flowclust_2d( fr, xChannel, yChannel, filterId = "", K = 2, usePrior = "no", prior = list(NA), trans = 0, min.count = 1, max.count = 1, nstart = 1, plot = FALSE, target = NULL, transitional = FALSE, quantile = 0.9, translation = 0.25, transitional_angle = NULL, min = NULL, max = NULL, ... )
fr  a 

xChannel, yChannel 

filterId  A 
K  the number of clusters to find 
usePrior  Should we use the Bayesian version of 
prior  list of prior parameters for the Bayesian version of

trans, min.count, max.count, nstart  some flowClust parameters. see 
plot  a logical value indicating if the fitted mixture model should be plotted. By default, no. 
target  a numeric vector of length 
transitional  logical value indicating if a transitional gate should be
constructed from the target 
quantile  the contour level of the target cluster from the

translation  a numeric value between 0 and 1 used to position a
transitional gate if 
transitional_angle  the angle (in radians) of the transitional
gate. It is also used to determine which quadrant the final gate resides in.
See details. Ignored if 
min  A vector of length 2. Truncate observations less than this minimum
value. The first value truncates the 
max  A vector of length 2. Truncate observations greater than this
maximum value. The first value truncates the 
...  additional arguments that are passed to 
a polygonGate
object containing the contour (ellipse) for 2D
gating.
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
chisquared 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 xaxis (with the cluster
centroid as the origin) and the major eigenvector (i.e., the eigenvector with
the larger eigenvalue) is transitional_angle
.
So based on range that the angle falls in, the final rectangleGate will be constructed
at the corresponding quadrant. i.e. Clockwise, [0,pi/2] UR, (pi/2, pi] LR,
(pi, 3/2 * pi] LL, (3/2 * pi, 2 * pi] UL
if (FALSE) { gate < gate_flowclust_2d(fr, xChannel = "FSCA", xChannel = "SSCA", K = 3) # fr is a flowFrame }