\HeaderA{getOntology}{Get GO terms for a specified ontology}{getOntology}
\keyword{manip}{getOntology}
\begin{Description}\relax
Find the subset of GO terms for the specified ontology, for each element 
of the supplied list of associations. The input list is typically from
one of the chip-specific meta-data files or from GOLOCUSID2GO.
\end{Description}
\begin{Usage}
\begin{verbatim}
getOntology(inlist, ontology=c("MF", "BP", "CC"))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{inlist}] A list of GO associations
\item[\code{ontology}] The name of the ontology you want returned. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The input list should be a list of lists, each element of \code{inlist}
is itself a list containing the information that maps from a specified 
ID (usually LocusLink) to GO information. Each element of the inner list 
is a list with elements \code{GOID}, \code{Ontology} and \code{Evidence}.
\end{Details}
\begin{Value}
A list of the same length as the input list. Each element of this
list will contain a vector of \code{GOID}s for those terms that match
the requested ontology.
\end{Value}
\begin{Author}\relax
R. Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{getEvidence}{getEvidence}}, \code{\LinkA{dropECode}{dropECode}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
 bb=GOLOCUSID2GO$"4121"
 getOntology(bb)
 sapply(bb, function(x) x$Ontology)
\end{ExampleCode}
\end{Examples}

