Description Usage Arguments Details Value Examples
View source: R/gating-functions.R
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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 |
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
.
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
a polygonGate
object containing the contour (ellipse) for 2D
gating.
1 2 3 4 | ## Not run:
gate <- gate_flowclust_2d(fr, xChannel = "FSC-A", xChannel = "SSC-A", K = 3) # fr is a flowFrame
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.