Rentrez-package: The Rentrez package provides an interface to NCBI's Entrez...

Description description Author(s) Examples

Description

The Rentrez package provides an interface to NCBI's Entrez utilities.

description

NCBI provides the EUtilities web service for software to query the Entrez databases directly, rather than through the web interface. For more information see here.

This package provides an interface to construct query URLs and parse query results.

The main Entrez web page is available at http://www.ncbi.nlm.nih.gov/Entrez/and a list of the Entrez utilities can be found at http://www.ncbi.nlm.nih.gov/entrez/utils/utils_index.html.

Important functions:

Author(s)

Gerhard Sch<c3><b6>fl gschofl@yahoo.de

Examples

 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
44
45
46
47
48
49
50
#
# combine esearch with efetch
#
# Download PubMed records that are indexed in MeSH for both 'Clamydia' and 
# 'genome' and were published in 2012.
#
query <- "Chlamydia[mesh] and genome[mesh] and 2012[pdat]"

#
# check how many records fit the bill and download the PMIDs
#
n <- esearch(query, "pubmed", rettype="count")
n
pmids <- esearch(query, "pubmed", retmax=count(n))

#
# Fetch the records and retrieve the XML response
#
articles <- efetch(pmids)
articles_xml <- content(articles)
articles_xml


############################################################################
#
# combine epost with esummary/efetch
#
# Download protein records corresponding to a list of GI numbers.
#
id <- c(194680922,50978626,28558982,9507199,6678417)

#
# post the GI numbers to the Entrez history server
#
p <- epost(id, "protein")

#
# retrieve docsums with esummary
#
sum <- docsum(esummary(p))

#
# get FASTAs with efetch
#
prot <- efetch(p, retmode="text", rettype="fasta")

#
# retrieve the content of the efetch object
#
seq <- content(prot)

gschofl/rentrez documentation built on May 17, 2019, 8:53 a.m.