"FCS-class"             package:rflowcyt             R Documentation

_C_l_a_s_s "_F_C_S" : _F_l_o_w _C_y_t_o_m_e_t_r_y _S_t_a_n_d_a_r_d

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

     This class represents objects read from raw binary Flow Cytometry
     Standard (FCS) files.  These files contain a data portion,
     consisting of immunofluorescence and other column variables for
     each cell or row observation, and a metadata portion, which
     contains information such as parameter shortnames, longnames,
     ranges and data dimensions as well as file information.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("FCS", ...)'.

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

     '_d_a_t_a': Object of class '"matrix"' which holds integer data such
          that the columns are the variables (usually
          immunofluorescence measurements) and the rows are the cell
          observations. 

     '_m_e_t_a_d_a_t_a': Object of class '"FCSmetadata"' which holds
          information about the file, data, and column variables among
          other items in the header of the original raw FCS binary
          file.

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

     "[" 'signature(x = "FCS")': Extracts the data

     "[<-" 'signature(x = "FCS")': Replaces or sets the data

     "[[" 'signature(x = "FCS")': Extracts the metadata 

     "[[<-" 'signature(x = "FCS")': Replaces or sets the metadata 

     _a_d_d_P_a_r_a_m_e_t_e_r 'signature(x = "FCS", colvar = "vector")': Adds a
          column parameter to the data 

     _c_h_e_c_k_v_a_r_s 'signature(x = "FCS")': Checks the compatibility of the
          metadata against the data dimensions and column/parameter
          names and ranges 

     _c_o_e_r_c_e 'signature(from = "FCS", to = "matrix")': Returns the data
          as a matrix

     _c_o_e_r_c_e 'signature(from = "FCS", to = "data.frame")': Returns the
          data as a data.frame 

     _c_o_e_r_c_e 'signature(from = "matrix", to = "FCS")': Returns an FCS
          object with data and default prototype metadata

     _c_o_e_r_c_e 'signature(from = "data.frame", to = "FCS")': Returns an
          FCS object with data and default prototype metadata 

     _d_i_m._F_C_S 'signature(x = "FCS")' : Returns the dimensions (ie, the
          number of rows and columns respectively) of the data matrix;
          the output is a vector 

     _e_q_u_a_l_s 'signature(x = "FCS", y = "FCS")': Compares the equality of
          two objects in terms of data and metadata correspondence 

     _f_i_x_v_a_r_s 'signature(x = "FCS")': Sets the discrepant metadata slots
          to values in from the data 

     _f_l_u_o_r_s 'signature(x = "FCS")': Returns the complete data portion
          of the object

     _m_e_t_a_D_a_t_a 'signature(x = "FCS")': Returns the complete metadata
          portion of the object 

     "_p_l_o_t-_m_e_t_h_o_d_s" 'signature(x = "FCS", y = "missing")': Plots the
          object as a pairs plot (with rectangular binned contour-image
          plots or hexagonal binned image plots) or as a joint or
          marginal image parallel coordinates plot

     "_p_r_i_n_t-_m_e_t_h_o_d_s" 'signature(x = "FCS")': Prints a brief description
          about the original filename, dimensions of the data, and the
          original status of the current object's data

     "_s_h_o_w-_m_e_t_h_o_d_s" 'signature(object = "FCS")': Prints a brief
          description about the original filename, dimensions of the
          data, and the original status of the current object's data 

     "_s_u_m_m_a_r_y-_m_e_t_h_o_d_s" 'signature(object = "FCS")': Summaries the
          data's dimensions, five-number summaries on the column
          parameters, the information contained in the metadata

_N_o_t_e:

     The function 'read.FCS' is used to read in a raw binary FCS files
     and output a "FCS-class" object.

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

     A.J. Rossini, J.Y. Wan, and Zoe Moodie

