\Header{backgroundCorrect}{Correct Intensities for Background}
\keyword{models}{backgroundCorrect}
\begin{Description}\relax
Apply background correction to microarray expression intensities.
\end{Description}
\begin{Usage}
\begin{verbatim}
backgroundCorrect(RG, method="subtract")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{RG}] an \code{\Link{RGList}} object or a unclassed list containing the same components as an \code{RGList}
\item[\code{method}] character string specifying correction method.  Possible values are \code{"none"}, \code{"subtract"}, \code{"half"}, \code{"minimum"} or \code{"edwards"}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
If \code{method="none"} then the corrected intensities are equal to the foreground intensities, i.e., the background intensities are treated as zero.
If \code{method="subtract"} then this function simply subtracts the background intensities from the foreground intensities which is the usual background correction method.
If \code{method="half"} then any intensity which is less than 0.5 after background subtraction is reset to be equal to 0.5.
If \code{method="minimum"} then any intensity which is zero or negative after background subtraction is set equal to half the minimum of the positive corrected intensities for that array.
If \code{method="edwards"} a log-linear interpolation method is used to adjust lower intensities as in Edwards (2003).

Background correction (background subtraction) is also performed by the \code{\Link{normalizeWithinArrays}} method for \code{RGList} objects, so it is not necessary to call \code{backgroundCorrect} directly unless one wants to use a method other than simple subtraction.
Calling \code{backgroundCorrect} before \code{normalizeWithinArrays} will over-ride the default background correction.\end{Details}
\begin{Value}
An \code{RGList} object in which components \code{R} and \code{G} are background corrected
and components \code{Rb} and \code{Gb} are removed.\end{Value}
\begin{Author}\relax
Gordon Smyth
\end{Author}
\begin{References}\relax
Edwards, D. E. (2003). Non-linear normalization and background correction in one-channel cDNA microarray studies
\emph{Bioinformatics} 19, 825-833. 

Yang, Y. H., Buckley, M. J., Dudoit, S., and Speed, T. P. (2002). Comparison of methods for image analysis on cDNA microarray data. \emph{Journal of Computational and Graphical Statistics} 11, 108-136.

Yang, Y. H., Buckley, M. J., and Speed, T. P. (2001). Analysis of microarray images. \emph{Briefings in Bioinformatics} 2, 341-349.\end{References}
\begin{SeeAlso}\relax
\code{\Link{read.maimages}}, \code{\Link{normalizeWithinArrays}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
RG <- new("RGList", list(R=c(1,2,3,4),G=c(1,2,3,4),Rb=c(2,2,2,2),Gb=c(2,2,2,2)))
backgroundCorrect(RG)
backgroundCorrect(RG, method="half")
backgroundCorrect(RG, method="minimum")
\end{ExampleCode}
\end{Examples}

