\name{"FCS-class"} \docType{class} \alias{"FCS"} \alias{FCS-class} \alias{FCS} \alias{"FCS-class"} \alias{[,FCS-method} \alias{[<-,FCS-method} \alias{[[,FCS-method} \alias{[[<-,FCS-method} \alias{[[<-,FCS, ANY, ANY} \alias{"[-methods",FCS-method} \alias{"[<--methods",FCS-method} \alias{"[[-methods",FCS-method} \alias{"[[<--methods",FCS-method} \alias{addParameter,FCS,vector-method} \alias{checkvars,FCS-method} \alias{coerce,FCS,matrix-method} \alias{coerce,FCS,data.frame-method} \alias{coerce,matrix,FCS-method} \alias{coerce,data.frame,FCS-method} \alias{dim.FCS,FCS-method} \alias{equals,FCS,FCS-method} \alias{fixvars,FCS-method} \alias{fluors,FCS-method} \alias{ggobi,FCS-method} \alias{metaData,FCS-method} \alias{plot,FCS,missing-method} \alias{print,FCS-method} \alias{show,FCS-method} \alias{summary,FCS-method} \alias{"addParameter-methods",FCS,vector-method} \alias{"checkvars-methods",FCS-method} \alias{"coerce-methods",FCS,matrix-method} \alias{"coerce-methods",FCS,data.frame-method} \alias{"coerce-methods",matrix,FCS-method} \alias{"coerce-methods",data.frame,FCS-method} \alias{"dim.FCS-methods",FCS-method} \alias{"equals-methods",FCS,FCS-method} \alias{"fixvars-methods",FCS-method} \alias{"fluors-methods",FCS-method} \alias{"ggobi-methods",FCS-method} \alias{"metaData-methods",FCS-method} \alias{"plot-methods",FCS,missing-method} \alias{"print-methods",FCS-method} \alias{"show-methods",FCS-method} \alias{"summary-methods",FCS-method} \title{Class "FCS" : Flow Cytometry Standard } \description{ 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. } \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("FCS", ...)}. } \section{Slots}{ \describe{ \item{\code{data}:}{Object of class \code{"matrix"} which holds integer data such that the columns are the variables (usually immunofluorescence measurements) and the rows are the cell observations. } \item{\code{metadata}:}{Object of class \code{"FCSmetadata"} which holds information about the file, data, and column variables among other items in the header of the original raw FCS binary file.} } } \section{Methods}{ \describe{ \item{"["}{\code{signature(x = "FCS")}: Extracts the data} \item{"[<-"}{\code{signature(x = "FCS")}: Replaces or sets the data} \item{"[["}{\code{signature(x = "FCS")}: Extracts the metadata } \item{"[[<-"}{\code{signature(x = "FCS")}: Replaces or sets the metadata } \item{addParameter}{\code{signature(x = "FCS", colvar = "vector")}: Adds a column parameter to the data } \item{checkvars}{\code{signature(x = "FCS")}: Checks the compatibility of the metadata against the data dimensions and column/parameter names and ranges } \item{coerce}{\code{signature(from = "FCS", to = "matrix")}: Returns the data as a matrix} \item{coerce}{\code{signature(from = "FCS", to = "data.frame")}: Returns the data as a data.frame } \item{coerce}{\code{signature(from = "matrix", to = "FCS")}: Returns an FCS object with data and default prototype metadata} \item{coerce}{\code{signature(from = "data.frame", to = "FCS")}: Returns an FCS object with data and default prototype metadata } \item{dim.FCS}{\code{signature(x = "FCS")} : Returns the dimensions (ie, the number of rows and columns respectively) of the data matrix; the output is a vector } \item{equals}{\code{signature(x = "FCS", y = "FCS")}: Compares the equality of two objects in terms of data and metadata correspondence } \item{fixvars}{\code{signature(x = "FCS")}: Sets the discrepant metadata slots to values in from the data } \item{fluors}{\code{signature(x = "FCS")}: Returns the complete data portion of the object} \item{metaData}{\code{signature(x = "FCS")}: Returns the complete metadata portion of the object } \item{"plot-methods"}{\code{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} \item{"print-methods"}{\code{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} \item{"show-methods"}{\code{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 } \item{"summary-methods"}{\code{signature(object = "FCS")}: Summaries the data's dimensions, five-number summaries on the column parameters, the information contained in the metadata} } } \references{ 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. } \author{A.J. Rossini, J.Y. Wan, and Zoe Moodie} \note{The function \code{read.FCS} is used to read in a raw binary FCS files and output a \link{"FCS-class"} object.} \seealso{ \code{\link{read.FCS}}, \code{\link{"FCSgate-class"}}, \code{\link{"FCSsummary-class"}}, \code{\link{"FCSmetadata-class"}}, \code{\link{"plot-methods"}}, \code{\link{"print-methods"}}, \code{\link{"show-methods"}}, \code{\link{"summary-methods"}}, \code{\link{"coerce-methods"}}, \code{\link{"[-methods"}}, \code{\link{"[[-methods"}}, \code{\link{"[<--methods"}}, \code{\link{"[[<--methods"}}, \code{\link{checkvars}}, \code{\link{fixvars}}, \code{\link{equals}}, \code{\link{addParameter}}, \code{\link{fluors}}, \code{\link{metaData}}, \code{\link{dim.FCS}} } \examples{ ## 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 ## 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) } \keyword{classes}