_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:

     'read.FCS', '"FCSgate-class"', '"FCSsummary-class"',
     '"FCSmetadata-class"', '"plot-methods"', '"print-methods"',
     '"show-methods"', '"summary-methods"', '"coerce-methods"',
     '"subset-methods"', '"subset2-methods"', '"subsetassign-methods"',
     '"subset2assign-methods"', 'checkvars', 'fixvars', 'equals', 
     'addParameter',  'fluors', 'metaData',  'dim.FCS'

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

     ## a default FCS object
     default.FCSobj<-new("FCS")

     ## making my own FCS object
     ## first making up the data
     dummy.data<-matrix(1:1000, ncol=10)
     colnames(dummy.data)<-paste("foo", 1:10, sep="")

     ## second making up the metadata
     ##   default FCSmetadata
     dummy.metadata<-new("FCSmetadata")
     ##   user-defined metadata
     foo.metadata<-new("FCSmetadata", mode="none", size=100, nparam=10,
     shortnames=paste("V", 1:10, sep=""), longnames=colnames(dummy.data),
     paramranges=unlist(apply(dummy.data, 2, max)), filename="",
     objectname="foo.FCSobj", fcsinfo=list("extraInfo1"="dummy FCS",
     "extraInfo2"=9:20))

     foo.FCSobj<-new("FCS", data=dummy.data, metadata=foo.metadata)

     dummy.FCSobj<-new("FCS", data=matrix(), metadata=dummy.metadata)

     ## extraction of the metadata
     foo.FCSobj[["size"]]
     ## replacement of the metadata
      ## introduce an error in the column length
     foo.FCSobj[["nparam"]]<-0

     ## extraction of the data

     first.ten.obs<-foo.FCSobj[1:10,]
     ## replacement of the data
     foo.FCSobj[1:10,]<-matrix(1:100, ncol=10)
     ## addParameter
     foo.FCSobj<-addParameter(foo.FCSobj, 1:100, shortname="newvar",
     longname="newlymadevariable", use.shortname=FALSE)

     ## replacement of the metadata
      ## introduce an error in the column length
     foo.FCSobj[["nparam"]]<-0

     ## checkvars
     correct.status.is.FALSE<-checkvars(foo.FCSobj)
     ## coerce FCS to matrix
     coerced.mat<-as(foo.FCSobj, "matrix")
     is(coerced.mat, "matrix")
     ## coerce FCS to data.frame
     coerced.df<-as(foo.FCSobj, "data.frame")
     is(coerced.df, "data.frame")
     ## coerce matrix to FCS
     FCSobj1<-as(coerced.mat, "FCS")
     is(FCSobj1, "FCS")
     ## coerce data.frame to FCS
     FCSobj2<-as(coerced.df, "FCS")
     is(FCSobj2, "FCS")

     ##obtaining the dimensions of the data
     dim.FCS(FCSobj2)

     ## equals

     ## should be TRUE
     equals(FCSobj1, FCSobj2, check.filename=TRUE, check.objectname=TRUE)

     ## default does not check filename or objectname equality
     ## should be FALSE
     equals(foo.FCSobj, dummy.FCSobj)

     ## fixvars
     foo.FCSobj<-fixvars(foo.FCSobj)
     ## fluors
     data.mat<-fluors(foo.FCSobj)
     ## metaData
     metadata.ls<-metaData(foo.FCSobj)
     ## plot
     ## not interesting to plot dummy data

     ## default plot is pairs.CSP <pairs plot with Contour-images>
     ## plot(foo.FCSobj)

     ## can do joint image.parallel.coordinates pairs plots
     ## plot(foo.FCSobj, image.parallel.plot=TRUE)

     ## can do marginal image parallel coordinates pairs plots
     ## plot(foo.FCSobj, image.parallel.plot=TRUE, joint=FALSE)

     ## print
     print(foo.FCSobj)
     foo.FCSobj

     ## show
     show(foo.FCSobj)

     ## summary
     summary(foo.FCSobj)
     summary(dummy.FCSobj)

