\HeaderA{addGeneGrps}{Function to load gene groups into maigesPreRaw object}{addGeneGrps}
\keyword{methods}{addGeneGrps}
\begin{Description}\relax
This function read a directory and read files containing the genes for
specific gene groups. This files must have one gene per line. This
function stores the gene groups read in the slot \code{GeneGrps} into
objects of class \code{\LinkA{maigesPreRaw}{maigesPreRaw}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
addGeneGrps(data, folder="./", ext=".txt")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{data}] object of \code{\LinkA{maigesPreRaw}{maigesPreRaw}} class.
\item[\code{folder}] char string specifying the directory of gene groups. The
function tests the presence or not of the final bar.
\item[\code{ext}] string giving the extension of the files, defaults to
'.txt'. The function also tests the presence of the initial dot.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
If the \code{data} object already has gene groups with names equal
to some someones that are been read, the groups with repeated names
are not added. Warning messages are printed for every repeated group
name.

The \code{folder} directory must contain only one file for each gene
group of interest. These files must discriminate one gene per line. The
identification of the genes must be done by one of the gene labels
given by \code{genemap} (see \code{\LinkA{loadData}{loadData}}).
\end{Details}
\begin{Value}
This function returns another object of class
\code{\LinkA{maigesPreRaw}{maigesPreRaw}}, with the slot \code{GeneGroups} actualised.
\end{Value}
\begin{Author}\relax
Gustavo H. Esteves <\email{gesteves@vision.ime.usp.br}>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{maigesPreRaw}{maigesPreRaw}}, \code{\LinkA{addPaths}{addPaths}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Don't run because you don't have the gene sets in a readable folder.
## Not run: 
gastro = addGeneGrps(gastro, folder="geneGrps", ext="txt")
## End(Not run)\end{ExampleCode}
\end{Examples}

