\HeaderA{accessionToUID}{A function to convert accession values to NCBI UIDs.}{accessionToUID}
\keyword{interface}{accessionToUID}
\begin{Description}\relax
Given one or more accession values, this function will attempt to
convert them into NCBI UID values.
\end{Description}
\begin{Usage}
\begin{verbatim}
accessionToUID(...,db=c("genbank","pubmed"))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] Accession numbers to be transformed.
\item[\code{db}] Which database this accession number refers to, defaults to Genbank
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Utilizes the PubMed tool pmqty.cgi to convert an accession number
into a valid NCBI UID number.

WARNING:  The powers that be at NCBI have been known to ban the IP
addresses of users who abuse their servers (currently defined as less
then 2 seconds between queries).  Do NOT put this function in a type
loop or you may find your access revoked.
\end{Details}
\begin{Value}
Returns either a valid NCBI UID value or NULL (if there was nothing
available).
\end{Value}
\begin{Author}\relax
Jeff Gentry
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{pubmed}{pubmed}}, \code{\LinkA{locuslinkByID}{locuslinkByID}},
\code{\LinkA{locuslinkQuery}{locuslinkQuery}}, \code{\LinkA{xmlTreeParse}{xmlTreeParse}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

     ## The two returns from genbank should be the same
     genbank("U03397",type="accession",disp="data")
     x <- accessionToUID("U03397",db="genbank")
     genbank(x, type="uid",disp="data")

     ## Can handle multiple inputs
     accessionToUID("M16653","U892893",db="pubmed")
\end{ExampleCode}
\end{Examples}


