\HeaderA{arrayData-class}{Class arrayData, a simple container for
raw data and related information}{arrayData.Rdash.class}
\aliasA{arrayData}{arrayData-class}{arrayData}
\aliasA{as.RGList}{arrayData-class}{as.RGList}
\aliasA{as.RGList,arrayData-method}{arrayData-class}{as.RGList,arrayData.Rdash.method}
\aliasA{getHybAttr}{arrayData-class}{getHybAttr}
\aliasA{getHybAttr,arrayData-method}{arrayData-class}{getHybAttr,arrayData.Rdash.method}
\aliasA{getHybAttrGreen}{arrayData-class}{getHybAttrGreen}
\aliasA{getHybAttrGreen,arrayData-method}{arrayData-class}{getHybAttrGreen,arrayData.Rdash.method}
\aliasA{getHybAttrList}{arrayData-class}{getHybAttrList}
\aliasA{getHybAttrList,arrayData-method}{arrayData-class}{getHybAttrList,arrayData.Rdash.method}
\aliasA{getHybAttrRed}{arrayData-class}{getHybAttrRed}
\aliasA{getHybAttrRed,arrayData-method}{arrayData-class}{getHybAttrRed,arrayData.Rdash.method}
\aliasA{getIntensities}{arrayData-class}{getIntensities}
\aliasA{getIntensities,arrayData-method}{arrayData-class}{getIntensities,arrayData.Rdash.method}
\aliasA{getSpotAttr}{arrayData-class}{getSpotAttr}
\aliasA{getSpotAttr,arrayData-method}{arrayData-class}{getSpotAttr,arrayData.Rdash.method}
\aliasA{getWeights}{arrayData-class}{getWeights}
\aliasA{getWeights,arrayData-method}{arrayData-class}{getWeights,arrayData.Rdash.method}
\aliasA{hybAttrList<\Rdash}{arrayData-class}{hybAttrList<.Rdash.}
\aliasA{hybAttrList<-,arrayData-method}{arrayData-class}{hybAttrList<.Rdash.,arrayData.Rdash.method}
\aliasA{initialize,arrayData-method}{arrayData-class}{initialize,arrayData.Rdash.method}
\aliasA{intensities<\Rdash}{arrayData-class}{intensities<.Rdash.}
\aliasA{intensities<-,arrayData-method}{arrayData-class}{intensities<.Rdash.,arrayData.Rdash.method}
\aliasA{show,arrayData-method}{arrayData-class}{show,arrayData.Rdash.method}
\aliasA{spotAttr<\Rdash}{arrayData-class}{spotAttr<.Rdash.}
\aliasA{spotAttr<-,arrayData-method}{arrayData-class}{spotAttr<.Rdash.,arrayData.Rdash.method}
\aliasA{weights<\Rdash}{arrayData-class}{weights<.Rdash.}
\aliasA{weights<-,arrayData-method}{arrayData-class}{weights<.Rdash.,arrayData.Rdash.method}
\aliasA{[,arrayData-method}{arrayData-class}{[,arrayData.Rdash.method}
\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[as.RGList] (arrayData): Returns an object of \code{RGList}.
Foreground and background intensity values of \code{intensities}
are returned in form of an \code{RGList} object. If no background
is given, all background values in the RGList object are
set to zero.


\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{\LinkA{cbind.arrayData}{cbind.arrayData}}.



}
\end{Section}
\begin{Author}\relax
Andreas Buness <a.buness@dkfz.de>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{exprSetRG-class}{exprSetRG.Rdash.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( class(aD) == "arrayData" )
 
\end{ExampleCode}
\end{Examples}

