\HeaderA{AffyRNAdeg}{Function to assess RNA degradation in Affymetrix GeneChip data.}{AffyRNAdeg}
\aliasA{plotAffyRNAdeg}{AffyRNAdeg}{plotAffyRNAdeg}
\aliasA{summaryAffyRNAdeg}{AffyRNAdeg}{summaryAffyRNAdeg}
\keyword{hplot}{AffyRNAdeg}
\keyword{manip}{AffyRNAdeg}
\begin{Description}\relax
Uses ordered probes in probeset to detect possible RNA degradation.
Plots and statistics used for evaluation.
\end{Description}
\begin{Usage}
\begin{verbatim}
AffyRNAdeg(abatch,log.it=TRUE)
summaryAffyRNAdeg(rna.deg.obj,signif.digits=3)
plotAffyRNAdeg(rna.deg.obj, transform = "shift.scale", cols = NULL,
                 ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{abatch}] An object of class \code{\LinkA{AffyBatch-class}{AffyBatch.Rdash.class}}.
\item[\code{log.it}] A logical argument: If log.it=T, then probe data is log2 tranformed
\item[\code{rna.deg.obj}] Output from AffyRNAdeg
\item[\code{signif.digits}] Number of significant digits to show.
\item[\code{transform}] Possible choices are "shift.scale","shift.only", and "neither".  "Shift" vertically staggers the plots for individual chips, to make the display easier to read. "Scale" normalizes so that standard deviation is equal to 1.    
\item[\code{cols}] A vector of colors for plot, length = number of chips
\item[\code{...}] further arguments for \code{\LinkA{plot}{plot}} function.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Within each probeset, probes are numbered directionally from
the 5' end to the 3' end. Probe intensities are averaged by probe
number, across all genes.   If log.it=\code{FALSE} and
transform="Neither", then 
plotAffyRNAdeg  simply shows these means for each chip.  Shifted and
scaled versions of the plot can make it easier to see.
\end{Details}
\begin{Value}
\code{AffyRNAdeg} returns a list with the following components:
\begin{ldescription}
\item[\code{sample.names }] names of samples, derived from affy batch object
\item[\code{means.by.number}] average intensity by probe position
\item[\code{ses}] standard errors for probe position averages
\item[\code{slope}] from linear regression of means.by.number
\item[\code{pvalue}] from linear regression of means.by.number
\end{ldescription}
\end{Value}
\begin{Author}\relax
Leslie Cope
\end{Author}
\begin{Examples}
\begin{ExampleCode}
if (require(affydata)) {
  data(Dilution)
  RNAdeg<-AffyRNAdeg(Dilution)
  plotAffyRNAdeg(RNAdeg)
}
\end{ExampleCode}
\end{Examples}

