\Header{combineAffyBatch}{A function to combine data from different Affymetrix genechip types
into one AffyBatch.}
\keyword{manip}{combineAffyBatch}
\begin{Description}\relax
The function takes a list of AffyBatches and their respective probe
sequence information and merges the intensities from the matching probes
only into one AffyBatch.
\end{Description}
\begin{Usage}
\begin{verbatim}
combineAffyBatch(batch, probepkg, newcdf, verbose=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{batch}] A \code{list} of AffyBatches.
\item[\code{probepkg}] A character vector of the same length as \code{batch}, containing the names
of the probe sequences libraries (for example, \code{hgu133aprobe})
that go with the AffyBatches.
\item[\code{newcdf}] Character. The name of the name CDF environment that is to be created.
\item[\code{verbose}] Logical. If TRUE, messages are printed to the console.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Note that batch effects may play an important role, e.g. because
of slightly but systematically different reagents or sample
treatments in the experiments at led to the data in the different
AffyBatches. Thus, please interprete the results of this function
with caution.

Probe to probe-set mapping: after the common probes between all
AffyBatches have been identified, their mapping into probe sets (=the
new CDF environment) is obtained from the restriction of the mapping
of the first element of \code{batch} (see variable \code{REFCHIP} in the
code).

If you want to use this function, please have a look at its code
and if necessary, check intermediate results.
\end{Details}
\begin{Value}
A list with two elements: \code{dat}, an \code{\Link{AffyBatch}}, and
\code{cdf}, an environment that contains the probe-set to probe
mapping.

The phenoData slot of \code{dat} will be empty. This is because
in most cases this requires some manual interference.
You will need to construct a combined phenoData slot by yourself.
\end{Value}
\begin{Author}\relax
R. Gentleman, Wolfgang Huber
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  ## see vignette!
\end{ExampleCode}
\end{Examples}

