Learn R Programming

rentrez (version 0.3.1)

entrez_summary: Get summaries of objects in NCBI datasets from a unique ID

Description

Contstructs a query from the given arguments, including a database name and list of of unique IDs for that database then downloads the XML document created by that query. The XML document is parsed, with the

Usage

entrez_summary(db, config = NULL, ...)

Arguments

db
character Name of the database to search for
...
character Additional terms to add to the request. Requires either id (unique id(s) for records in a given database) or WebEnv (a character containing a cookie created by a previous entrez query).
config
vector configuration options passed to httr::GET

Value

  • A list of esummary records (if multiple IDs are passed) or a single record.

    file XMLInternalDocument xml file resulting from search, parsed with xmlTreeParse

See Also

config for avaliable configs

Examples

Run this code
pop_ids = c("307082412", "307075396", "307075338", "307075274")
 pop_summ <- entrez_summary(db="popset", id=pop_ids)
 sapply(pop_summ, "[[", "Title")

 # clinvar example
 res <- entrez_search(db = "clinvar", term = "BRCA1")
 cv <- entrez_summary(db="clinvar", id=res$ids)
 cv[[1]] # get the names of the list for each result
 sapply(cv, "[[", "title") # titles
 lapply(cv, "[[", "trait_set")[1:2] # trait_set
 sapply(cv, "[[", "gene_sort") # gene_sort

Run the code above in your browser using DataLab