\HeaderA{writeReport}{Create a directory with HTML pages of linked tables and plots
documenting the contents of a  cellHTS object}{writeReport}
\keyword{manip}{writeReport}
\begin{Description}\relax
Creates a directory with HTML pages of linked tables and plots
documenting the contents of a  cellHTS object.
\end{Description}
\begin{Usage}
\begin{verbatim}
writeReport(x, outdir=x$name, force=FALSE, plotPlateArgs=FALSE, imageScreenArgs=NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a cell HTS object.
\item[\code{outdir}] a character of length 1 with the output base directory.
\item[\code{force}] a logical value, determines the behavior of the function
if \code{outdir} contains anything.
If \code{force} is \code{TRUE}, the function forcefully recursively
removes the contents of \code{outdir} of it, otherwise it casts an error.
\item[\code{plotPlateArgs}] either a list with parameters for the plate plots the
per plate quality report pages, or a logical with value \code{FALSE}.
If \code{FALSE}, the plate plots are omitted, this option is
here because the production of the plate plots takes a long time.
See details.
\item[\code{imageScreenArgs}] a list with parameters for the function
\code{\LinkA{imageScreen}{imageScreen}}. See details.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The following elements are recognized for \code{plotPlateArgs} and
passed on to \code{\LinkA{plotPlate}{plotPlate}}:
\code{sdcol}, the color scheme for the standard deviation plate plot,
\code{sdrange}, the sd range to which the colors are mapped,
\code{xcol}, the color scheme for the intensity plate plot,
\code{xrange}, the intensity range to which the colors are mapped.
If an element is not specified, default values are used.

The following elements are recognized for \code{imageScreenArgs} and
passed on to \code{\LinkA{imageScreen}{imageScreen}}:
\code{ar}, aspect ratio,
\code{zrange}, range.
\end{Details}
\begin{Value}
The function is called for its side-effect.
It returns the character \code{outdir} with the path to the output directory.
\end{Value}
\begin{Author}\relax
Ligia Bras \email{ligia@ebi.ac.uk}, Wolfgang Huber \email{huber@ebi.ac.uk}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{plotPlate}{plotPlate}},
\code{\LinkA{imageScreen}{imageScreen}}
\end{SeeAlso}
\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)
 writeReport(x)
 x = normalizePlateMedian(x, zscore="-")
 x = summarizeReplicates(x, summary="min")
 writeReport(x, force=TRUE, plotPlateArgs = list(), imageScreenArgs=list(zrange=c(-4,4)))
\end{ExampleCode}
\end{Examples}

