esearch: esearch

Description Usage Arguments Details Value Class hierarchy for esearch Generics with methods for esearch Slots See Also Examples

Description

“esearch” is an S4 class that provides a container for data retrived by calls to the NCBI ESearch utility.

esearch searches and retrieves primary UIDs matching a text query for use with efetch, esummary, and elink. esearch can post its output set of UIDs to the Entrez history server if the usehistory parameter is set TRUE. The resulting esearch object can be passed on to esummary, efetch, or elink.

Usage

1
2
3
4
5
  esearch(term, db = "nuccore", rettype = "uilist",
    retstart = 0, retmax = 100, usehistory = FALSE,
    WebEnv = NULL, query_key = NULL, field = NULL,
    datetype = NULL, reldate = NULL, mindate = NULL,
    maxdate = NULL)

Arguments

term

A valid Entrez text query.

db

Database to search (default: nuccore).

rettype

Retrieval type. (default: 'uilist', alternative: 'count'.)

retstart

Numeric index of the first UID in the retrieved set to be shown in the XML output (default: 0).

retmax

Total number of UIDs to be retrieved (default: 100).

usehistory

If TRUE search results are stored directly in the user's Web environment so that they can be used in a subsequent call to esummary, efetch, or elink. Also, usehistory must be set to TRUE for esearch to interpret query key values included in term or to accept a WebEnv as input.

WebEnv

Web environment string returned by a previous call to esearch, epost or elink. When provided, esearch will append the results of the search to the pre-existing WebEnv. Providing WebEnv also allows query keys to be used in term so that previous search sets can be combined or limited.

query_key

query key returned by a previous call to esearch, epost or elink. When provided, esearch will find the intersection of the set specified by query_key and the set retrieved by the query in term (i.e. joins the two with AND).

field

Optional. Search field used to limit the entire search term.

datetype

Optional. Type of date to limit the search. One of "mdat" (modification date), "pdat" (publication date) or "edat" (Entrez date)

reldate

Optional. Number of days back for which search items are returned.

mindate

Optional. Minimum date of search range. Format YYYY/MM/DD, YYYY/MM, or YYYY.

maxdate

Optional. Maximum date of search range. Format YYYY/MM/DD, YYYY/MM, or YYYY.

Details

See the official online documentation for NCBI's EUtilities for additional information.

Value

An esearch instance.

Class hierarchy for esearch

Super classes:

Generics with methods for esearch

Slots

url

A character vector containing the query URL.

error

Any error or warning messages parsed from the output of the call submitted to Entrez.

content

A character vector holding the unparsed contents of a request to Entrez.

idList

An object of class idList

See Also

esummary, efetch, elink

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
## Basic searching #########################################################

# Get th PubMed IDs (PMIDs) for articles about Chlamydia psittaci
# that have been published in 2011.

cpsit <- esearch(term="Chlamydia psittaci and 2011[pdat]", db="pubmed")
cpsit

# Search in PubMed for articles published by the journal PNAS in Volume 97.

pnas <- esearch(term="PNAS[jour] and 97[vol]", db="pubmed")
pnas

# Search for protein UIDs corresponding to BRCA1 in humans.
# To ensure that we retrieve the full list of IDs, we count
# the number of hits to set the 'retmax' parameter.

query <- "BRCA1 and human"
n <- count(esearch(query, "protein", rettype="count"))
brca1 <- esearch(query, "protein", retmax=n)

## Storing search results on the Entrez history server #####################

query <- "BRCA1 and human"
brca1 <- esearch(query, "protein", retmax=2443, usehistory=TRUE)
brca1

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