File: accessionToUID.Rd

package info (click to toggle)
r-bioc-annotate 1.84.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,624 kB
  • sloc: makefile: 2
file content (43 lines) | stat: -rw-r--r-- 1,322 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\name{accessionToUID}
\alias{accessionToUID}
\title{A function to convert accession values to NCBI UIDs.}
\description{
  Given one or more accession values, this function will attempt to
  convert them into NCBI UID values.
}
\usage{
accessionToUID(...,db=c("genbank","pubmed"))
}
\arguments{
  \item{...}{Accession numbers to be transformed.}
  \item{db}{Which database this accession number refers to, defaults to Genbank}
}
\details{
  Utilizes the PubMed tool esearch.fcgi 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.
}
\value{
  Returns either a valid NCBI UID value or NULL (if there was nothing
  available).
}
\author{Jeff Gentry}
\seealso{\code{\link{pubmed}}, \code{\link[XML]{xmlTreeParse}}}
\examples{

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

     ## Can handle multiple inputs
     y <- accessionToUID("M16653","U892893",db="genbank")
}
\keyword{interface}