gate                  package:prada                  R Documentation

_F_u_n_c_t_i_o_n_s _t_o _g_a_t_e _c_y_t_o_m_e_t_r_y _d_a_t_a

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

     These functions allow the user to select a number of observations
     in multivariate data by circling them in two-dimensional
     projections of the data. 'gate.cytoSet' calls 'gate.cytoFrame'
     seperately on each frame in the set. 'gate.matrix' does the same
     as 'gate.cytoSet' but only requires a data matrix.

_U_s_a_g_e:

     my.gate <- gate.cytoFrame(object, gate.colour = "red",
                               use.smoothScatter = FALSE,
                               data.min = 0, data.max = 1023,
                               max.observations = 20000)

_A_r_g_u_m_e_n_t_s:

  object: 'cytoFrame', 'cytoSet' or matrix of cytometry data, from
          which observations are to be selected by gating

gate.colour: colour of the drawn polygons

use.smoothScatter: logical, should the function 'smoothScatter' be
          employed for plotting the data (plots data densities rather
          than individual points)

data.min: minimum value to (theoretically occur in the data; e.g. with
          10-channel-digitized data, it is 0

data.max: minimum value to (theoretically occur in the data; e.g. with
          10-channel-digitized data, it is 1023

max.observations: maximum number of observations from the data to be
          plotted; large values decrease performance

_D_e_t_a_i_l_s:

     The user is prompted to select the two dimensions for the
     projection and the defines a polygon by left-mouse clicks on its
     vertices. To finish drawing the polygon, press the right mouse
     button. Observations within the polygon are computed and marked.
     The user is then prompted if he wants to

        *  redraw the polygon

        *  combine this polygon with gated region to generate unions of
           regions

        *  proceed, in which case only observations within the selected
           region(s) are kept, while the rest is discarded. The thus
           selected observations can then be further reduced by another
           gating in other two dimensions OR

        *  finish, in which case observations within the final gate are
           marked as TRUE, while the rest is set to FALSE

_V_a_l_u_e:

     For 'gate.cytoFrame' and 'gate.matrix', it is a logical vector
     stating for each observation in the data (in same order) wether it
     was included in the defined gate ('TRUE') or not ('FALSE'). For
     'gate.cytoSet', it is a list of logical vectors, one for each
     'cytoFrame' in the 'cytoSet'. The class of the result depends on
     the called function and is 'cytoFrameGate','cytoSetGate', or
     'matrixGate'.

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

     Joern Toedling toedling@ebi.ac.uk

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

     Classes 'cytoFrame-class', 'cytoSet-class', 'plot.cytoFrameGate'
     for plotting

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

       ## Not run: 
         # don't run during package test, because requires user input

         # read in FCS files:
         mySet   <- readCytoSet(...)

         # let user do gating:
         mySGate <- gate.cytoSet(mySet)

         # visualize gating:
         plot(mySGate,mySet,pch=".",cex=2)
       ## End(Not run)

