\HeaderA{configure}{Configures the plates and plate result files}{configure}
\methaliasA{configure.cellHTS}{configure}{configure.cellHTS}
\keyword{manip}{configure}
\begin{Description}\relax
Annotate the plates and the plate result files of a given cellHTS object.
\end{Description}
\begin{Usage}
\begin{verbatim}
configure(x, ...)
## S3 method for class 'cellHTS':
configure(x, confFile, logFile, descripFile, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a cellHTS object.
\item[\code{confFile}] the name of the configuration file (see details).
This argument is just passed on to the \code{\LinkA{read.table}{read.table}}
function, so any of the valid argument
types for \code{\LinkA{read.table}{read.table}} are valid here, too. Must contain one row for each well and each batch.
\item[\code{logFile}] the name of the screen log file (see details).
This argument is just passed on to the \code{\LinkA{read.table}{read.table}}
function, so any of the valid argument
types for \code{\LinkA{read.table}{read.table}} are valid here, too.
\item[\code{descripFile}] the name of the screen description file (see details).
This argument is just passed on to the \code{\LinkA{readLines}{readLines}}
function, so any of the valid argument
types for \code{\LinkA{readLines}{readLines}} are valid here, too.
\item[\code{...}] additional parameters - ignored.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\item[confFile] This file is expected to be a tab-delimited file with
at least four columns, and column names \code{Batch}, \code{Position},
\code{Well} and \code{Content}. The contents of \code{Position} are expected
to be integer.
\item[logFile] This file is expected to be a tab-delimited file with
at least three columns, and column names \code{Filename}, \code{Well},
and \code{Flag}. Further columns are allowed.
\item[descripFile] This file is the screen description file with
general information about the screen.

Data from wells that are annotated as \emph{empty} are ignored and are set to NA in \code{x} in slot \code{xraw}.
\end{Details}
\begin{Value}
An S3 object of class \code{cellHTS}, which extends the argument \code{x} by the following elements:
\begin{ldescription}
\item[\code{plateConf}] a data.frame containing what was read from input file \code{confFile}. The number of rows is equal to the product between the number of wells in each plate and the number of batches.
\item[\code{screenLog}] a data.frame containing what was read from input file \code{logFile}.
\item[\code{wellAnno}] object of class \code{factor} of length number of plates x number of wells per plate, with five possible levels: \emph{empty}, \emph{other}, \emph{neg}, \emph{sample}, and \emph{pos}, indicative of the contents of the wells.
\item[\code{screenDesc}] object of class \code{character} containing what was read from input file \code{descripFile}.
\end{ldescription}

Moreover, the processing status of the \code{cellHTS} object is updated in the slot \code{state} to \code{state["configured"]=TRUE}.
There are methods \code{print.cellHTS}, \code{configure.cellHTS} and \code{annotate.cellHTS}.
\end{Value}
\begin{Author}\relax
Wolfgang Huber \email{huber@ebi.ac.uk}, Ligia Braz \email{ligia@ebi.ac.uk}
\end{Author}
\begin{References}\relax
..
\end{References}
\begin{Examples}
\begin{ExampleCode}
 datadir = system.file("KcViabSmall", package = "cellHTS")
 x = readPlateData("Platelist.txt", "KcViabSmall", path=datadir)
 confFile = system.file("KcViabSmall", "Plateconf.txt", package="cellHTS")
 logFile  = system.file("KcViabSmall", "Screenlog.txt", package="cellHTS")
 descripFile  = system.file("KcViabSmall", "DESCRIPTION.txt", package="cellHTS")
 x = configure(x, confFile, logFile, descripFile)
\end{ExampleCode}
\end{Examples}

