\HeaderA{pm.getabst}{Obtain the abstracts for a set PubMed list.}{pm.getabst}
\keyword{manip}{pm.getabst}
\begin{Description}\relax
The data provided by PubMed is reduced to a small set. This set is 
then suitable for further rendering.
\end{Description}
\begin{Usage}
\begin{verbatim}
pm.getabst(geneids, basename)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{geneids}] The identifiers used to find Abstracts 
\item[\code{basename}] The base name of the annotation package to use. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
We rely on the annotation in the package associated with the 
\code{basename} to provide PubMed identifiers for the genes described by
the gene identifiers.
With these in hand we then use the \code{pmfetch} utility to download the
PubMed abstracts in XML form. These are then translated (transformed) to a 
shorter version containing a small subset of the data provided by PubMed.

This function has the side effect of creating an environment in 
\code{.GlobalEnv} that contains the mapping for the requested data.
This is done for efficiency -- so we don't continually read in the data
when there are many different queries to be performed.
\end{Details}
\begin{Value}
A list of lists containing objects of class \code{pubMedAbst}.
There will be one element of the list for each identifier.
Each of these elements is a list containing one abstract (of
class \code{pubMedAbst} for each PubMed identifier associated with
the gene identifier.
\end{Value}
\begin{Author}\relax
Robert Gentleman
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{pm.abstGrep}{pm.abstGrep}}, \code{\LinkA{pm.titles}{pm.titles}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
hoxa9 <- "37809_at"
   ## A bit of a hack to not have a package dependency on hgu95av2
   ## but need to fiddle w/ the warn level to not fail the example anyways.
   curWarn <- getOption("warn")
   options(warn=0)
   on.exit(options(warn=curWarn), add=TRUE)

if( require(hgu95av2) )
    absts <- pm.getabst(hoxa9, "hgu95av2")

\end{ExampleCode}
\end{Examples}


