"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"',
     '"[-methods"', '"[[-methods"', '"[<--methods"', '"[[<--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)

