Learn R Programming

reutils (version 0.2.2)

elink: elink - finding related data through Entrez links

Description

elink generates a list of UIDs in a specified Entrez database that are linked to a set of input UIDs in either the same or another database. For instance, the ELink utility can find Entrez gene records linked to records in Entrez Protein.

Usage

elink(uid, dbFrom = NULL, dbTo = NULL, linkname = NULL, usehistory = FALSE, cmd = "neighbor", correspondence = FALSE, querykey = NULL, webenv = NULL, term = NULL, holding = NULL, datetype = NULL, reldate = NULL, mindate = NULL, maxdate = NULL)

Arguments

uid
(Required) A character vector of UIDs.
dbFrom
Initial database containing the UIDs in the input list.
dbTo
Destination database from which to retrieve linked UIDs. If not provided links will be sought in the database containing the input UIDs.
linkname
Name of the Entrez link to retrieve. Every link in Entrez is given a name of the form dbFrom_dbTo_subset.
usehistory
If TRUE search results are stored directly in the user's Web environment so that they can be used in subsequents calls to esummary or efetch.
cmd
ELink command mode (default: 'neighbor'). See Details.
correspondence
if TRUE correspondence between query UIDs and destination UIDs is preserved.
querykey
Query key.
webenv
Web Environment.
term
Search query to limit the output set of linked UIDs.
holding
Name of LinkOut provider.
datetype
Type of date to limit the search. One of 'mdat' (modification date), 'pdat' (publication date) or 'edat' (Entrez date).
reldate
umber of days back for which search items are returned.
mindate
Minimum date of search range. Format YYYY/MM/DD.
maxdate
Maximum date of search range. Format YYYY/MM/DD.

Value

An elink object.

Details

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

If dbTo and dbFrom are set to the same database, ELink will return neighbors within that database.

Elink commands (cmd) specify the function that elink will perform. Available commands are:

  • "neighbor" (Default) ELink returns a set of UIDs in dbTo linked to the input UIDs in dbFrom.
  • "neighbor_score" ELink returns a set of UIDs within the same database as the input UIDs along with similarity scores.
  • "neighbor_history" ELink posts the output UIDs to the Entrez History server and returns a query_key and WebEnv parameter. Alternatively this is achieved by setting usehistory=TRUE

See Also

Combine calls to ELink with other EUtils: esummary, efetch.

Accessor methods: content, getUrl, getError, database, uid, linkset,

Examples

Run this code
## Find one set of Gene IDs linked to nuccore GIs 34577062 and 24475906
e <- elink(c("927442695", "312836839"), dbFrom = "nuccore", dbTo = "gene")
e

## Not run: 
# ## Find related articles to PMID 20210808
# p <- elink("20210808", dbFrom = "pubmed", dbTo = "pubmed")
# p
# 
# ## Extract linked UIDs from the "pubmed" to "pubmed_reviews" link
# linkset(p, "pubmed_pubmed_reviews")
# 
# ## or
# p["pubmed_pubmed_reviews"]
# 
# ## retrive the abstracts for the first five linked reviews
# abstracts <- efetch(p["pubmed_pubmed_reviews"][1:5], rettype = "abstract")
# ## End(Not run)

Run the code above in your browser using DataLab