kmeansFilter-class {flowCore} | R Documentation |
A filter that performs one-dimensional k-means (Lloyd-Max) clustering on a single flow parameter.
kmeansFilter(..., filterId="defaultKmeansFilter")
... |
kmeansFilter are defined by a single flow
parameter and an associated list of k population names. They
can be given as a character vector via a named argument, or as a
list with a single named argument. In both cases the name will be
used as the flow parameter and the content of the list or of the
argument will be used as population names, after coercing to
character. For example
kmeansFilter(FSC=c("a", "b", "c"))
or kmeansFilter(list(SSC=1:3))
If the parameter is not fully realized, but instead is the result of a transformation operation, two
arguments need to be passed to the constructor: the first one being
the transform object and the second
being a vector of population names which can be coerced to a
character. For example
kmeansFilter(tf, c("D", "E"))
|
filterId |
An optional parameter that sets the filterId
of the object. The filter can later be identified by this name. |
The one-dimensional k-means filter is a multiple population filter
capable of operating on a single flow parameter. It takes a parameter
argument associated with two or more populations and results in the
generation of an object of class multipleFilterResult
.
Populations are considered to be ordered such that the population with
the smallest mean intensity will be the first population in the list
and the population with the highest mean intensity will be the last
population listed.
Returns a kmeansFilter
object for use in filtering
flowFrames
or other flow cytometry
objects.
Class parameterFilter
, directly.
Class concreteFilter
, by class
parameterFilter
, distance 2.
Class filter
, by class parameterFilter
,
distance3.
populations
:character
. The
names of the k
populations (or clusters) that will be
created by the kmeansFilter
. These names will later be used
for the respective subpopulations in split
operations and for the summary of the filterResult
. parameters
:parameters
,
defining a single parameter for which the data in the
flowFrame
is to be clustered. This may also
be a transformation
object. filterId
:character
, an
identifier or name to reference the kmeansFilter
object
later on.
Like all other filter
objects in flowCore
,
kmeansFilter
objects should be instantiated through their
constructor kmeansFilter()
. See the Usage
section for
details.
signature(x = "flowFrame", table =
"kmeansFilter")
: The workhorse used to evaluate the filter on
data.
Usage:
This is usually not called directly by the user, but internally by
the filter
methods.
signature(object = "kmeansFilter")
: Print
information about the filter.
Usage:
The method is called automatically whenever the object is printed on the screen.
See the documentation in the
flowViz
package for plotting of
kmeansFilters
.
F. Hahne, B. Ellis, N. LeMeur
flowFrame
, flowSet
, filter
for evaluation of kmeansFilters
and split
for
splitting of flow cytometry data sets based on the result of the
filtering operation.
## Loading example data dat <- read.FCS(system.file("extdata","0877408774.B08", package="flowCore")) ## Create the filter kf <- kmeansFilter("FSC-H"=c("Pop1","Pop2","Pop3"), filterId="myKmFilter") ## Filtering using kmeansFilters fres <- filter(dat, kf) fres summary(fres) names(fres) ## The result of quadGate filtering are multiple sub-populations ## and we can split our data set accordingly split(dat, fres) ## We can limit the splitting to one or several sub-populations split(dat, fres, population="Pop1") split(dat, fres, population=list(keep=c("Pop1","Pop2")))