192 lines
No EOL
60 KiB
XML
192 lines
No EOL
60 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
|
|
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<!-- AppResources meta begin -->
|
|
<meta name="paf-app-resources" content="" />
|
|
<script type="text/javascript">var ncbi_startTime = new Date();</script>
|
|
|
|
<!-- AppResources meta end -->
|
|
|
|
<!-- TemplateResources meta begin -->
|
|
<meta name="paf_template" content="" />
|
|
|
|
<!-- TemplateResources meta end -->
|
|
|
|
<!-- Logger begin -->
|
|
<meta name="ncbi_db" content="books" /><meta name="ncbi_pdid" content="book-part" /><meta name="ncbi_acc" content="NBK25500" /><meta name="ncbi_domain" content="helpeutils" /><meta name="ncbi_report" content="printable" /><meta name="ncbi_type" content="fulltext" /><meta name="ncbi_objectid" content="" /><meta name="ncbi_pcid" content="/NBK25500/?report=printable" /><meta name="ncbi_app" content="bookshelf" />
|
|
<!-- Logger end -->
|
|
|
|
<title>E-utilities Quick Start - Entrez Programming Utilities Help - NCBI Bookshelf</title>
|
|
|
|
<!-- AppResources external_resources begin -->
|
|
<link rel="stylesheet" href="/core/jig/1.15.2/css/jig.min.css" /><script type="text/javascript" src="/core/jig/1.15.2/js/jig.min.js"></script>
|
|
|
|
<!-- AppResources external_resources end -->
|
|
|
|
<!-- Page meta begin -->
|
|
<meta name="robots" content="INDEX,FOLLOW,NOARCHIVE" /><meta name="citation_inbook_title" content="Entrez Programming Utilities Help [Internet]" /><meta name="citation_title" content="E-utilities Quick Start" /><meta name="citation_publisher" content="National Center for Biotechnology Information (US)" /><meta name="citation_date" content="2018/10/24" /><meta name="citation_author" content="Eric Sayers" /><meta name="citation_fulltext_html_url" content="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><link rel="schema.DC" href="http://purl.org/DC/elements/1.0/" /><meta name="DC.Title" content="E-utilities Quick Start" /><meta name="DC.Type" content="Text" /><meta name="DC.Publisher" content="National Center for Biotechnology Information (US)" /><meta name="DC.Contributor" content="Eric Sayers" /><meta name="DC.Date" content="2018/10/24" /><meta name="DC.Identifier" content="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><meta name="description" content="Please see our Release Notes for details on recent changes and updates." /><meta name="og:title" content="E-utilities Quick Start" /><meta name="og:type" content="book" /><meta name="og:description" content="Please see our Release Notes for details on recent changes and updates." /><meta name="og:url" content="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><meta name="og:site_name" content="NCBI Bookshelf" /><meta name="og:image" content="https://www.ncbi.nlm.nih.gov/corehtml/pmc/pmcgifs/bookshelf/thumbs/th-helpeutils-lrg.png" /><meta name="twitter:card" content="summary" /><meta name="twitter:site" content="@ncbibooks" /><meta name="bk-non-canon-loc" content="/books/n/helpeutils/chapter1/" /><link rel="canonical" href="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><link rel="stylesheet" href="/corehtml/pmc/css/figpopup.css" type="text/css" media="screen" /><link rel="stylesheet" href="/corehtml/pmc/css/bookshelf/2.26/css/books.min.css" type="text/css" /><link rel="stylesheet" href="/corehtml/pmc/css/bookshelf/2.26/css/books_print.min.css" type="text/css" /><style type="text/css">p a.figpopup{display:inline !important} .bk_tt {font-family: monospace} .first-line-outdent .bk_ref {display: inline} </style><script type="text/javascript" src="/corehtml/pmc/js/jquery.hoverIntent.min.js"> </script><script type="text/javascript" src="/corehtml/pmc/js/common.min.js?_=3.18"> </script><script type="text/javascript">window.name="mainwindow";</script><script type="text/javascript" src="/corehtml/pmc/js/bookshelf/2.26/book-toc.min.js"> </script><script type="text/javascript" src="/corehtml/pmc/js/bookshelf/2.26/books.min.js"> </script>
|
|
|
|
<!-- Page meta end -->
|
|
<link rel="shortcut icon" href="//www.ncbi.nlm.nih.gov/favicon.ico" /><meta name="ncbi_phid" content="CE8B4AA87C805E610000000000EC00AB.m_5" />
|
|
<meta name='referrer' content='origin-when-cross-origin'/><link type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/4216699/css/3852956/3985586/3808861/4121862/3974050/3917732/251717/4216701/14534/45193/4113719/3849091/3984811/3751656/4033350/3840896/3577051/3852958/3984801/12930/3964959.css" /><link type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/4216699/css/3411343/3882866.css" media="print" /></head>
|
|
<body class="book-part">
|
|
<div class="grid no_max_width">
|
|
<div class="col twelve_col nomargin shadow">
|
|
<!-- System messages like service outage or JS required; this is handled by the TemplateResources portlet -->
|
|
<div class="sysmessages">
|
|
<noscript>
|
|
<p class="nojs">
|
|
<strong>Warning:</strong>
|
|
The NCBI web site requires JavaScript to function.
|
|
<a href="/guide/browsers/#enablejs" title="Learn how to enable JavaScript" target="_blank">more...</a>
|
|
</p>
|
|
</noscript>
|
|
</div>
|
|
<!--/.sysmessage-->
|
|
<div class="wrap">
|
|
<div class="page">
|
|
<div class="top">
|
|
|
|
<div class="header">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--<component id="Page" label="headcontent"/>-->
|
|
|
|
</div>
|
|
<div class="content">
|
|
<!-- site messages -->
|
|
<div class="container content">
|
|
<div class="document">
|
|
<div class="pre-content"><div><div class="bk_prnt"><p class="small">NCBI Bookshelf. A service of the National Library of Medicine, National Institutes of Health.</p><p>Entrez Programming Utilities Help [Internet]. Bethesda (MD): National Center for Biotechnology Information (US); 2010-. </p></div></div></div>
|
|
<div class="main-content lit-style" itemscope="itemscope" itemtype="http://schema.org/CreativeWork"><div class="meta-content fm-sec"><h1 id="_NBK25500_"><span class="title" itemprop="name">E-utilities Quick Start</span></h1><p class="contrib-group"><h4>Authors</h4><span itemprop="author">Eric Sayers</span>, PhD<sup><img src="/corehtml/pmc/pmcgifs/corrauth.gif" alt="corresponding author" /></sup><sup>1</sup>.</p><h4>Affiliations</h4><div class="affiliation"><sup>1</sup> NCBI<div><span class="email-label">Email: </span><a href="mailto:dev@null" data-email="vog.hin.mln.ibcn@sreyas" class="oemail">vog.hin.mln.ibcn@sreyas</a></div></div><div><sup><img src="/corehtml/pmc/pmcgifs/corrauth.gif" alt="corresponding author" /></sup>Corresponding author.</div><p class="small">Created: <span itemprop="datePublished">December 12, 2008</span>; Last Update: <span itemprop="dateModified">October 24, 2018</span>.</p><p><em>Estimated reading time: 10 minutes</em></p></div><div class="body-content whole_rhythm" itemprop="text"><div id="chapter1.Release_Notes"><h2 id="_chapter1_Release_Notes_">Release Notes</h2><p>Please see our <a href="/books/n/helpeutils/chapter4/#chapter4.Release_Notes">Release Notes</a> for details on recent changes and updates.</p></div><div id="chapter1.Announcement"><h2 id="_chapter1_Announcement_">Announcement</h2><p>On December 1, 2018, NCBI will begin enforcing the use of new API keys for E-utility calls. Please see <a href="/books/n/helpeutils/chapter2/">Chapter 2</a> for more details about this important change.</p></div><div id="chapter1.Introduction"><h2 id="_chapter1_Introduction_">Introduction</h2><p>This chapter provides a brief overview of basic E-utility functions along with examples of URL calls. Please see <a href="/books/n/helpeutils/chapter2/">Chapter 2</a> for a general introduction to these utilities and <a href="/books/n/helpeutils/chapter4/">Chapter 4</a> for a detailed discussion of syntax and parameters.</p><p><i>Examples</i> include live URLs that provide sample outputs.</p><p>All E-utility calls share the same base URL:</p><pre>https://eutils.ncbi.nlm.nih.gov/entrez/eutils/</pre></div><div id="chapter1.Searching_a_Database"><h2 id="_chapter1_Searching_a_Database_">Searching a Database</h2><div id="chapter1.Basic_Searching"><h3>Basic Searching</h3><pre>esearch.fcgi?db=<database>&term=<query></pre><p>Input: Entrez database (&db); Any Entrez text query (&term)</p><p>Output: List of UIDs matching the Entrez query</p><p>
|
|
<i>Example: Get the PubMed IDs (PMIDs) for articles about breast cancer published in Science in 2008</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=science%5bjournal%5d+AND+breast+cancer+AND+2008%5bpdat%5d" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=science[journal]+AND+breast+cancer+AND+2008[pdat]</a>
|
|
</span>
|
|
</p></div><div id="chapter1.Storing_Search_Results"><h3>Storing Search Results</h3><pre>esearch.fcgi?db=<database>&term=<query>&usehistory=y</pre><p>Input: Any Entrez text query (&term); Entrez database (&db); &usehistory=y</p><p>Output: Web environment (&WebEnv) and query key (&query_key) parameters specifying the location on the Entrez history server of the list of UIDs matching the Entrez query</p><p>
|
|
<i>Example: Get the PubMed IDs (PMIDs) for articles about breast cancer published in Science in 2008, and store them on the Entrez history server for later use</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=science%5bjournal%5d+AND+breast+cancer+AND+2008%5bpdat%5d&usehistory=y" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=science[journal]+AND+breast+cancer+AND+2008[pdat]&usehistory=y</a>
|
|
</span>
|
|
</p></div><div id="chapter1.Associating_Search_Results_with"><h3>Associating Search Results with Existing Search Results</h3><pre>esearch.fcgi?db=<database>&term=<query1>&usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1) <br /><br />esearch.fcgi?db=<database>&term=<query2>&usehistory=y&WebEnv=$web1<br /><br /># esearch produces WebEnv value ($web2) that contains the results <br />of both searches ($key1 and $key2)</pre><p>Input: Any Entrez text query (&term); Entrez database (&db); &usehistory=y; Existing web environment (&WebEnv) from a prior E-utility call</p><p>Output: Web environment (&WebEnv) and query key (&query_key) parameters specifying the location on the Entrez history server of the list of UIDs matching the Entrez query</p></div><div id="chapter1.For_More_Information"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ESearch">ESearch In-Depth</a> for a full description of ESearch.</p></div><div id="chapter1.Sample_ESearch_Output"><h3>Sample ESearch Output</h3><pre><?xml version="1.0" ?><br /><!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD eSearchResult, 11 May 2002//EN"<br /> "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSearch_020511.dtd"><br /><eSearchResult><br /><Count>255147</Count> # total number of records matching query<br /><RetMax>20</RetMax># number of UIDs returned in this XML; default=20<br /><RetStart>0</RetStart># index of first record returned; default=0<br /><QueryKey>1</QueryKey># QueryKey, only present if &usehistory=y<br /><WebEnv>0l93yIkBjmM60UBXuvBvPfBIq8-9nIsldXuMP0hhuMH-<br />8GjCz7F_Dz1XL6z@397033B29A81FB01_0038SID</WebEnv> <br /> # WebEnv; only present if &usehistory=y<br /> <IdList><br /><Id>229486465</Id> # list of UIDs returned<br /><Id>229486321</Id><br /><Id>229485738</Id><br /><Id>229470359</Id><br /><Id>229463047</Id><br /><Id>229463037</Id><br /><Id>229463022</Id><br /><Id>229463019</Id><br /><Id>229463007</Id><br /><Id>229463002</Id><br /><Id>229463000</Id><br /><Id>229462974</Id><br /><Id>229462961</Id><br /><Id>229462956</Id><br /><Id>229462921</Id><br /><Id>229462905</Id><br /><Id>229462899</Id><br /><Id>229462873</Id><br /><Id>229462863</Id><br /><Id>229462862</Id><br /></IdList><br /><TranslationSet> # details of how Entrez translated the query<br /> <Translation><br /> <From>mouse[orgn]</From><br /> <To>"Mus musculus"[Organism]</To><br /> </Translation><br /></TranslationSet><br /><TranslationStack><br /> <TermSet><br /> <Term>"Mus musculus"[Organism]</Term><br /> <Field>Organism</Field><br /> <Count>255147</Count><br /> <Explode>Y</Explode><br /> </TermSet><br /> <OP>GROUP</OP><br /></TranslationStack><br /><QueryTranslation>"Mus musculus"[Organism]</QueryTranslation><br /></eSearchResult></pre></div><div id="chapter1.Searching_PubMed_with_Citation"><h3>Searching PubMed with Citation Data</h3><pre>ecitmatch.cgi?db=pubmed&rettype=xml&bdata=<citations></pre><p>Input: List of citation strings separated by a carriage return (%0D), where each citation string has the following format:</p><p>journal_title|year|volume|first_page|author_name|your_key|</p><p>
|
|
<i>Output: A list of citation strings with the corresponding PubMed ID (PMID) appended.</i>
|
|
</p><p>
|
|
<i>Example: Search PubMed for the following ciations:</i>
|
|
</p><p>Art1: Mann, BJ. (1991) <i>Proc. Natl. Acad. Sci. USA.</i> 88:3248</p><p>Art2: Palmenberg, AC. (1987) <i>Science</i> 235:182</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ecitmatch.cgi?db=pubmed&retmode=xml&bdata=proc+natl+acad+sci+u+s+a|1991|88|3248|mann+bj|Art1|%0Dscience|1987|235|182|palmenberg+ac|Art2|" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ecitmatch.cgi?db=pubmed&retmode=xml&bdata=proc+natl+acad+sci+u+s+a|1991|88|3248|mann+bj|Art1|%0Dscience|1987|235|182|palmenberg+ac|Art2|</a>
|
|
</span>
|
|
</p><p>Sample Output (the PMIDs appear in the rightmost field):</p><pre>proc natl acad sci u s a|1991|88|3248|mann bj|Art1|2014248<br />science|1987|235|182|palmenberg ac|Art2|3026048</pre><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ECitMatch">ECitMatch In-Depth</a> for a full description of ECitMatch.</p></div></div><div id="chapter1.Uploading_UIDs_to_Entrez"><h2 id="_chapter1_Uploading_UIDs_to_Entrez_">Uploading UIDs to Entrez</h2><div id="chapter1.Basic_Uploading"><h3>Basic Uploading</h3><pre>epost.fcgi?db=<database>&id=<uid_list></pre><p>Input: List of UIDs (&id); Entrez database (&db)</p><p>Output: Web environment (&WebEnv) and query key (&query_key) parameters specifying the location on the Entrez history server of the list of uploaded UIDs</p><p>
|
|
<i>Example: Upload five Gene IDs (7173,22018,54314,403521,525013) for later processing.</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/epost.fcgi?db=gene&id=7173,22018,54314,403521,525013" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/epost.fcgi?db=gene&id=7173,22018,54314,403521,525013</a>
|
|
</span>
|
|
</p></div><div id="chapter1.Associating_a_Set_of_UIDs_with"><h3>Associating a Set of UIDs with Previously Posted Sets</h3><pre>epost.fcgi?db=<database1>&id=<uid_list1><br /><br /># epost produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />epost.fcgi?db=<database2>&id=<uid_list2>&WebEnv=$web1<br /><br /># epost produces WebEnv value ($web2) that contains the results of both <br />posts ($key1 and $key2)</pre><p>Input: List of UIDs (&id); Entrez database (&db); Existing web environment (&WebEnv)</p><p>Output: Web environment (&WebEnv) and query key (&query_key) parameters specifying the location on the Entrez history server of the list of uploaded UIDs</p></div><div id="chapter1.For_More_Information_1"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EPost">EPost In-Depth</a> for a full description of EPost.</p></div><div id="chapter1.Sample_EPost_Output"><h3>Sample EPost Output</h3><pre><?xml version="1.0"?><br /><!DOCTYPE ePostResult PUBLIC "-//NLM//DTD ePostResult, 11 May 2002//EN"<br /> "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/ePost_020511.dtd"><br /><ePostResult><br /><QueryKey>1</QueryKey><br /><WebEnv>NCID_01_268116914_130.14.18.47_9001_1241798628</WebEnv><br /></ePostResult></pre></div></div><div id="chapter1.Downloading_Document_Summaries"><h2 id="_chapter1_Downloading_Document_Summaries_">Downloading Document Summaries</h2><div id="chapter1.Basic_Downloading"><h3>Basic Downloading</h3><pre>esummary.fcgi?db=<database>&id=<uid_list></pre><p>Input: List of UIDs (&id); Entrez database (&db)</p><p>Output: XML DocSums</p><p>
|
|
<i>Example: Download DocSums for these protein GIs: 6678417,9507199,28558982,28558984,28558988,28558990</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=protein&id=6678417,9507199,28558982,28558984,28558988,28558990" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=protein&id=6678417,9507199,28558982,28558984,28558988,28558990</a>
|
|
</span>
|
|
</p></div><div id="chapter1.Downloading_Data_From_a_Previou"><h3>Downloading Data From a Previous Search</h3><pre>esearch.fcgi?db=<database>&term=<query>&usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />esummary.fcgi?db=<database>&query_key=$key1&WebEnv=$web1</pre><p>Input: Web environment (&WebEnv) and query key (&query_key) representing a set of Entrez UIDs on the Entrez history server</p><p>Output: XML DocSums</p></div><div id="chapter1.Sample_ESummary_Output"><h3>Sample ESummary Output</h3><p>The output of ESummary is a series of XML “DocSums” (Document Summaries), the format of which depends on the database. Below is an example DocSum for Entrez Protein.</p><pre><?xml version="1.0"?><br /><!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD eSummaryResult, 29 October<br /> 2004//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_<br />041029.dtd"><br /><eSummaryResult><br /><DocSum><br /><Id>15718680</Id><br /><Item Name="Caption" Type="String"><a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&targetsite=entrez&targetcat=link&targettype=genpept">NP_005537</a></Item><br /><Item Name="Title" Type="String">IL2-inducible T-cell kinase [Homo<br /> sapiens]</Item><br /><Item Name="Extra" <br />Type="String">gi|15718680|ref|<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&targetsite=entrez&targetcat=link&targettype=genpept">NP_005537.3</a>|[15718680]</Item><br /><Item Name="Gi" Type="Integer">15718680</Item><br /><Item Name="CreateDate" Type="String">1999/06/09</Item><br /><Item Name="UpdateDate" Type="String">2009/04/05</Item><br /><Item Name="Flags" Type="Integer">512</Item><br /><Item Name="TaxId" Type="Integer">9606</Item><br /><Item Name="Length" Type="Integer">620</Item><br /><Item Name="Status" Type="String">live</Item><br /><Item Name="ReplacedBy" Type="String"></Item><br /><Item Name="Comment" Type="String"><![CDATA[ ]]></Item><br /></DocSum><br /></eSummaryResult></pre></div><div id="chapter1.Sample_ESummary_version_2_0_Out"><h3>Sample ESummary version 2.0 Output</h3><p>Version 2.0 of ESummary is an alternate XML presentation of Entrez DocSums. To retrieve version 2.0 DocSums, the URL should contain the &version parameter with an assigned value of ‘2.0’. Each Entrez database provides its own unique DTD for version 2.0 DocSums, and a link to the relevant DTD is provided in the header of the version 2.0 XML.</p><pre>esummary.fcgi?db=<database>&id=<uid_list>&version=2.0</pre><p>Below is an example version 2.0 DocSum from Entrez Protein (the same record as shown above in the default DocSum XML).</p><pre><?xml version="1.0"?><br /><!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD eSummaryResult//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummaryDTD/eSummary_protein.dtd"><br /><eSummaryResult><br /> <DocumentSummarySet status="OK"><br /> <DocumentSummary uid="15718680"><br /> <Caption><a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&targetsite=entrez&targetcat=link&targettype=genpept">NP_005537</a></Caption><br /> <Title>tyrosine-protein kinase ITK/TSK [Homo sapiens]</Title><br /> <Extra>gi|15718680|ref|<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&targetsite=entrez&targetcat=link&targettype=genpept">NP_005537.3</a>|</Extra><br /> <Gi>15718680</Gi><br /><br /> <CreateDate>1999/06/09</CreateDate><br /> <UpdateDate>2011/10/09</UpdateDate><br /> <Flags>512</Flags><br /> <TaxId>9606</TaxId><br /> <Slen>620</Slen><br /><br /> <Biomol/><br /><br /> <MolType>aa</MolType><br /> <Topology>linear</Topology><br /> <SourceDb>refseq</SourceDb><br /> <SegSetSize>0</SegSetSize><br /> <ProjectId>0</ProjectId><br /> <Genome>genomic</Genome><br /><br /> <SubType>chromosome|map</SubType><br /> <SubName>5|5q31-q32</SubName><br /> <AssemblyGi>399658</AssemblyGi><br /> <AssemblyAcc><a href="/nuccore/399657" class="bk_tag" ref="pagearea=body&targetsite=entrez&targetcat=link&targettype=nuccore">D13720.1</a></AssemblyAcc><br /> <Tech/><br /> <Completeness/><br /> <GeneticCode>1</GeneticCode><br /><br /> <Strand/><br /> <Organism>Homo sapiens</Organism><br /> <Statistics><br /> <Stat type="all" count="8"/><br /> <Stat type="blob_size" count="16154"/><br /> <Stat type="cdregion" count="1"/><br /> <Stat type="cdregion" subtype="CDS" count="1"/><br /> <Stat type="gene" count="1"/><br /> <Stat type="gene" subtype="Gene" count="1"/><br /> <Stat type="org" count="1"/><br /> <Stat type="prot" count="1"/><br /> <Stat type="prot" subtype="Prot" count="1"/><br /> <Stat type="pub" count="14"/><br /> <Stat type="pub" subtype="PubMed" count="10"/><br /> <Stat type="pub" subtype="PubMed/Gene-rif" count="4"/><br /> <Stat type="site" count="4"/><br /> <Stat type="site" subtype="Site" count="4"/><br /> <Stat source="CDD" type="all" count="15"/><br /> <Stat source="CDD" type="region" count="6"/><br /> <Stat source="CDD" type="region" subtype="Region" count="6"/><br /> <Stat source="CDD" type="site" count="9"/><br /> <Stat source="CDD" type="site" subtype="Site" count="9"/><br /> <Stat source="HPRD" type="all" count="3"/><br /> <Stat source="HPRD" type="site" count="3"/><br /> <Stat source="HPRD" type="site" subtype="Site" count="3"/><br /> <Stat source="SNP" type="all" count="31"/><br /> <Stat source="SNP" type="imp" count="31"/><br /> <Stat source="SNP" type="imp" subtype="variation" count="31"/><br /> <Stat source="all" type="all" count="57"/><br /> <Stat source="all" type="blob_size" count="16154"/><br /> <Stat source="all" type="cdregion" count="1"/><br /> <Stat source="all" type="gene" count="1"/><br /> <Stat source="all" type="imp" count="31"/><br /> <Stat source="all" type="org" count="1"/><br /> <Stat source="all" type="prot" count="1"/><br /> <Stat source="all" type="pub" count="14"/><br /> <Stat source="all" type="region" count="6"/><br /> <Stat source="all" type="site" count="16"/><br /> </Statistics><br /> <AccessionVersion><a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&targetsite=entrez&targetcat=link&targettype=genpept">NP_005537.3</a></AccessionVersion><br /> <Properties aa="2">2</Properties><br /> <Comment/><br /> <OSLT indexed="yes"><a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&targetsite=entrez&targetcat=link&targettype=genpept">NP_005537.3</a></OSLT><br /> <IdGiClass mol="3" repr="2" gi_state="10" sat="4" sat_key="58760802" owner="20"<br /> sat_name="NCBI" owner_name="NCBI-Genomes" defdiv="GNM" length="620" extfeatmask="41"<br /> /><br /> </DocumentSummary><br /><br /> </DocumentSummarySet><br /></eSummaryResult></pre></div></div><div id="chapter1.Downloading_Full_Records"><h2 id="_chapter1_Downloading_Full_Records_">Downloading Full Records</h2><div id="chapter1.Basic_Downloading_1"><h3>Basic Downloading</h3><pre>efetch.fcgi?db=<database>&id=<uid_list>&rettype=<retrieval_type><br />&retmode=<retrieval_mode></pre><p>Input: List of UIDs (&id); Entrez database (&db); Retrieval type (&rettype); Retrieval mode (&retmode)</p><p>Output: Formatted data records as specified</p><p>
|
|
<i>Example: Download nuccore GIs 34577062 and 24475906 in FASTA format</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=34577062,24475906&rettype=fasta&retmode=text" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=34577062,24475906&rettype=fasta&retmode=text</a>
|
|
</span>
|
|
</p></div><div id="chapter1.Downloading_Data_From_a_Previou_1"><h3>Downloading Data From a Previous Search</h3><pre>esearch.fcgi?db=<database>&term=<query>&usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />efetch.fcgi?db=<database>&query_key=$key1&WebEnv=$web1&rettype=<br /><retrieval_type>&retmode=<retrieval_mode></pre><p>Input: Entrez database (&db); Web environment (&WebEnv) and query key (&query_key) representing a set of Entrez UIDs on the Entrez history server; Retrieval type (&rettype); Retrieval mode (&retmode)</p><p>Output: Formatted data records as specified</p></div><div id="chapter1.Downloading_a_Large_Set_of_Reco"><h3>Downloading a Large Set of Records</h3><p>
|
|
<span class="bk_pgobj">Please see </span>
|
|
<a href="/books/n/helpeutils/chapter3/#chapter3.Application_3_Retrieving_large">Application 3</a>
|
|
<span class="bk_pgobj"> in Chapter 3</span>
|
|
</p><p>Input: Entrez database (&db); Web environment (&WebEnv) and query key (&query_key) representing a set of Entrez UIDs on the Entrez history server; Retrieval start (&retstart), the first record of the set to retrieve; Retrieval maximum (&retmax), maximum number of records to retrieve</p><p>Output: Formatted data records as specified</p></div><div id="chapter1.For_More_Information_2"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EFetch">EFetch In-Depth</a> for a full description of EFetch.</p></div></div><div id="chapter1.Finding_Related_Data_Through_En"><h2 id="_chapter1_Finding_Related_Data_Through_En_">Finding Related Data Through Entrez Links</h2><div id="chapter1.Basic_Linking"><h3>Basic Linking</h3><div id="chapter1.Batch_mode__finds_only_one_set"><h4>Batch mode – finds only one set of linked UIDs</h4><pre>elink.fcgi?dbfrom=<source_db>&db=<destination_db>&id=<uid_list></pre><p>Input: List of UIDs (&id); Source Entrez database (&dbfrom); Destination Entrez database (&db)</p><p>Output: XML containing linked UIDs from source and destination databases</p><p>
|
|
<i>Example: Find one set of Gene IDs linked to nuccore GIs 34577062 and 24475906</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&db=gene&id=34577062,24475906" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&db=gene&id=34577062,24475906</a>
|
|
</span>
|
|
</p></div><div id="chapter1._By_Id_mode__finds_one_set_of_l"><h4>‘By Id’ mode – finds one set of linked UIDs for each input UID</h4><pre>elink.fcgi?dbfrom=<source_db>&db=<destination_db>&id=<uid1>&id=<br /><uid2>&id=<uid3>...</pre><p>
|
|
<i>Example: Find separate sets of Gene IDs linked to nuccore GIs 34577062 and 24475906</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&db=gene&id=34577062&id=24475906" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&db=gene&id=34577062&id=24475906</a>
|
|
</span>
|
|
</p><p>
|
|
<i>Note: &db may be a comma-delimited list of databases, so that elink returns multiple sets of linked UIDs in a single call</i>
|
|
</p></div></div><div id="chapter1.Finding_Links_to_Data_from_a_Pr"><h3>Finding Links to Data from a Previous Search</h3><pre>esearch.fcgi?db=<source_db>&term=<query>&usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />elink.fcgi?dbfrom=<source_db>&db=<destination_db>&query_key=<br />$key1&WebEnv=$web1&cmd=neighbor_history</pre><p>Input: Source Entrez database (&dbfrom); Destination Entrez database (&db); Web environment (&WebEnv) and query key (&query_key) representing the set of source UIDs on the Entrez history server; Command mode (&cmd)</p><p>Output: XML containing Web environments and query keys for each set of linked UIDs</p><p>
|
|
<i>Note: To achieve ‘By Id’ mode, one must send each input UID as a separate &id parameter in the URL. Sending a WebEnv/query_key set always produces Batch mode behavior (one set of linked UIDs).</i>
|
|
</p></div><div id="chapter1.Finding_Computational_Neighbors"><h3>Finding Computational Neighbors Limited by an Entrez Search</h3><pre>elink.fcgi?dbfrom=<source_db>&db=<source_db>&id=<uid_list>&term=<br /><query>&cmd=neighbor_history</pre><p>Input: Source Entrez database (&dbfrom); Destination Entrez database (&db); List of UIDs (&id); Entrez query (&term); Command mode (&cmd)</p><p>Output: XML containing Web environments and query keys for each set of linked UIDs</p><p>
|
|
<i>Example: Find protein UIDs that are rat Reference Sequences and that are sequence similar to GI 15718680</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=protein&db=protein&id=15718680&term=rat%5borgn%5d+AND+srcdb+refseq%5bprop%5d&cmd=neighbor_history" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=protein&db=protein&id=15718680&term=rat[orgn]+AND+srcdb+refseq[prop]&cmd=neighbor_history</a>
|
|
</span>
|
|
</p></div><div id="chapter1.For_More_Information_3"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ELink">ELink In-Depth</a> for a full description of ELink.</p></div></div><div id="chapter1.Getting_Database_Statistics_and"><h2 id="_chapter1_Getting_Database_Statistics_and_">Getting Database Statistics and Search Fields</h2><pre>einfo.fcgi?db=<database></pre><p>Input: Entrez database (&db)</p><p>Output: XML containing database statistics</p><p>
|
|
<i>Note: If no database parameter is supplied, einfo will return a list of all valid Entrez databases.</i>
|
|
</p><p>
|
|
<i>Example: Find database statistics for Entrez Protein.</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi?db=protein" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi?db=protein</a>
|
|
</span>
|
|
</p><div id="chapter1.For_More_Information_4"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EInfo">EInfo In-Depth</a> for a full description of EInfo.</p></div><div id="chapter1.Sample_EInfo_Output"><h3>Sample EInfo Output</h3><pre><?xml version="1.0"?><br /><!DOCTYPE eInfoResult PUBLIC "-//NLM//DTD eInfoResult, 11 May 2002//EN" <br />"https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eInfo_020511.dtd"><br /><eInfoResult><br /><DbInfo><br /><DbName>protein</DbName><br /><MenuName>Protein</MenuName><br /><Description>Protein sequence record</Description><br /><Count>26715092</Count><br /><LastUpdate>2009/05/12 04:39</LastUpdate><br /><FieldList><br /><Field><br /><Name>ALL</Name><br /><FullName>All Fields</FullName><br /><Description>All terms from all searchable fields</Description><br /><TermCount>133639432</TermCount><br /><IsDate>N</IsDate><br /><IsNumerical>N</IsNumerical><br /><SingleToken>N</SingleToken><br /><Hierarchy>N</Hierarchy><br /><IsHidden>N</IsHidden><br /></Field><br />...<br /><Field><br /><Name>PORG</Name><br /><FullName>Primary Organism</FullName><br /><Description>Scientific and common names <br />of primary organism, and all higher levels of taxonomy</Description><br /><TermCount>673555</TermCount><br /><IsDate>N</IsDate><br /><IsNumerical>N</IsNumerical><br /><SingleToken>Y</SingleToken><br /><Hierarchy>Y</Hierarchy><br /><IsHidden>N</IsHidden><br /></Field><br /></FieldList><br /><LinkList><br /><Link><br /><Name>protein_biosystems</Name><br /><Menu>BioSystem Links</Menu><br /><Description>BioSystems</Description><br /><DbTo>biosystems</DbTo><br /></Link><br />...<br /><Link><br /><Name>protein_unigene</Name><br /><Menu>UniGene Links</Menu><br /><Description>Related UniGene records</Description><br /><DbTo>unigene</DbTo><br /></Link><br /></LinkList><br /></DbInfo><br /></eInfoResult></pre></div></div><div id="chapter1.Performing_a_Global_Entrez_Sear"><h2 id="_chapter1_Performing_a_Global_Entrez_Sear_">Performing a Global Entrez Search</h2><pre>egquery.fcgi?term=<query></pre><p>Input: Entrez text query (&term)</p><p>Output: XML containing the number of hits in each database.</p><p>
|
|
<i>Example: Determine the number of records for mouse in Entrez.</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/egquery.fcgi?term=mouse%5borgn%5d" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/egquery.fcgi?term=mouse[orgn]</a>
|
|
</span>
|
|
</p><div id="chapter1.For_More_Information_5"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EGQuery">EGQuery In-Depth</a> for a full description of EGQuery.</p></div><div id="chapter1.Sample_EGQuery_Output"><h3>Sample EGQuery Output</h3><pre><?xml version="1.0"?><br /><!DOCTYPE Result PUBLIC "-//NLM//DTD eSearchResult, January 2004//EN"<br /> "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/egquery.dtd"><br /><!--<br /> $Id: egquery_template.xml 106311 2007-06-26 14:46:31Z osipov $<br />--><br /><!-- ================================================================= --><br /><Result><br /> <Term>mouse[orgn]</Term><br /> <eGQueryResult><br /> <ResultItem><br /> <DbName>pubmed</DbName><br /> <MenuName>PubMed</MenuName><br /> <Count>0</Count><br /> <Status>Term or Database is not found</Status><br /> </ResultItem><br /> <ResultItem><br /> <DbName>pmc</DbName><br /> <MenuName>PMC</MenuName><br /> <Count>3823</Count><br /> <Status>Ok</Status><br /> </ResultItem><br />...<br /> <ResultItem><br /> <DbName>nuccore</DbName><br /> <MenuName>Nucleotide</MenuName><br /> <Count>1739903</Count><br /> <Status>Ok</Status><br /> </ResultItem><br /> <ResultItem><br /> <DbName>nucgss</DbName><br /> <MenuName>GSS</MenuName><br /> <Count>2264567</Count><br /> <Status>Ok</Status><br /> </ResultItem><br /> <ResultItem><br /> <DbName>nucest</DbName><br /> <MenuName>EST</MenuName><br /> <Count>4852140</Count><br /> <Status>Ok</Status><br /> </ResultItem><br /> <ResultItem><br /> <DbName>protein</DbName><br /> <MenuName>Protein</MenuName><br /> <Count>255212</Count><br /> <Status>Ok</Status><br /> </ResultItem><br />...<br /> <ResultItem><br /> <DbName>proteinclusters</DbName><br /> <MenuName>Protein Clusters</MenuName><br /> <Count>13</Count><br /> <Status>Ok</Status><br /> </ResultItem><br /> </eGQueryResult><br /></Result></pre></div></div><div id="chapter1.Retrieving_Spelling_Suggestions"><h2 id="_chapter1_Retrieving_Spelling_Suggestions_">Retrieving Spelling Suggestions</h2><pre>espell.fcgi?term=<query>&db=<database></pre><p>Input: Entrez text query (&term); Entrez database (&db)</p><p>Output: XML containing the original query and spelling suggestions.</p><p>
|
|
<i>Example: Find spelling suggestions for the PubMed Central query ‘fiberblast cell grwth’.</i>
|
|
</p><p>
|
|
<span class="bk_pgobj">
|
|
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/espell.fcgi?term=fiberblast+cell+grwth&db=pmc" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/espell.fcgi?term=fiberblast+cell+grwth&db=pmc</a>
|
|
</span>
|
|
</p><div id="chapter1.For_More_Information_6"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ESpell">ESpell In-Depth</a> for a full description of EGQuery.</p></div><div id="chapter1.Sample_ESpell_Output"><h3>Sample ESpell Output</h3><pre><?xml version="1.0"?><br /><!DOCTYPE eSpellResult PUBLIC "-//NLM//DTD eSpellResult, 23 November <br />2004//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSpell.dtd"><br /><eSpellResult><br /><Database>pmc</Database><br /><Query>fiberblast cell grwth</Query><br /><CorrectedQuery>fibroblast cell growth</CorrectedQuery><br /><SpelledQuery><br /> <Replaced>fibroblast</Replaced><br /> <Original> cell </Original><br /> <Replaced>growth</Replaced><br /></SpelledQuery><br /><ERROR/><br /></eSpellResult></pre></div></div><div id="chapter1.Demonstration_Programs"><h2 id="_chapter1_Demonstration_Programs_">Demonstration Programs</h2><div id="chapter1.EBot"><h3>EBot</h3><p><a href="https://www.ncbi.nlm.nih.gov/Class/PowerTools/eutils/ebot/ebot.cgi" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">EBot</a> is an interactive web tool that first allows users to construct an arbitrary E-utility analysis pipeline and then generates a Perl script to execute the pipeline. The Perl script can be downloaded and executed on any computer with a Perl installation. For more details, see the EBot page linked above.</p></div><div id="chapter1.Sample_Perl_Scripts"><h3>Sample Perl Scripts</h3><p>The two sample Perl scripts below demonstrate basic E-utility functions. Both scripts should be copied and saved as plain text files and can be executed on any computer with a Perl installation.</p><p>ESearch-EFetch demonstrates basic search and retrieval functions.</p><pre>#!/usr/local/bin/perl -w<br /># =======================================================================<br />#<br /># PUBLIC DOMAIN NOTICE<br /># National Center for Biotechnology Information<br />#<br /># This software/database is a "United States Government Work" under the<br /># terms of the United States Copyright Act. It was written as part of<br /># the author's official duties as a United States Government employee and<br /># thus cannot be copyrighted. This software/database is freely available<br /># to the public for use. The National Library of Medicine and the U.S.<br /># Government have not placed any restriction on its use or reproduction.<br />#<br /># Although all reasonable efforts have been taken to ensure the accuracy<br /># and reliability of the software and data, the NLM and the U.S.<br /># Government do not and cannot warrant the performance or results that<br /># may be obtained by using this software or data. The NLM and the U.S.<br /># Government disclaim all warranties, express or implied, including<br /># warranties of performance, merchantability or fitness for any particular<br /># purpose.<br />#<br /># Please cite the author in any work or product based on this material.<br />#<br /># =======================================================================<br />#<br /># Author: Oleg Khovayko<br />#<br /># File Description: eSearch/eFetch calling example<br /># <br /># ---------------------------------------------------------------------<br /># Subroutine to prompt user for variables in the next section<br /><br />sub ask_user {<br /> print "$_[0] [$_[1]]: ";<br /> my $rc = <>;<br /> chomp $rc;<br /> if($rc eq "") { $rc = $_[1]; }<br /> return $rc;<br />}<br /><br /># ---------------------------------------------------------------------<br /># Define library for the 'get' function used in the next section.<br /># $utils contains route for the utilities.<br /># $db, $query, and $report may be supplied by the user when prompted; <br /># if not answered, default values, will be assigned as shown below.<br /><br />use LWP::Simple;<br /><br />my $utils = "https://www.ncbi.nlm.nih.gov/entrez/eutils";<br /><br />my $db = ask_user("Database", "Pubmed");<br />my $query = ask_user("Query", "zanzibar");<br />my $report = ask_user("Report", "abstract");<br /><br /># ---------------------------------------------------------------------<br /># $esearch cont?ins the PATH & parameters for the ESearch call<br /># $esearch_result containts the result of the ESearch call<br /># the results are displayed ?nd parsed into variables <br /># $Count, $QueryKey, and $WebEnv for later use and then displayed.<br /><br />my $esearch = "$utils/esearch.fcgi?" .<br /> "db=$db&retmax=1&usehistory=y&term=";<br /><br />my $esearch_result = get($esearch . $query);<br /><br />print "\nESEARCH RESULT: $esearch_result\n";<br /><br />$esearch_result =~ <br /> m|<Count>(\d+)</Count>.*<QueryKey>(\d+)</QueryKey>.*<WebEnv>(\S+)</WebEnv>|s;<br /><br />my $Count = $1;<br />my $QueryKey = $2;<br />my $WebEnv = $3;<br /><br />print "Count = $Count; QueryKey = $QueryKey; WebEnv = $WebEnv\n";<br /><br /># ---------------------------------------------------------------------<br /># this area defines a loop which will display $retmax citation results from <br /># Efetch each time the the Enter Key is pressed, after a prompt.<br /><br />my $retstart;<br />my $retmax=3;<br /><br />for($retstart = 0; $retstart < $Count; $retstart += $retmax) {<br /> my $efetch = "$utils/efetch.fcgi?" .<br /> "rettype=$report&retmode=text&retstart=$retstart&retmax=$retmax&" .<br /> "db=$db&query_key=$QueryKey&WebEnv=$WebEnv";<br /> <br /> print "\nEF_QUERY=$efetch\n"; <br /><br /> my $efetch_result = get($efetch);<br /> <br /> print "---------\nEFETCH RESULT(". <br /> ($retstart + 1) . ".." . ($retstart + $retmax) . "): ".<br /> "[$efetch_result]\n-----PRESS ENTER!!!-------\n";<br /> <>;<br />}</pre><p>EPost-ESummary demonstrates basic uploading and document summary retrieval.</p><pre>#!/usr/local/bin/perl -w<br /># =======================================================================<br />#<br /># PUBLIC DOMAIN NOTICE<br /># National Center for Biotechnology Information<br />#<br /># This software/database is a "United States Government Work" under the<br /># terms of the United States Copyright Act. It was written as part of<br /># the author's official duties as a United States Government employee and<br /># thus cannot be copyrighted. This software/database is freely available<br /># to the public for use. The National Library of Medicine and the U.S.<br /># Government have not placed any restriction on its use or reproduction.<br />#<br /># Although all reasonable efforts have been taken to ensure the accuracy<br /># and reliability of the software and data, the NLM and the U.S.<br /># Government do not and cannot warrant the performance or results that<br /># may be obtained by using this software or data. The NLM and the U.S.<br /># Government disclaim all warranties, express or implied, including<br /># warranties of performance, merchantability or fitness for any particular<br /># purpose.<br />#<br /># Please cite the author in any work or product based on this material.<br />#<br /># =======================================================================<br />#<br /># Author: Oleg Khovayko<br />#<br /># File Description: ePost/eSummary calling example<br /># <br /><br /># ---------------------------------------------------------------------<br />my $eutils_root = "https://www.ncbi.nlm.nih.gov/entrez/eutils";<br />my $ePost_url = "$eutils_root/epost.fcgi";<br />my $eSummary_url = "$eutils_root/esummary.fcgi";<br /><br />my $db_name = "PubMed";<br /><br /># ---------------------------------------------------------------------<br />use strict;<br /><br />use LWP::UserAgent;<br />use LWP::Simple;<br />use HTTP::Request;<br />use HTTP::Headers;<br />use CGI;<br /><br /># ---------------------------------------------------------------------<br /># Read input file into variable $file<br /># File name - forst argument $ARGV[0]<br /><br />undef $/; #for load whole file<br /><br />open IF, $ARGV[0] || die "Can't open for read: $!\n";<br />my $file = <IF>;<br />close IF;<br />print "Loaded file: [$file]\n";<br /><br /># Prepare file - substitute all separators to comma<br /><br />$file =~ s/\s+/,/gs;<br />print "Prepared file: [$file]\n";<br /><br />#Create CGI param line<br /><br />my $form_data = "db=$db_name&id=$file";<br /><br /># ---------------------------------------------------------------------<br /># Create HTTP request<br /><br />my $headers = new HTTP::Headers(<br /> Accept => "text/html, text/plain",<br /> Content_Type => "application/x-www-form-urlencoded"<br />);<br /><br />my $request = new HTTP::Request("POST", $ePost_url, $headers );<br /><br />$request->content($form_data);<br /><br /># Create the user agent object<br /><br />my $ua = new LWP::UserAgent;<br />$ua->agent("ePost/example");<br /><br /># ---------------------------------------------------------------------<br /># send file to ePost by HTTP<br /><br />my $response = $ua->request($request);<br /><br /># ---------------------------------------------------------------------<br /><br />print "Responce status message: [" . $response->message . "]\n";<br />print "Responce content: [" . $response->content . "]\n";<br /><br /># ---------------------------------------------------------------------<br /># Parse response->content and extract QueryKey & WebEnv<br />$response->content =~ <br /> m|<QueryKey>(\d+)</QueryKey>.*<WebEnv>(\S+)</WebEnv>|s;<br /><br />my $QueryKey = $1;<br />my $WebEnv = $2;<br /><br />print "\nEXTRACTED:\nQueryKey = $QueryKey;\nWebEnv = $WebEnv\n\n";<br /><br /># ---------------------------------------------------------------------<br /># Retrieve DocSum from eSummary by simple::get method and print it<br />#<br />print "eSummary result: [" . <br /> get("$eSummary_url?db=$db_name&query_key=$QueryKey&WebEnv=$WebEnv") . <br /> "]\n";</pre></div></div><div id="chapter1.For_More_Information_7"><h2 id="_chapter1_For_More_Information_7_">For More Information</h2><div id="chapter1.Announcement_Mailing_List"><h3>Announcement Mailing List</h3><p>NCBI posts general announcements regarding the E-utilities to the <a href="https://www.ncbi.nlm.nih.gov/mailman/listinfo/utilities-announce/" ref="pagearea=body&targetsite=external&targetcat=link&targettype=uri">utilities-announce announcement mailing list</a>. This mailing list is an announcement list only; individual subscribers may <b>not</b> send mail to the list. Also, the list of subscribers is private and is not shared or used in any other way except for providing announcements to list members. The list receives about one posting per month. Please subscribe at the above link.</p></div><div id="chapter1.Getting_Help"><h3>Getting Help</h3><p>Please refer to the <a href="/books/n/helppubmed/pubmedhelp/">PubMed</a> and <a href="/books/n/helpentrez/EntrezHelp/">Entrez</a> help documents for more information about search queries, database indexing, field limitations and database content.</p><p>Suggestions, comments, and questions specifically relating to the EUtility programs may be sent to <a href="mailto:dev@null" data-email="vog.hin.mln.ibcn@seitilitue" class="oemail">vog.hin.mln.ibcn@seitilitue</a>.</p></div></div><div id="bk_toc_contnr"></div></div></div>
|
|
<div class="post-content"><div><div class="half_rhythm"><a href="/books/about/copyright/">Copyright Notice</a></div><div class="small"><span class="label">Bookshelf ID: NBK25500</span></div><div style="margin-top:2em" class="bk_noprnt"><a class="bk_cntns" href="/books/n/helpeutils/">Contents</a><div class="pagination bk_noprnt"><a class="active page_link prev" href="/books/n/helpeutils/" title="Previous page in this title">< Prev</a><a class="active page_link next" href="/books/n/helpeutils/chapter2/" title="Next page in this title">Next ></a></div></div></div></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="bottom">
|
|
|
|
<div id="NCBIFooter_dynamic">
|
|
<!--<component id="Breadcrumbs" label="breadcrumbs"/>
|
|
<component id="Breadcrumbs" label="helpdesk"/>-->
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript" src="/portal/portal3rc.fcgi/rlib/js/InstrumentNCBIBaseJS/InstrumentPageStarterJS.js"> </script>
|
|
</div>
|
|
</div>
|
|
<!--/.page-->
|
|
</div>
|
|
<!--/.wrap-->
|
|
</div><!-- /.twelve_col -->
|
|
</div>
|
|
<!-- /.grid -->
|
|
|
|
<span class="PAFAppResources"></span>
|
|
|
|
<!-- BESelector tab -->
|
|
|
|
|
|
|
|
<noscript><img alt="statistics" src="/stat?jsdisabled=true&ncbi_db=books&ncbi_pdid=book-part&ncbi_acc=NBK25500&ncbi_domain=helpeutils&ncbi_report=printable&ncbi_type=fulltext&ncbi_objectid=&ncbi_pcid=/NBK25500/?report=printable&ncbi_app=bookshelf" /></noscript>
|
|
|
|
|
|
<!-- usually for JS scripts at page bottom -->
|
|
<!--<component id="PageFixtures" label="styles"></component>-->
|
|
|
|
|
|
<!-- CE8B5AF87C7FFCB1_0191SID /projects/books/PBooks@9.11 portal104 v4.1.r689238 Tue, Oct 22 2024 16:10:51 -->
|
|
<span id="portal-csrf-token" style="display:none" data-token="CE8B5AF87C7FFCB1_0191SID"></span>
|
|
|
|
<script type="text/javascript" src="//static.pubmed.gov/portal/portal3rc.fcgi/4216699/js/3879255/4121861/3501987/4008961/3893018/3821238/3400083/3426610.js" snapshot="books"></script></body>
|
|
</html> |