efetch: Entrez database downloads

Description Usage Arguments Value Note Author(s) References Examples

Description

Retrieve Entrez database records at NCBI in a variety of formats

Usage

1
efetch(id, db = "pubmed", rettype = "", retmode = "text", showURL = FALSE, destfile, ...)

Arguments

id

An EntrezHistory object or vector of Ids

db

An Entrez database, default pubmed

rettype

Retrieval type, see note for details

retmode

Retrieval mode, see note for details

showURL

display URL string

destfile

location to save downloaded file using download.file. If missing, the url is loaded into R using readLines

...

Other key-value pairs passed to the efetch url string, e.g seq_stop

Value

A character vector for the given retrieval type and mode.

Note

See Table 1 http://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.chapter4_table1 for a list of valid retrieval types and modes.

If EntrezHistory results are the input, then the database listed in that object is used. If using a vector of Ids, the database option must be included. Also, do not pass more than 200 Ids to the url (use the History or see the NCBI help pages for other suggestions).

Author(s)

Chris Stubben

References

http://www.ncbi.nlm.nih.gov/books/NBK25499

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# abstracts from recent bioC articles - use ids to limit the number 
x <- esearch("bioconductor[TITLE]", usehistory="n", retmax=5, reldate=360 )
x
efetch(x, rettype="abstract")
# only first 500 bases
efetch( esearch( "Yersinia pestis CO92[ORGN] AND refseq[FILTER] AND plasmid[Filter]", "nuccore"), rettype="fasta", seq_stop=500)
efetch(16082679, "nuccore", "fasta")

## End(Not run)

cstubben/genomes2 documentation built on May 14, 2019, 12:25 p.m.