gate-class               package:prada               R Documentation

'_g_a_t_e': _a _c_l_a_s_s _f_o_r _s_u_b_s_e_t_t_i_n_g _f_l_o_w-_c_y_t_o_m_e_t_r_y _d_a_t_a _b_y _d_e_f_i_n_i_n_g
_r_e_g_i_o_n_s _i_n _t_w_o-_d_i_m_e_s_i_o_n_a_l _p_r_o_j_e_c_t_i_o_n_s _o_f _t_h_e _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     In flow-cytometry analysis, regions in two-dimensional projections
     of the data space often have to be selected. Objects of this class
     can store the properties of these selections.

_C_r_e_a_t_i_n_g _O_b_j_e_c_t_s:

     Objects can be created using methods of the generic function 
     'drawGate' or via
      '  new("gate",'
      '    gateFun = ....,   # function returning logical vector'
      '    colnames = .... # object of class character and length 2'
      '    logic = ....  # object of class character'
      '  )'

_S_l_o_t_s:

     '_n_a_m_e': A character vector for the name of the 'gate' object. You
          can reference the object by its name for subsequent
          operations (e.g. plotting).

     '_g_a_t_e_F_u_n': A function call together with necessary arguments to
          produce a logical vector when applied on the data.

     '_c_o_l_n_a_m_e_s': The colnames of the data matrix to which the gating
          function is to be applied.

     '_l_o_g_i_c': A 'character' object, either '&' or '|'. This specifies
          the logical operation that will be applied when combining the
          selection from the 'gate' with other object of that class.
          See 'link[prada]{gateSet}' for additional information on
          combining 'gates'.

     '_t_y_p_e': A 'character' giving the type of the object. This is
          currently not used but might become important in the future.

_M_e_t_h_o_d_s:

     _a_p_p_l_y_G_a_t_e: 'applyGate(x, data)'
          applies the gating of object 'x' on data objects of class
          'cytoFrame' or 'matrix'. In the former case 'x' may be of
          class 'gate', 'gateSet', 'character', 'numeric' or 'logical'.
          See vignette for details.

     _s_h_o_w display summary.

     _n_a_m_e_s, _n_a_m_e_s<- access and replace slot name.

     _a_s._g_a_t_e_S_e_t Convert 'gate' object to  'gateSet' object

     _c_o_m_b_i_n_e_G_a_t_e_s Combine multiple 'gate' objects to one 'gateSet'
          object  .in -5 

_A_u_t_h_o_r(_s):

     Florian Hahne

_S_e_e _A_l_s_o:

     'cytoFrame', 'gateMatrix', 'gateSet'

_E_x_a_m_p_l_e_s:

     sampdat <- readFCS(system.file("extdata", "fas-Bcl2-plate323-04-04.A01",
                                    package="prada"))
     g1 <- new("gate", name="test1", gateFun=function(x)x[,"FSC-H"]<500, logic="&",
               colnames="FSC-H", type="misc")
     g1
     g2 <- new("gate", name="test2", gateFun=function(x)x[,"SSC-H"]>800, logic="&",
               colnames="SSC-H", type="misc")
     gs1 <- combineGates(g1,g2)
     gs2 <- as.gateSet(g2)
     names(g1)
     names(g1) <- "testName"
     applyGate(sampdat, g1)
     applyGate(exprs(sampdat), g2)
     gate(sampdat) <- g1
     applyGate(sampdat, 1)
     applyGate(sampdat, "testName")
     applyGate(sampdat, TRUE)

