\Header{arrayData-class}{Class arrayData, a simple container for
raw data and related information}
\alias{arrayData}{arrayData-class}
\alias{getHybAttr}{arrayData-class}
\alias{getHybAttr,arrayData-method}{arrayData-class}
\alias{getHybAttrGreen}{arrayData-class}
\alias{getHybAttrGreen,arrayData-method}{arrayData-class}
\alias{getHybAttrList}{arrayData-class}
\alias{getHybAttrList,arrayData-method}{arrayData-class}
\alias{getHybAttrRed}{arrayData-class}
\alias{getHybAttrRed,arrayData-method}{arrayData-class}
\alias{getIntensities}{arrayData-class}
\alias{getIntensities,arrayData-method}{arrayData-class}
\alias{getSpotAttr}{arrayData-class}
\alias{getSpotAttr,arrayData-method}{arrayData-class}
\alias{getWeights}{arrayData-class}
\alias{getWeights,arrayData-method}{arrayData-class}
\alias{hybAttrList<\Rdash}{arrayData-class}
\alias{hybAttrList<-,arrayData-method}{arrayData-class}
\alias{initialize,arrayData-method}{arrayData-class}
\alias{intensities<\Rdash}{arrayData-class}
\alias{intensities<-,arrayData-method}{arrayData-class}
\alias{show,arrayData-method}{arrayData-class}
\alias{spotAttr<\Rdash}{arrayData-class}
\alias{spotAttr<-,arrayData-method}{arrayData-class}
\alias{weights<\Rdash}{arrayData-class}
\alias{weights<-,arrayData-method}{arrayData-class}
\alias{[,arrayData-method}{arrayData-class}
\keyword{methods}{arrayData-class}
\keyword{classes}{arrayData-class}
\begin{Description}\relax
A simple class to store
raw data, annotation information for spots and
hybridisations, as well as weights.
\end{Description}
\begin{Section}{Creating Objects}
\code{  new('arrayData',}\\
\code{    intensities = ..., \# optional; object of class array}\\
\code{    weights     = ..., \# optional; object of class matrix}\\
\code{    spotAttr    = ..., \# optional; object of class data.frame}\\
\code{    hybAttrList = ..., \# optional; list of two objects of class data.frame}\\
\code{  )}
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{intensities}:] Object of class \code{array};
three-dimensional;
dim = nrOfSpots x nrOfChannels x nrOfHybridisations;
second dimension must contain "green"  and "red" and possibly
"greenBackground" and "redBackground"; default: \code{NULL}
\item[\code{weights}:] Object of class \code{matrix};
dim = nrOfSpots x nrOfHybridisations;
range = [0,1]; default: \code{NULL}.

\item[\code{spotAttr}:] Object of class \code{data.frame};
dim = nrOfSpots x nrOfSpotCharacteristics;
default: \code{NULL}
\item[\code{hybAttrList}:] list of two objects named "green" and "red"
of class \code{data.frame}; the dimension of
each \code{data.frame} is given by
nrOfHybridisations x nrOfHybridisationCharacteristics ;
default: \code{NULL}
}
\end{Section}
\begin{Section}{Methods}
\describe{

\item[intensities<-] (arrayData): Set the \code{intensities} of
\code{arrayData}. 
\item[getIntensities] (arrayData): Returns the \code{intensities}
\code{array}.
\item[weights<-] (arrayData): Set the \code{weights} of
\code{arrayData}. 
\item[getWeights] (arrayData): Returns the \code{weights} object. 
\item[spotAttr<-] (arrayData): Set the \code{spotAttr} of
\code{arrayData}. 
\item[getSpotAttr] (arrayData): Returns the \code{spotAttr} \code{data.frame}.
\item[getHybAttr] (arrayData): Returns the "intersection" of the "red"
and "green" \code{data.frame} of \code{hybAttrList}
or if one is \code{NULL} the other one. The "intersection"
are those columns which match in column name and its content
otherwise \code{NULL} is returned.
\item[getHybAttrGreen] (arrayData): Returns the "green" list element 
of \code{hybAttrList}, i.e. a \code{data.frame}. 
\item[getHybAttrRed] (arrayData): Returns the "red" list element
of \code{hybAttrList}, i.e. a \code{data.frame}. 
\item[hybAttrList<-] (arrayData): Set the \code{hybAttrList} of
\code{arrayData}. 
\item[getHybAttrList] (arrayData): Returns the \code{hybAttrList} object. 
\item[show] (arrayData): Renders information about the \code{arrayData} object
on standard out.
\item[[] (arrayData,i,j):
A subset operator, where i corresponds to the spots and
j to the hybridisations.

\item[cbind] (...): Concatenates \code{arrayData} objects.
Spots/rows are assumed to match;
possibly you have to subset and reorder
the objects beforehand
cf. function \code{\Link{cbind.arrayData}}.



}
\end{Section}
\begin{Author}\relax
Andreas Buness <a.buness@dkfz.de>
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{exprSetRG-class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

intensities <- array(data=runif(120),dim=c(20,2,3))
dimnames(intensities) <- list(NULL, c("green","red"), NULL)
spotAttr <- data.frame(Name=I(rep(c("x","y","k","l","z"),4)),
                       Index=c(1:20))
arrayDataObject <- new("arrayData", intensities=intensities, weights=intensities[,1,],
                       spotAttr=spotAttr, hybAttrList=NULL)
print(arrayDataObject)
hybs <- c(1,3)
spots <- c(1:10, 14)
aD <- arrayDataObject[spots,hybs]
print(aD)
stopifnot( all( getIntensities(arrayDataObject)[spots, , hybs] == getIntensities(aD) ) )
stopifnot( all( getWeights(arrayDataObject)[spots, hybs] == getWeights(aD) ) )
stopifnot( all( getSpotAttr(arrayDataObject)[spots, ] == getSpotAttr(aD) ) )

hybAttr <- data.frame(Name=I(c("hx","hy","hz")),
                      Index=c(1:3))
arrayDataObject <- new("arrayData", intensities=intensities, weights=intensities[,1,],
                       spotAttr=spotAttr, hybAttrList=list(green=hybAttr,red=hybAttr))
hybAttrGreen <- data.frame(Name=I(c("hx","hy","hz")),
                      Index=c(4:6))
aDObject <- new("arrayData", intensities=intensities, weights=intensities[,1,],
                       spotAttr=spotAttr, hybAttrList=list(green=hybAttrGreen,red=hybAttr))
print(arrayDataObject)
cbind(aDObject,aDObject)
hybs <- c(1)
spots <- c(1)
aD <- arrayDataObject[spots,hybs]
print(aD)
stopifnot( all( getIntensities(arrayDataObject)[spots, , hybs] == getIntensities(aD) ) )
stopifnot( all( getWeights(arrayDataObject)[spots, hybs] == getWeights(aD) ) )
stopifnot( all( getSpotAttr(arrayDataObject)[spots, ] == getSpotAttr(aD) ) )
stopifnot( all( getHybAttr(arrayDataObject)[spots, ] == getHybAttr(aD) ) )
stopifnot( all( getHybAttrRed(arrayDataObject)[spots, ] == getHybAttrRed(aD) ) )
stopifnot( all( getHybAttrGreen(arrayDataObject)[spots, ] == getHybAttrGreen(aD) ) )

stopifnot( all( getHybAttrRed(aDObject) == hybAttr) )
stopifnot( all( getHybAttrGreen(aDObject) == hybAttrGreen) )
stopifnot( all( getHybAttr(aDObject) == data.frame(Name=I(c("hx","hy","hz"))) ) )
weights(aDObject) <- intensities[,2,]
intensities(aDObject) <- intensities
spotAttr(aDObject) <- spotAttr
hybAttrList(aDObject) <- list(green=hybAttr,red=hybAttrGreen)
aD <- new("arrayData")
stopifnot(is(aD, "arrayData"))
 
\end{ExampleCode}
\end{Examples}

