\HeaderA{ExpressionSet}{Class to Contain and Describe High-Throughput Expression Level Assays.}{ExpressionSet}
\aliasA{as.data.frame.ExpressionSet}{ExpressionSet}{as.data.frame.ExpressionSet}
\aliasA{class:ExpressionSet}{ExpressionSet}{class:ExpressionSet}
\aliasA{coerce,eSet,ExpressionSet-method}{ExpressionSet}{coerce,eSet,ExpressionSet.Rdash.method}
\aliasA{coerce,ExpressionSet,data.frame-method}{ExpressionSet}{coerce,ExpressionSet,data.frame.Rdash.method}
\aliasA{coerce,exprSet,ExpressionSet-method}{ExpressionSet}{coerce,exprSet,ExpressionSet.Rdash.method}
\aliasA{esApply,ExpressionSet-method}{ExpressionSet}{esApply,ExpressionSet.Rdash.method}
\aliasA{ExpressionSet-class}{ExpressionSet}{ExpressionSet.Rdash.class}
\aliasA{exprs,ExpressionSet-method}{ExpressionSet}{exprs,ExpressionSet.Rdash.method}
\aliasA{exprs<-,ExpressionSet,matrix-method}{ExpressionSet}{exprs<.Rdash.,ExpressionSet,matrix.Rdash.method}
\aliasA{geneNames,ExpressionSet-method}{ExpressionSet}{geneNames,ExpressionSet.Rdash.method}
\aliasA{geneNames<-,ExpressionSet,character-method}{ExpressionSet}{geneNames<.Rdash.,ExpressionSet,character.Rdash.method}
\aliasA{initialize,ExpressionSet-method}{ExpressionSet}{initialize,ExpressionSet.Rdash.method}
\aliasA{makeDataPackage,ExpressionSet-method}{ExpressionSet}{makeDataPackage,ExpressionSet.Rdash.method}
\aliasA{updateObject,ExpressionSet-method}{ExpressionSet}{updateObject,ExpressionSet.Rdash.method}
\aliasA{write.exprs,ExpressionSet-method}{ExpressionSet}{write.exprs,ExpressionSet.Rdash.method}
\keyword{classes}{ExpressionSet}
\begin{Description}\relax
Container for high-throughput assays and experimental
metadata. \code{ExpressionSet} class is derived from
\code{\LinkA{eSet}{eSet}}, and requires a matrix named \code{exprs} as
assayData member.
\end{Description}
\begin{Section}{Extends}
Directly extends class \code{\LinkA{eSet}{eSet}}.
\end{Section}
\begin{Section}{Creating Objects}
\code{new("ExpressionSet")}

\code{new("ExpressionSet",
    phenoData = new("AnnotatedDataFrame"),
    featureData = new("AnnotatedDataFrame"),
    experimentData = new("MIAME"),
    annotation = character(0),
    exprs = new("matrix"))
  }

This creates an \code{ExpressionSet} with \code{assayData} implicitly
created to contain \code{exprs}. Additional named matrix arguments
with the same dimensions as \code{exprs} are added to
\code{assayData}; the row and column names of these additional
matricies should match those of \code{exprs}. 

\code{new("ExpressionSet",
    assayData = assayDataNew(exprs=new("matrix")),
    phenoData = new("AnnotatedDataFrame"),
    featureData = new("AnnotatedDataFrame"),
    experimentData = new("MIAME"),
    annotation = character(0))
  }

This creates an \code{ExpressionSet} with \code{assayData} provided
explicitly. In this form, the only required named argument is
\code{assayData}.

\code{as([exprSet],"ExpressionSet")}

\code{ExpressionSet} instances are usually created through
\code{new("ExpressionSet", ...)}. Usually the arguments to \code{new}
include \code{exprs} (a matrix of expression data, with features
corresponding to rows and samples to columns), \code{phenoData}, \code{featureData},
\code{experimentData}, and \code{annotation}. 
\code{phenoData}, \code{featureData}, \code{experimentData}, and \code{annotation} can be
missing, in which case they are assigned default values.
\end{Section}
\begin{Section}{Slots}
Inherited from \code{eSet}:
\describe{
\item[\code{assayData}:] Contains matrices with equal
dimensions, and with column number equal to
\code{nrow(phenoData)}. \code{assayData} must contain a matrix
\code{exprs} with rows represening features (e.g., reporters)
and columns representing samples. Additional matrices of
identical size (e.g., representing measurement errors) may
also be included in \code{assayData}. Class:\code{\LinkA{AssayData-class}{AssayData.Rdash.class}}
\item[\code{phenoData}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{featureData}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{experimentData}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{annotation}:] See \code{\LinkA{eSet}{eSet}}
}
\end{Section}
\begin{Section}{Methods}
Class-specific methods.
\describe{
\item[\code{as(exprSet,"ExpressionSet")}] Coerce objects of
\code{\LinkA{exprSet-class}{exprSet.Rdash.class}} to \code{ExpressionSet}
\item[\code{as(object,"data.frame")}] Coerce objects of
\code{\LinkA{ExpressionSet-class}{ExpressionSet.Rdash.class}} to \code{data.frame} by
transposing the expression matrix and concatenating \code{phenoData}
\item[\code{exprs(ExpressionSet)}, \code{exprs(ExpressionSet,matrix)<-}] Access and
set elements named \code{exprs} in the \code{AssayData-class}
slot.
\item[\code{esApply(ExpressionSet, MARGIN, FUN,
         ...)}] 'apply'-like function to conveniently operate on
\code{ExpressionSet} objects. See \code{\LinkA{esApply}{esApply}}.
\item[\code{write.exprs(ExpressionSet)}] Write expression values to
a text file. It takes the same arguments as
\code{write.table}
}

