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

