cytoSet-class            package:rflowcyt            R Documentation

'_c_y_t_o_S_e_t': _a _c_l_a_s_s _f_o_r _s_t_o_r_i_n_g _r_a_w _d_a_t_a _f_r_o_m
_a _q_u_a_n_t_i_t_a_t_i_v_e _c_e_l_l-_b_a_s_e_d _a_s_s_a_y

_D_e_s_c_r_i_p_t_i_o_n:

     This class is a container for a set of 'cytoFrame' objects

_C_r_e_a_t_i_n_g _O_b_j_e_c_t_s:

     Objects can be created using the function 'readCytoSet' or via
      '  new('cytoSet,'
      '    frames = ....,   # environment with cytoFrames'
      '    phenoData = .... # object of class phenoData'
      '    colnames = ....  # object of class character'
      '  )'

_S_l_o_t_s:

     '_f_r_a_m_e_s': An 'environment' containing one or more 'cytoFrame'
          objects.

     '_p_h_e_n_o_D_a_t_a': A 'phenoData'. Each row corresponds to one of the
          cytoFrames in the 'frames' slot. It is mandatory that the
          pData has column named 'name'

     '_c_o_l_n_a_m_e_s': A 'character' object with the (common) column names of
          all the data matrices in the cytoFrames.

_M_e_t_h_o_d_s:

     [, [[ subsetting. If 'x' is 'cytoSet', then 'x[i]' returns a
          'cytoSet' object, and 'x[[i]]' a 'cytoFrame' object. The
          semantics is similar to the behavior of the subsetting
          operators for lists.

     _c_o_l_n_a_m_e_s, _c_o_l_n_a_m_e_s<- extract or replace the 'colnames' slot.

     _p_h_e_n_o_D_a_t_a, _p_h_e_n_o_D_a_t_a<- extract or replace the 'phenoData' slot.

     _s_h_o_w display summary.

_I_m_p_o_r_t_a_n_t _n_o_t_e _o_n _s_t_o_r_a_g_e _a_n_d _p_e_r_f_o_r_m_a_n_c_e:

     The bulk of the data in a 'cytoSet' object is stored in an
     'environment', and is therefore not automatically copied when the
     'cytoSet' object is copied. If 'x' is an object of class
     'cytoSet', then the code

     y <- x will create a an object 'y' that contains copies of the
     'phenoData' and administrative data in 'x', but refers to the
     _same_ environment with the actual fluorescence data. See below
     for how to create proper copies.

     The reason for this is performance. The pass-by-value semantics of
     function calls in 'R' can result in numerous copies of the same
     data object being made in the course of a series of nested
     function calls. If the data object is large, this can result in a
     considerable cost of memory and performance. 'cytoSet' objects are
     intended to contain experimental data in the order of hundreds of
     Megabytes, which can effectively be treated as read-only: typical
     tasks are the extraction of subsets and the calculation of summary
     statistics. This is afforded by the design of the 'cytoSet' class:
     an object of that class contains a 'phenoData' slot, some
     administrative information, and a _reference_ to an environment
     with the fluorescence data; when it is copied, only the reference
     is copied, but not the potentially large set of fluorescence data
     themselves.

     However, note that subsetting operations, such as

     y <- x[i]

     do create proper copies, including a copy of the appropriate part
     of the fluorescence data, as it should be expected. Thus, to make
     a proper copy of a 'cytoSet' 'x', use

     y <- x[seq(along=x)] 

_A_u_t_h_o_r(_s):

     Wolfgang Huber <URL: http://www.ebi.ac.uk/huber>

_S_e_e _A_l_s_o:

     'readCytoSet', 'cytoFrame-class'

_E_x_a_m_p_l_e_s:

     if (require(prada)) {
     cset<-readCytoSet(path=system.file("extdata", package="prada"),
       pattern="[A-Z][0-9][0-9]$")
     cset
     pData(cset)
     cset[[1]]
     cset[["fas-Bcl2-plate323-04-04.A02"]]
     cset["fas-Bcl2-plate323-04-04.A02"]
     cset[1:3]
     cset[[1]] <- exprs(cset[[1]])[1:100, ]

     plot(cset[[2]])
     }

     if (require(rfcdmin) && require(prada)) {

      ##obtaining the location of the fcs files in the data
       pathFiles<-system.file("bccrc", package="rfcdmin")
       drugFiles<-dir(pathFiles)

      ## reading in the FCS files
       drugData<-readCytoSet(path=system.file("bccrc", package="rfcdmin"),pattern="[A-Z][0-9][0-9]$")
       }

