\HeaderA{Multiple testing on the GO graph}{Multiple testing on the GO graph}{Multiple testing on the GO graph}
\aliasA{GAGO}{Multiple testing on the GO graph}{GAGO}
\aliasA{getFocus}{Multiple testing on the GO graph}{getFocus}
\aliasA{makeGOstructure}{Multiple testing on the GO graph}{makeGOstructure}
\keyword{htest}{Multiple testing on the GO graph}
\begin{Description}\relax
Three functions adapted from package \pkg{globaltest} to test (part of) the GO graph for
association of the gene expression profile of GO terms with a
response variable. Used together, these functions return
multiplicity-adjusted p-values calculated using the Focus Level
procedure that preserves the structure of the GO graph.
\end{Description}
\begin{Usage}
\begin{verbatim}
  GAGO(..., GO, focus, maxalpha = 0.05, stopafter = 100, verbose = FALSE)
  makeGOstructure(data, annotation, top, only.ids, ontology = c("BP", "CC", "MF"), unreliable)
  getFocus(GOstructure, maxatoms = 10)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] Arguments describing the tests to be performed are passed on to \code{\LinkA{GlobalAncova}{GlobalAncova}}. 
Note that only the approximative version of \code{\LinkA{GlobalAncova}{GlobalAncova}} is used here and hence the parameter 
\code{method} is not available. Even though the number of permutations (\code{perm}) may be specified since
very large gene sets (with more genes than \code{max.group.size}) are treated with the permutation test.
\item[\code{GO}] An object of class \code{\LinkA{GOstructure}{GOstructure}} describing the structure of the GO
graph. This object should be created using \code{makeGOstructure}.
\item[\code{focus}] A vector of GO ids to describe te focus level. Typically made using \code{getFocus}.
\item[\code{maxalpha}] The maximum multiplicity-adjusted p-value. The algorithm will stop when this value is exceeded.
\item[\code{stopafter}] The maximum number of significant GO terms to be found. The algorithm will stop when this value is exceeded.
\item[\code{verbose}] If set to \code{TRUE}, prints much more extensive progress information.
\item[\code{data}] The data set for which the \code{\LinkA{GOstructure}{GOstructure}} object is to be made. Can be either an
\code{\LinkA{exprSet}{exprSet}} or a vector of probe indicators.
\item[\code{annotation}] The name of the metaData annotation package to be used, or a vector of EntrezGene ids with the same
length as the number of genes in \code{data}.
\item[\code{top}] The node to be used as top node of the \code{\LinkA{GOstructure}{GOstructure}}. Defaults
to one of "GO:0008150", "GO:0005575", "GO:0003674", depending on he ontology chosen. The
\code{\LinkA{GOstructure}{GOstructure}} object will only contain offspring of the chosen top node.
\item[\code{only.ids}] A vector of GO ids. If this is supplied, GO ids not appearing in this list
will not appear in the \code{\LinkA{GOstructure}{GOstructure}} object.
\item[\code{ontology}] The ontology to be used. One of Biological Process (BP), Cellular
Component (CC) or Molecular Function (MF).
\item[\code{unreliable}] Can be used to designate one or more of the GO evidence codes as unreliable.
Value must be a vector containing one or more from
"IC", "IDA", "IEA", "IEP", "IGI", "IMP", "IPI", "ISS", "NAS", "ND", "RCA", "TAS", "NR".
\item[\code{GOstructure}] An object of class \code{\LinkA{GOstructure}{GOstructure}}.
\item[\code{maxatoms}] A tuning parameter that governs the choice of the focus level. \code{getFocus} will
choose those GO terms in the focus level in such a way that all offspring gene sets of each focus level
term can be constructed as unions of no more than \code{maxatoms} atom gene sets. Default value of
\code{maxatoms} is 10. Higher values quickly lead to slower computation. Lower values typically lead to reduced power.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These functions should be used in the following order.
First use \code{makeGOstructure} to make a GO graph tailored to a
specific data set. Then \code{getFocus} can be used to choose a
focus level. Finally \code{GAGO} performs the focus level procedure.
\end{Details}
\begin{Value}
The function returns a named vector of multiplicity-adjusted
p-values. Adjusted p-values of GO terms not appearing in this vector
are larger than the chosen value of \code{maxalpha}.
\end{Value}
\begin{Note}\relax
Function \code{GAGO} corresponds to function \code{gtGO} in package \pkg{globaltest}. The
difference is in the use of the \code{GlobalAncova} test instead of \code{globaltest} within the focus level procedure.
\end{Note}
\begin{Author}\relax
Jelle Goeman: \email{j.j.goeman@lumc.nl}; Jan Oosting; Manuela Hummel
\end{Author}
\begin{References}\relax
Goeman, J.J. and Mansmann, U., Family-wise error rate on the directed acyclic 
graph of Gene Ontology, submitted.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{gtGO}{gtGO}}, \code{\LinkA{GlobalAncova}{GlobalAncova}}, \code{\LinkA{globaltest}{globaltest}}, \code{\LinkA{GOstructure}{GOstructure}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  # see vignettes of packages GlobalAncova and globaltest and help of gtGO
\end{ExampleCode}
\end{Examples}

