\HeaderA{"FCS-class"}{Class "FCS" : Flow Cytometry Standard}{"FCS.Rdash.class"}
\aliasA{"addParameter-methods",FCS,vector-method}{"FCS-class"}{"addParameter.Rdash.methods",FCS,vector.Rdash.method}
\aliasA{"checkvars-methods",FCS-method}{"FCS-class"}{"checkvars.Rdash.methods",FCS.Rdash.method}
\aliasA{"coerce-methods",data.frame,FCS-method}{"FCS-class"}{"coerce.Rdash.methods",data.frame,FCS.Rdash.method}
\aliasA{"coerce-methods",FCS,data.frame-method}{"FCS-class"}{"coerce.Rdash.methods",FCS,data.frame.Rdash.method}
\aliasA{"coerce-methods",FCS,matrix-method}{"FCS-class"}{"coerce.Rdash.methods",FCS,matrix.Rdash.method}
\aliasA{"coerce-methods",matrix,FCS-method}{"FCS-class"}{"coerce.Rdash.methods",matrix,FCS.Rdash.method}
\aliasA{"dim.FCS-methods",FCS-method}{"FCS-class"}{"dim.FCS.Rdash.methods",FCS.Rdash.method}
\aliasA{"equals-methods",FCS,FCS-method}{"FCS-class"}{"equals.Rdash.methods",FCS,FCS.Rdash.method}
\aliasA{"FCS"}{"FCS-class"}{"FCS"}
\aliasA{"fixvars-methods",FCS-method}{"FCS-class"}{"fixvars.Rdash.methods",FCS.Rdash.method}
\aliasA{"fluors-methods",FCS-method}{"FCS-class"}{"fluors.Rdash.methods",FCS.Rdash.method}
\aliasA{"ggobi-methods",FCS-method}{"FCS-class"}{"ggobi.Rdash.methods",FCS.Rdash.method}
\aliasA{"metaData-methods",FCS-method}{"FCS-class"}{"metaData.Rdash.methods",FCS.Rdash.method}
\aliasA{"plot-methods",FCS,missing-method}{"FCS-class"}{"plot.Rdash.methods",FCS,missing.Rdash.method}
\aliasA{"print-methods",FCS-method}{"FCS-class"}{"print.Rdash.methods",FCS.Rdash.method}
\aliasA{"show-methods",FCS-method}{"FCS-class"}{"show.Rdash.methods",FCS.Rdash.method}
\aliasA{"summary-methods",FCS-method}{"FCS-class"}{"summary.Rdash.methods",FCS.Rdash.method}
\aliasA{"[-methods",FCS-method}{"FCS-class"}{"[.Rdash.methods",FCS.Rdash.method}
\aliasA{"[<--methods",FCS-method}{"FCS-class"}{"[<.Rdash..Rdash.methods",FCS.Rdash.method}
\aliasA{"[[-methods",FCS-method}{"FCS-class"}{"[[.Rdash.methods",FCS.Rdash.method}
\aliasA{"[[<--methods",FCS-method}{"FCS-class"}{"[[<.Rdash..Rdash.methods",FCS.Rdash.method}
\aliasA{addParameter,FCS,vector-method}{"FCS-class"}{addParameter,FCS,vector.Rdash.method}
\aliasA{checkvars,FCS-method}{"FCS-class"}{checkvars,FCS.Rdash.method}
\aliasA{coerce,data.frame,FCS-method}{"FCS-class"}{coerce,data.frame,FCS.Rdash.method}
\aliasA{coerce,FCS,data.frame-method}{"FCS-class"}{coerce,FCS,data.frame.Rdash.method}
\aliasA{coerce,FCS,matrix-method}{"FCS-class"}{coerce,FCS,matrix.Rdash.method}
\aliasA{coerce,matrix,FCS-method}{"FCS-class"}{coerce,matrix,FCS.Rdash.method}
\aliasA{dim.FCS,FCS-method}{"FCS-class"}{dim.FCS,FCS.Rdash.method}
\aliasA{equals,FCS,FCS-method}{"FCS-class"}{equals,FCS,FCS.Rdash.method}
\aliasA{FCS}{"FCS-class"}{FCS}
\aliasA{FCS-class}{"FCS-class"}{FCS.Rdash.class}
\aliasA{fixvars,FCS-method}{"FCS-class"}{fixvars,FCS.Rdash.method}
\aliasA{fluors,FCS-method}{"FCS-class"}{fluors,FCS.Rdash.method}
\aliasA{ggobi,FCS-method}{"FCS-class"}{ggobi,FCS.Rdash.method}
\aliasA{metaData,FCS-method}{"FCS-class"}{metaData,FCS.Rdash.method}
\aliasA{plot,FCS,missing-method}{"FCS-class"}{plot,FCS,missing.Rdash.method}
\aliasA{print,FCS-method}{"FCS-class"}{print,FCS.Rdash.method}
\aliasA{show,FCS-method}{"FCS-class"}{show,FCS.Rdash.method}
\aliasA{summary,FCS-method}{"FCS-class"}{summary,FCS.Rdash.method}
\aliasA{[,FCS-method}{"FCS-class"}{[,FCS.Rdash.method}
\aliasA{[<-,FCS-method}{"FCS-class"}{[<.Rdash.,FCS.Rdash.method}
\aliasA{[[,FCS-method}{"FCS-class"}{[[,FCS.Rdash.method}
\aliasA{[[<-,FCS-method}{"FCS-class"}{[[<.Rdash.,FCS.Rdash.method}
\keyword{classes}{"FCS-class"}
\begin{Description}\relax
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.
\end{Description}
\begin{Section}{Objects from the Class}
Objects can be created by calls of the form \code{new("FCS", ...)}.
\end{Section}
\begin{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.

}
\end{Section}
\begin{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

}
\end{Section}
\begin{Note}\relax
The function \code{read.FCS} is used to read in a raw binary FCS
files and output a \LinkA{"FCS-class"}{"FCS.Rdash.class"} object.
\end{Note}
\begin{Author}\relax
A.J. Rossini, J.Y. Wan, and Zoe Moodie
\end{Author}
\begin{References}\relax
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.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{read.FCS}{read.FCS}},
\code{\LinkA{"FCSgate-class"}{"FCSgate.Rdash.class"}},
\code{\LinkA{"FCSsummary-class"}{"FCSsummary.Rdash.class"}},
\code{\LinkA{"FCSmetadata-class"}{"FCSmetadata.Rdash.class"}},
\code{\LinkA{"plot-methods"}{"plot.Rdash.methods"}},
\code{\LinkA{"print-methods"}{"print.Rdash.methods"}},
\code{\LinkA{"show-methods"}{"show.Rdash.methods"}},
\code{\LinkA{"summary-methods"}{"summary.Rdash.methods"}},
\code{\LinkA{"coerce-methods"}{"coerce.Rdash.methods"}},
\code{\LinkA{"[-methods"}{"[.Rdash.methods"}},
\code{\LinkA{"[[-methods"}{"[[.Rdash.methods"}},
\code{\LinkA{"[<--methods"}{"[<.Rdash..Rdash.methods"}},
\code{\LinkA{"[[<--methods"}{"[[<.Rdash..Rdash.methods"}},
\code{\LinkA{checkvars}{checkvars}},
\code{\LinkA{fixvars}{fixvars}},
\code{\LinkA{equals}{equals}}, 
\code{\LinkA{addParameter}{addParameter}}, 
\code{\LinkA{fluors}{fluors}},
\code{\LinkA{metaData}{metaData}}, 
\code{\LinkA{dim.FCS}{dim.FCS}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

## 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)
\end{ExampleCode}
\end{Examples}

