lymphFilter-class         package:flowStats         R Documentation

_A_u_t_o_m_a_t_e_d _g_a_t_i_n_g _o_f _e_l_l_i_p_t_i_c_a_l _c_e_l_l _p_o_p_u_l_a_t_i_o_n_s _i_n _2_D.

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     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")

_A_r_g_u_m_e_n_t_s:

       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. 

_D_e_t_a_i_l_s:

     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



     _N_U_L_L: No preselection at all

     _c_h_a_r_a_c_t_e_r _s_c_a_l_a_r Preselection based on cells that are positive for
          a single marker only. This allows for back-gating, for
          instances by selecting 'CD4+' T-cells and using this
          information to back-gate lymphocytes in 'FSC' and 'SSC'.
          Positive cells are identified using a 'curv1Filter'. 

     _a _n_a_m_e_d _l_i_s_t _o_f _n_u_m_e_r_i_c_s: Preselection by a rectangular gate. The
          items of the list have to be numerics of length one giving
          the gate boundaries in the respective dimensions. 

          The 'lymphFilter' class and constructor provide the means to
          treat 'lymphGates' as regular 'flowCore' filters.


_V_a_l_u_e:

     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.

_E_x_t_e_n_d_s:

     Class '"parameterFilter"', directly.

     Class '"concreteFilter"', by class "parameterFilter", distance 2.

     Class '"filter"', by class "parameterFilter", distance 3.

_S_l_o_t_s:

     See 'Arguments' section for details.



     '_p_r_e_s_e_l_e_c_t_i_o_n': Object of class 'character', the name of the flow
          parameter used for preselection. 

     '_r_e_c_t_D_e_f': Object of class 'list', the initial rectangular
          selection. 

     '_s_c_a_l_e': Object of class 'numeric'.

     '_b_w_F_a_c': Object of class 'numeric'.

     '_p_a_r_a_m_e_t_e_r_s': Object of class 'parameters', the flow parameters to
          operate on. 

     '_f_i_l_t_e_r_I_d': Object of class '"character"', the filter identifier. 


_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     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.

_M_e_t_h_o_d_s:



     %_i_n% 'signature(x = "flowFrame", table = "lymphFilter")': the work
          horse for doing the actual filtering. Internally, this simply
          calls the 'lympghGate' function. 


_A_u_t_h_o_r(_s):

     Florian Hahne

_S_e_e _A_l_s_o:

     'norm2Filter', 'curv1Filter'

_E_x_a_m_p_l_e_s:

     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)

