| lymphFilter-class {flowStats} | R Documentation |
Cell populations of roughly elliptical shape in two-dimensional projections are of huge interest in many flow cytometry applications. This function identifies a single such population, potentially from a mixture of multiple populations.
lymphGate(x, channels, preselection=NULL, scale=2.5,
bwFac=1.3, filterId="defaultLymphGate", evaluate=TRUE, ...)
lymphFilter(channels, preselection=as.character(NULL),
scale=2.5, bwFac=1.3, filterId="defaultLymphFilter")
x |
An object of class flowSet. |
channels |
A character vector of length 2 of valid flow
parameters in x. |
preselection |
Either NULL, in which case this boils down
to fitting a regular norm2Filter, a
character scalar giving one of the flow parameters in x, or a
named list of numerics specifying the initial rough
preselection. The latter gets passed on to
rectangleGate, see it's documentation for
details. |
scale |
The scaleFactor parameter that gets passed on to
norm2Filter. |
bwFac |
The bandwidth factor that gets passed on to
curv1Filter. |
filterId |
A character used as filterId. |
evaluate |
A logical indicating wether the filter should be
resolved (computation of the filterResult
and the subset). |
... |
Additional arguments. |
This algorithm does not apply real mixture modelling, however it is able to identify a single elliptical cell population from a mixture of multiple such populations. The idea is to first define a rough rectangular preselection and, in a second step, fit a bivariate normal distribution to this subset only.
Depending on the value of preselection, the initial rough
selection is either
CD4+ T-cells and using this
information to back-gate lymphocytes in FSC and
SSC. Positive cells are identified using a
curv1Filter.
The lymphFilter class and constructor provide the means to
treat lymphGates as regular flowCore filters.
A list with items
x |
The filtered flowSet. |
n2gate |
The norm2Filter object. |
n2gateResults |
The filterResult after
applying the norm2Filter on the flowSet. |
for the lymphGate function. Note that x and
n2gateResults are NULL when eval=FALSE.
The lymphFilter constructor returns and object of class
lymphFilter, which can be used as a regular flowCore
fitler.
Class "parameterFilter",
directly.
Class "concreteFilter",
by class "parameterFilter", distance 2.
Class "filter", by class
"parameterFilter", distance 3.
See Arguments section for details.
preselection:character, the
name of the flow parameter used for preselection. rectDef:list, the initial
rectangular selection. scale:numeric.bwFac:numeric.parameters:parameters, the flow
parameters to operate on. filterId:"character", the
filter identifier.
Objects can be created by calls of the form new("lymphFilter",
parameters, ...) or using the constructor lymphFilter. The
constructor is the recommended way of object instantiation.
signature(x =
"flowFrame", table = "lymphFilter"): the work horse for doing the
actual filtering. Internally, this simply calls the lympghGate
function.
Florian Hahne
data(GvHD)
dat <- GvHD[pData(GvHD)$Patient==10]
dat <- transform(dat, "FL4-H"=asinh(`FL4-H`))
lg <- lymphGate(dat, channels=c("FSC-H", "SSC-H"), preselection="FL4-H",scale=1.5)
if(require(flowViz))
xyplot(`SSC-H`~`FSC-H`, dat, filter=lg$n2gate)
## This is using the abstract lymphFilter class instead
lf <- lymphFilter(channels=c("FSC-H", "SSC-H"), preselection="FL4-H")
filter(dat, lf)