\HeaderA{readExpressionSet}{Read 'ExpressionSet'}{readExpressionSet}
\keyword{file}{readExpressionSet}
\keyword{manip}{readExpressionSet}
\begin{Description}\relax
Create an instance of class ExpressionSet by reading data from files.
Unfortunately, 'widget' functionality is not yet implemented for readExpressionSet.
\end{Description}
\begin{Usage}
\begin{verbatim}
readExpressionSet(exprsFile,
      phenoDataFile,
      experimentDataFile,
      notesFile,
      path,
      annotation,
      ## arguments to read.* methods 
      exprsArgs=list(sep=sep, header=header, row.names=row.names, quote=quote, ...),
      phenoDataArgs=list(sep=sep, header=header, row.names=row.names, quote=quote, stringsAsFactors=stringsAsFactors, ...),
      experimentDataArgs=list(sep=sep, header=header, row.names=row.names, quote=quote, stringsAsFactors=stringsAsFactors, ...),
      sep = "\t", header = TRUE, quote = "", stringsAsFactors = FALSE, row.names = 1L,
      ## widget
      widget = getOption("BioC")$Base$use.widgets,
      ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{exprsFile}] (character) File or connection from which to read expression
values. The file should contain a matrix with rows as features and
columns as samples. \code{\LinkA{read.table}{read.table}} is called with this
as its \code{file} argument and further arguments given by \code{exprsArgs}.
\item[\code{phenoDataFile}] (character) File or connection from which to read
phenotypic data. \code{\LinkA{read.AnnotatedDataFrame}{read.AnnotatedDataFrame}} is called with this
as its \code{file} argument and further arguments given by \code{phenoDataArgs}.
\item[\code{experimentDataFile}] (character) File or connection from which to read
experiment data. \code{\LinkA{read.MIAME}{read.MIAME}} is called with this
as its \code{file} argument and further arguments given by
\code{experimentDataArgs}.
\item[\code{notesFile}] (character) File or connection from which to read notes;
\code{\LinkA{readLines}{readLines}} is used to input the file.
\item[\code{path}] (optional) directory in which to find all the above files.
\item[\code{annotation}] (character) A single character string indicating the
annotation associated with this ExpressionSet.
\item[\code{exprsArgs}] A list of arguments to be used with
\code{\LinkA{read.table}{read.table}} when reading in the expression matrix.
\item[\code{phenoDataArgs}] A list of arguments to be used (with
\code{\LinkA{read.AnnotatedDataFrame}{read.AnnotatedDataFrame}}) when reading
the phenotypic data.
\item[\code{experimentDataArgs}] A list of arguments to be used (with
\code{\LinkA{read.MIAME}{read.MIAME}}) when reading the experiment data.
\item[\code{sep, header, quote, stringsAsFactors, row.names}] arguments used
by the \code{\LinkA{read.table}{read.table}}-like functions.
\item[\code{widget}] A boolean value indicating whether widgets can be
used. Widgets are NOT yet implemented for
\code{read.AnnotatedDataFrame}.
\item[\code{...}] Further arguments that can be passed on to the
\code{\LinkA{read.table}{read.table}}-like functions.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Expression values are read using the \code{\LinkA{read.table}{read.table}}
function. Phenotypic data are read using the
\code{\LinkA{read.AnnotatedDataFrame}{read.AnnotatedDataFrame}} function. Experiment data are
read using the \code{\LinkA{read.MIAME}{read.MIAME}} function. Notes are read using
the \code{\LinkA{readLines}{readLines}} function. The return value must be a valid
\code{ExpressionSet}.
\end{Details}
\begin{Value}
An instance of the \code{\LinkA{ExpressionSet}{ExpressionSet}} class.
\end{Value}
\begin{Author}\relax
Martin Morgan <mtmorgan@fhcrc.org>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{ExpressionSet}{ExpressionSet}} for additional methods.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

exprsFile = system.file("extdata", "exprsData.txt", package="Biobase")
phenoFile = system.file("extdata", "pData.txt", package="Biobase")

## Read ExpressionSet with appropriate parameters
obj = readExpressionSet(exprsFile, phenoFile, sep = "\t", header=TRUE)
obj

\end{ExampleCode}
\end{Examples}

