\HeaderA{attachInten-methods}{Attach/Remove Intensities}{attachInten.Rdash.methods}
\aliasA{attachInten}{attachInten-methods}{attachInten}
\aliasA{removeInten}{attachInten-methods}{removeInten}
\aliasA{removeInten-methods}{attachInten-methods}{removeInten.Rdash.methods}
\keyword{methods}{attachInten-methods}
\begin{Description}\relax
Attach/remove raw CEL intensities to/from \code{\LinkA{DataTreeSet}{DataTreeSet}}.

\emph{Usage}

\code{attachInten(object, treenames = "*")}

\code{removeInten(object)}
\end{Description}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] Object of class \code{"DataTreeSet"}.
\item[\code{treenames}] Object of class \code{"list"} representing the names of the 
\code{\LinkA{ROOT}{ROOT}} data trees.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
When CEL files will be imported using function \code{\LinkA{import.data}{import.data}},
the raw intensities will be stored in \code{\LinkA{ROOT}{ROOT}} data trees.
However, the intensities will not be saved in class \code{\LinkA{DataTreeSet}{DataTreeSet}} as slot
\code{data}, thus avoiding memory problems. Function \code{attachInten} allows to 
fill slot \code{data} on demand.

\code{attachInten} exports intensities from data trees from \code{\LinkA{ROOT}{ROOT}} data
file and and saves as data.frame \code{data}. \code{treenames} is a vector of
tree names to attach; for \code{treenames="*"} all trees from slot \code{treenames}
will be exported and intensities attached as data.frame \code{data}.

\code{removeInten} removes intensities from \code{\LinkA{DataTreeSet}{DataTreeSet}} and replaces
data.frame \code{data} with an empty data.frame of dim(0,0).
\end{Details}
\begin{Value}
A \code{\LinkA{DataTreeSet}{DataTreeSet}} object.
\end{Value}
\begin{Note}\relax
Do not use \code{attachInten} unless you know that your computer has sufficient RAM,
especially when using exon arrays. It may be advisible to use a subset of \code{treenames}
only.
\end{Note}
\begin{Author}\relax
Christian Stratowa
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{attachBgrd}{attachBgrd}}, \code{\LinkA{removeBgrd}{removeBgrd}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## load existing ROOT scheme file and ROOT data file
scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))
dim(intensity(data.test3))

data.test3 <- attachInten(data.test3)
dim(intensity(data.test3))
head(intensity(data.test3))

data.test3 <- removeInten(data.test3)
dim(intensity(data.test3))
\end{ExampleCode}
\end{Examples}

