extractGatedData          package:rflowcyt          R Documentation

_E_x_t_r_a_c_t _t_h_e _d_a_t_a _o_f _a _F_C_S _o_b_j_e_c_t _u_s_i_n_g _a _s_p_e_c_i_f_i_e_d _G_a_t_i_n_g _I_n_d_e_x

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

     This function will subset/reduce the rows of the data of an FCS
     object  according to a column index of the "gate" matrix, which is
     created by using the function 'createGate-methods'.

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

     extractGatedData(x, gateNum = NULL, IndexValue.In = 1, MY.DEBUG = FALSE)

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

       x: an "FCSgate" object obtained from 'createGate' 

 gateNum: the column position of the gating index that is specified in
          the "gate" matrix 

IndexValue.In: either 0 or 1 depending on what value should be set for
          inclusion in the extraction. The default is the value 1. 

MY.DEBUG: a boolean value that prints out debugging comments The
          default is FALSE and no debugging comments are printed.

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

     A "FCSgate" object with data having a reduced row length will be
     output along with an update to the following slots:
     "extractGatedData.msg" (The gateNum along with the inclusion value
     will be noted as a string), "current.data.obs" (the index of
     original data row positions that are currently in the data will be
     noted), and "metadata" (data dimension information will be updated
     along with the original status being changed to FALSE).

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

     A "FCSgate" S4 object is returned that extends the "FCS" object to
     contain additional slots:  

    gate: a matrix whose columns are the gating indices for the
          original data

 history: vector which corresponds to each column gating index in
          "gate" and holds information about what variables and type of
          gate that was implemented and for what ranges of values

extractGatedData.msg: vector of strings to specify what if any
          extraction has been implemented using 'extractGatedData';
          "NONE" specifies no extraction has been implemented on the
          data for that particular corresponding gating index

current.data.obs: vector of the original data row positions that are
          currently still in the data matrix

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

     A.J. Rossini and J.Y. Wan

_R_e_f_e_r_e_n_c_e_s:

     Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The
     Elements of Statistical Learning: Data Mining, Inference, and
     Prediction. Springer Series in Statistics : New York, 2001.
     pp.279-283.

     Jerome H. Friedman and Nicholas I. Fisher. Bump Hunting in
     High-Dimensional Data. Tech Report. October 28, 1998.

     J. Paul Robinson, et al. Current Protocols in Cytometry.  John
     Wiley & Sons, Inc : 2001.

     Mario Roederer and Richard R. Hardy. Frequency Difference Gating:
     A Multivariate Method for Identifying Subsets that Differe between
     Samples. Cytometry, 45:56-64, 2001.

     Mario Roederer and Adam Treister and Wayne Moore and Leonore A.
     Herzenberg. Probability Binning Comparison: A Metric for
     Quantitating Univariate Distribution Differences. Cytometry,
     45:37-46, 2001.

     Keith A. Baggerly. Probability Binning and Testing Agreement
     between Multivariate Immunofluorescence Histograms: Extending the
     Chi-Squared Test. Cytometry, 45:141-150, 2001.

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

     'FCS-class', 'FCSgate-class', 'createGate'

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

      if (require(rfcdmin)) {
           data.there<-is.element("MC.053",objects())
           if ((sum(data.there) != length(data.there))) {
             ## obtaining the FCS objects from VRC data
             data(MC.053min)
           }
       
     ####  test1 : Gating type: uniscut, univariate single cut
     test1 <- createGate(MC.053, varpos=1, gatingrange=256,
                         type="uniscut", MY.DEBUG=TRUE)

     #### test2.3 : Gating type : biscut -/-
     test2.3 <- createGate(test1, varpos=c(1,2),
                           gatingrange=c(256, 300),
                           type="biscut",
                           biscut.quadrant="-/-",
                           prev.gateNum=NULL,
                           MY.DEBUG=TRUE)

     ### test 2.3.1 : extraction
     test2.3.1 <- extractGatedData(test2.3, gateNum=2,
                                   IndexValue.In=1,
                                   MY.DEBUG=TRUE)
     }