Derived from \code{\LinkA{eSet}{eSet}}:
\describe{
\item[\code{updateObject(object, ..., verbose=FALSE)}] Update instance to current version, if necessary. See \code{\LinkA{updateObject}{updateObject}} and \code{\LinkA{eSet}{eSet}}
\item[\code{isCurrent(object)}] Determine whether version of object is current. See \code{\LinkA{isCurrent}{isCurrent}}
\item[\code{isVersioned(object)}] Determine whether object contains a 'version' string describing its structure . See \code{\LinkA{isVersioned}{isVersioned}}
\item[\code{assayData(ExpressionSet)}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{sampleNames(ExpressionSet)} and \code{sampleNames(ExpressionSet)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{featureNames(ExpressionSet)}, \code{featureNames(ExpressionSet, value)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{geneNames(ExpressionSet)} and
\code{geneNames(ExpressionSet, value)<-}:] Deprecated.  Has
the same effect as \code{featureNames} which is the preferred
accessor of expression matrix row names.
\item[\code{dims(ExpressionSet)}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{phenoData(ExpressionSet)}, \code{phenoData(ExpressionSet,value)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{varLabels(ExpressionSet)}, \code{varLabels(ExpressionSet, value)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{varMetadata(ExpressionSet)}, \code{varMetadata(ExpressionSet,value)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{pData(ExpressionSet)}, \code{pData(ExpressionSet,value)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{varMetadata(ExpressionSet)}, \code{varMetadata(ExpressionSet,value)}] See \code{\LinkA{eSet}{eSet}}
\item[\code{experimentData(ExpressionSet)},\code{experimentData(ExpressionSet,value)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{pubMedIds(ExpressionSet)}, \code{pubMedIds(ExpressionSet,value)}] See \code{\LinkA{eSet}{eSet}}
\item[\code{abstract(ExpressionSet)}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{annotation(ExpressionSet)}, \code{annotation(ExpressionSet,value)<-}] See \code{\LinkA{eSet}{eSet}}
\item[\code{combine(ExpressionSet,ExpressionSet)}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{storageMode(ExpressionSet)}, \code{storageMode(ExpressionSet,character)<-}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{reporterNames(ExpressionSet)}, \code{reporterNames(ExpressionSet,value)<-}:] DEPRECATED
}

Standard generic methods:
\describe{
\item[\code{initialize(ExpressionSet)}:] Object instantiation, used
by \code{new}; not to be called directly by the user.
\item[\code{updateObject(ExpressionSet)}:] Update outaded versions
of \code{ExpressionSet} to their current definiton. See
\code{\LinkA{updateObject}{updateObject}}, \code{\LinkA{Versions-class}{Versions.Rdash.class}}.
\item[\code{validObject(ExpressionSet)}:] Validity-checking method, ensuring
that \code{exprs} is a member of
\code{assayData}. \code{checkValidity(ExpressionSet)} imposes this
validity check, and the validity checks of \code{eSet}.
\item[\code{makeDataPackage(object, author, email,
        packageName, packageVersion, license, biocViews, filePath,
        ...)}] Create a data package based on an ExpressionSet
object. See \code{\LinkA{makeDataPackage}{makeDataPackage}}.
\item[\code{as(exprSet,ExpressionSet)}:] Coerce \code{exprSet} too \code{ExpressionSet}.
\item[\code{as(eSet,ExpressionSet)}:] Coerce the \code{eSet} portion of an object to \code{ExpressionSet}.
\item[\code{show(ExpressionSet)}] See \code{\LinkA{eSet}{eSet}}
\item[\code{dim(ExpressionSet)}, \code{ncol}] See \code{\LinkA{eSet}{eSet}}
\item[\code{ExpressionSet[(index)}:] See \code{\LinkA{eSet}{eSet}}
\item[\code{ExpressionSet\$}, \code{ExpressionSet\$<-}] See \code{\LinkA{eSet}{eSet}}
\item[\code{ExpressionSet[[i]]}, \code{ExpressionSet[[i]]<-}] See \code{\LinkA{eSet}{eSet}}
}
\end{Section}
\begin{Author}\relax
Biocore team
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{eSet-class}{eSet.Rdash.class}}, \code{\LinkA{ExpressionSet-class}{ExpressionSet.Rdash.class}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# create an instance of ExpressionSet
new("ExpressionSet")

new("ExpressionSet",
    exprs=matrix(runif(1000), nrow=100, ncol=10))

# update an existing ExpressionSet
data(sample.ExpressionSet)
updateObject(sample.ExpressionSet)

# update existing exprSet-like class to ExpressionSet
data(sample.exprSet)
expressionSet <- as(sample.exprSet,"ExpressionSet")
expressionSet

# information about assay and sample data
featureNames(expressionSet)[1:10]
sampleNames(expressionSet)[1:5]
phenoData(expressionSet)
experimentData(expressionSet)

# subset: first 10 genes, samples 2, 4, and 10
expressionSet <- as(sample.exprSet,"ExpressionSet")
expressionSet[1:10,c(2,4,10)]

# named features and their expression levels
subset <- expressionSet[c("AFFX-BioC-3_at","AFFX-BioDn-5_at"),]
exprs(subset)

# samples with above-average 'score' in phenoData
highScores <- expressionSet$score > mean(expressionSet$score)
expressionSet[,highScores]

# (automatically) coerce to data.frame
lm(score~AFFX.BioDn.5_at + AFFX.BioC.3_at, data=subset)
\end{ExampleCode}
\end{Examples}

