Elink¶

entrezpy.elink.elinker.Elinker implements the E-Utility ELink [1]. Elink queries can link results

  • between different databases within Entrez
  • earlier queries on the Entrez History server
  • to links outside NCBI Entrez, e.g. journal articles.

Elinker queries return UIDs for data in the requested Entrez database or WebEnv/QueryKey reference from the Entrez History server.

If an Elink query is part of a Conduit pipeline, a search query has to run uisng the Elink query as dependency to obtain the proper UIDs. See .. _tutorialpipeline:.

Usage¶

import entrezpy.elink.elinker

e = entrezpy.elink.elinker.Elinker(tool,
                                         email,
                                         apikey=None,
                                         apikey_var=None,
                                         threads=None,
                                         qid=None)
analyzer = e.inquire{'dbfrom' : 'protein',
                     'db' : 'gene',
                     'id' : [15718680, 157427902]}

.. print(analyzer.count, analyzer.retmax, analyzer.retstart, analyzer.uids)

Elinker¶

entrezpy.elink.elinker.Elinker

param str tool:string with no internal spaces uniquely identifying the software producing the request, i.e. your tool/pipeline.
param str email:
 a complete and valid e-mail address of the software developer and not that of a third-party end user. entrezpy is this is a library, not a tool.
param str apikey:
 NCBI API key
param str apikey_var:
 NCBI API key
param int threads:
 number of threads
param str qid:Unique Esearch query id. Will be generated if not given.

Supported E-Utility parameter¶

Parameters are passed as dictionary to entrezpy.elink.elinker.Elinker.inquire() and are expected to be the same as those for the E-Utility [0]. For example:

{'db' : 'nucleotide', 'dbfrom' : 'protein, 'cmd' : 'neighbor'}

Elinker introduces one additional parameter link. It forces Elinker to create 1-to-many UID links.

Note

retmode : ref for the Elink command prlinks is not supported since this returns only the link outside Entrez databases.

Parameter   Type
E-Utility    
db str
dbfrom str
id list
cmd str
linkname str
term str
holding str
term str
datetype str
reldate int
reldate int
mindate str (YYYY/MM/DD, YYYY/MM, YYYY)
maxdate str (YYYY/MM/DD, YYYY/MM, YYYY)
retmode str
Elinker link bool

Elink linknames¶

Elink linknames allow to specifiy a subset from the linked database. This can greatly incrase the spceificity of your link. By default, entrepy Elinker uses linkname for the commands neighbor, neighbor_history, and neighbor_score. If no linkname is given, the name of dbfrom and db are joined to dbfrom_db.

For all possible linkname, refer to [2].

Result¶

Instance of entrezpy.elink.linkset.ElinkResult.

Every results are stored as link sets entrezpy.elink.LinkSets.bare.Linkset which are either linked (entrezpy.elink.LinkSets.linked.LinkedLinkset) and store 1-to-many UID links or relaxed (entrezpy.elink.LinkSets.relaxed.RelaxedLinkset), storing many-to-many UID links.

Approach¶

  1. Parameters are checked and the request size is configured
  2. Link is requested
  3. If no errors were encountered, returns the analyzer with the link result

References¶

[1]https://dataguide.nlm.nih.gov/eutilities/utilities.html#elink
[2]https://eutils.ncbi.nlm.nih.gov/entrez/query/static/entrezlinks.html

Table of Contents

  • Installation
  • Entrezpy tutorials

Entrezpy functions

  • Logging
  • Add logging to applications using entrezpy
  • Add logging to a class inheriting a entrezpy base class
  • Esearch
  • Efetch
  • Elink
  • Esummary
  • Epost

Entrezpy In-depth

  • Entrezpy architcture
  • E-Utilities by entrezpy
  • E-Utilities History server
  • Error reponses

Entrezpy module references:

  • Logging module
  • Base modules
  • Elink modules
  • EPost modules
  • Esearch modules
  • Efetch modules
  • Requester module
  • Conduit module

Glossary:

  • Glossary

Related Topics

  • Documentation overview
    • Previous: Efetch
    • Next: Esummary

Quick search

©2018-2020, The University Of Sydney. | Powered by Sphinx 1.8.5 & Alabaster 0.7.12 | Page source