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)

