<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Bio.EUtils.ThinClient.ThinClient</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> <a href="Bio-module.html">Package Bio</a> :: <a href="Bio.EUtils-module.html">Package EUtils</a> :: <a href="Bio.EUtils.ThinClient-module.html">Module ThinClient</a> :: Class ThinClient </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide private</a>]</span></td></tr> <tr><td align="right"><span class="options" >[<a href="frames.html" target="_top">frames</a >] | <a href="Bio.EUtils.ThinClient.ThinClient-class.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class ThinClient</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient">source code</a></span></p> <p>Client-side interface to the EUtils services</p> <p>See the module docstring for much more complete information.</p> <!-- ==================== INSTANCE METHODS ==================== --> <a name="section-InstanceMethods"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Instance Methods</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-InstanceMethods" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">opener</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">tool</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">EUtils_Python_client</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">email</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">biopython-dev@biopython.org</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">baseurl</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">http://eutils.ncbi.nlm.nih.gov/entrez/eutils/</code><code class="variable-quote">'</code></span>)</span><br /> opener = None, tool = TOOL, email = EMAIL, baseurl = ".../eutils/"</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.__init__">source code</a></span> </td> </tr> </table> </td> </tr> <tr class="private"> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="_fixup_query"></a><span class="summary-sig-name">_fixup_query</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">query</span>)</span><br /> Internal function to add and remove fields from a query</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient._fixup_query">source code</a></span> </td> </tr> </table> </td> </tr> <tr class="private"> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#_wait" class="summary-sig-name" onclick="show_private();">_wait</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">delay</span>=<span class="summary-sig-default">3.0</span>)</span><br /> Enforce the NCBI requirement of one request every three seconds.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient._wait">source code</a></span> </td> </tr> </table> </td> </tr> <tr class="private"> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a name="_get"></a><span class="summary-sig-name">_get</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">program</span>, <span class="summary-sig-arg">query</span>)</span><br /> Internal function: send the query string to the program as GET</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient._get">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#esearch" class="summary-sig-name">esearch</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">term</span>, <span class="summary-sig-arg">db</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">pubmed</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">field</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">daterange</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">retstart</span>=<span class="summary-sig-default">0</span>, <span class="summary-sig-arg">retmax</span>=<span class="summary-sig-default">20</span>, <span class="summary-sig-arg">usehistory</span>=<span class="summary-sig-default">0</span>, <span class="summary-sig-arg">webenv</span>=<span class="summary-sig-default">None</span>)</span><br /> term, db="pubmed", field=None, daterange=None, retstart=0, retmax=20, usehistory=0, webenv=none</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.esearch">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#epost" class="summary-sig-name">epost</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">dbids</span>, <span class="summary-sig-arg">webenv</span>=<span class="summary-sig-default">None</span>)</span><br /> dbids, webenv = None</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.epost">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#esummary_using_history" class="summary-sig-name">esummary_using_history</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">db</span>, <span class="summary-sig-arg">webenv</span>, <span class="summary-sig-arg">query_key</span>, <span class="summary-sig-arg">retstart</span>=<span class="summary-sig-default">0</span>, <span class="summary-sig-arg">retmax</span>=<span class="summary-sig-default">20</span>, <span class="summary-sig-arg">retmode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span><br /> db, webenv, query_key, retstart = 0, retmax = 20, retmode = "xml"</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.esummary_using_history">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#esummary_using_dbids" class="summary-sig-name">esummary_using_dbids</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">dbids</span>, <span class="summary-sig-arg">retmode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span><br /> dbids, retmode = "xml"</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.esummary_using_dbids">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#efetch_using_history" class="summary-sig-name">efetch_using_history</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">db</span>, <span class="summary-sig-arg">webenv</span>, <span class="summary-sig-arg">query_key</span>, <span class="summary-sig-arg">retstart</span>=<span class="summary-sig-default">0</span>, <span class="summary-sig-arg">retmax</span>=<span class="summary-sig-default">20</span>, <span class="summary-sig-arg">retmode</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">rettype</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">seq_start</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">seq_stop</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">strand</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">complexity</span>=<span class="summary-sig-default">None</span>)</span><br /> db, webenv, query_key, retstart=0, retmax=20, retmode=None, rettype=None, seq_start=None, seq_stop=None, strand=None, complexity=None</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.efetch_using_history">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#efetch_using_dbids" class="summary-sig-name">efetch_using_dbids</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">dbids</span>, <span class="summary-sig-arg">retmode</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">rettype</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">seq_start</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">seq_stop</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">strand</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">complexity</span>=<span class="summary-sig-default">None</span>)</span><br /> dbids, retmode = None, rettype = None, seq_start = None, seq_stop = None, strand = None, complexity = None</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.efetch_using_dbids">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#elink_using_history" class="summary-sig-name">elink_using_history</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">dbfrom</span>, <span class="summary-sig-arg">webenv</span>, <span class="summary-sig-arg">query_key</span>, <span class="summary-sig-arg">db</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">pubmed</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">retstart</span>=<span class="summary-sig-default">0</span>, <span class="summary-sig-arg">retmax</span>=<span class="summary-sig-default">20</span>, <span class="summary-sig-arg">cmd</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">neighbor</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">retmode</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">term</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">field</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">daterange</span>=<span class="summary-sig-default">None</span>)</span><br /> dbfrom, webenv, query_key, db="pubmed", retstart=0, retmax=20, cmd="neighbor", retmode=None, term=None, field=None, daterange=None,</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.elink_using_history">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><span class="summary-sig"><a href="Bio.EUtils.ThinClient.ThinClient-class.html#elink_using_dbids" class="summary-sig-name">elink_using_dbids</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">dbids</span>, <span class="summary-sig-arg">db</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">pubmed</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">cmd</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">neighbor</code><code class="variable-quote">'</code></span>, <span class="summary-sig-arg">retmode</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">term</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">field</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">daterange</span>=<span class="summary-sig-default">None</span>)</span><br /> dbids, db="pubmed", cmd="neighbor", retmode=None, term=None, daterange=None</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.elink_using_dbids">source code</a></span> </td> </tr> </table> </td> </tr> </table> <!-- ==================== METHOD DETAILS ==================== --> <a name="section-MethodDetails"></a> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Method Details</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-MethodDetails" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> </table> <a name="__init__"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>, <span class="sig-arg">opener</span>=<span class="sig-default">None</span>, <span class="sig-arg">tool</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">EUtils_Python_client</code><code class="variable-quote">'</code></span>, <span class="sig-arg">email</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">biopython-dev@biopython.org</code><code class="variable-quote">'</code></span>, <span class="sig-arg">baseurl</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">http://eutils.ncbi.nlm.nih.gov/entrez/eutils/</code><code class="variable-quote">'</code></span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.__init__">source code</a></span> </td> </tr></table> <pre class="literalblock"> opener = None, tool = TOOL, email = EMAIL, baseurl = ".../eutils/" 'opener' -- an object which implements the 'open' method like a urllib2.OpenDirector. Defaults to urllib2.build_opener() 'tool' -- the term to use for the 'tool' field, used by NCBI to track which programs use their services. If you write your own tool based on this package, use your own tool name. 'email' -- a way for NCBI to contact you (the developer, not the user!) if there are problems and to tell you about updates or changes to their system. 'baseurl' -- location of NCBI's EUtils directory. Shouldn't need to change this at all. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <a name="_wait"></a> <div class="private"> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">_wait</span>(<span class="sig-arg">self</span>, <span class="sig-arg">delay</span>=<span class="sig-default">3.0</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient._wait">source code</a></span> </td> </tr></table> <p>Enforce the NCBI requirement of one request every three seconds.</p> <p>Ideally the calling code would have respected the 3 second rule, but as this often hasn't happenend we check this here.</p> <p>wait - number of seconds between queries.</p> <dl class="fields"> </dl> </td></tr></table> </div> <a name="esearch"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">esearch</span>(<span class="sig-arg">self</span>, <span class="sig-arg">term</span>, <span class="sig-arg">db</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">pubmed</code><code class="variable-quote">'</code></span>, <span class="sig-arg">field</span>=<span class="sig-default">None</span>, <span class="sig-arg">daterange</span>=<span class="sig-default">None</span>, <span class="sig-arg">retstart</span>=<span class="sig-default">0</span>, <span class="sig-arg">retmax</span>=<span class="sig-default">20</span>, <span class="sig-arg">usehistory</span>=<span class="sig-default">0</span>, <span class="sig-arg">webenv</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.esearch">source code</a></span> </td> </tr></table> <pre class="literalblock"> term, db="pubmed", field=None, daterange=None, retstart=0, retmax=20, usehistory=0, webenv=none Search the given database for records matching the query given in the 'term'. See the module docstring for examples. 'term' -- the query string in the Entrez query language; see http://www.ncbi.nlm.nih.gov/entrez/query/static/help/pmhelp.html 'db' -- the database to search 'field' -- the field to use for unqualified words Eg, "dalke[au] AND gene" with field==None becomes dalke[au] AND (genes[MeSH Terms] OR gene[Text Word] and "dalke[au] AND gene" with field=="au" becomes dalke[au] AND genes[Author] (Yes, I think the first "au" should be "Author" too) 'daterange' -- a date restriction; either WithinNDays or DateRange 'retstart' -- include identifiers in the output, starting with position 'retstart' (normally starts with 0) 'retmax' -- return at most 'retmax' identifiers in the output (if not specified, NCBI returns 20 identifiers) 'usehistory' -- flag to enable history tracking 'webenv' -- if this string is given, add the search results to an existing history. (WARNING: the history disappers after about an hour of non-use.) You will need to parse the output XML to get the new QueryKey and WebEnv fields. Returns an input stream from an HTTP request. The stream contents are in XML. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <a name="epost"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">epost</span>(<span class="sig-arg">self</span>, <span class="sig-arg">dbids</span>, <span class="sig-arg">webenv</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.epost">source code</a></span> </td> </tr></table> <pre class="literalblock"> dbids, webenv = None Create a new collection in the history containing the given list of identifiers for a database. 'dbids' -- a DBIds, which contains the database name and a list of identifiers in that database 'webenv' -- if this string is given, add the collection to an existing history. (WARNING: the history disappers after about an hour of non-use.) You will need to parse the output XML to get the new QueryKey and WebEnv fields. NOTE: The order of the IDs on the server is NOT NECESSARILY the same as the upload order. Returns an input stream from an HTTP request. The stream contents are in XML. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <a name="esummary_using_history"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">esummary_using_history</span>(<span class="sig-arg">self</span>, <span class="sig-arg">db</span>, <span class="sig-arg">webenv</span>, <span class="sig-arg">query_key</span>, <span class="sig-arg">retstart</span>=<span class="sig-default">0</span>, <span class="sig-arg">retmax</span>=<span class="sig-default">20</span>, <span class="sig-arg">retmode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.esummary_using_history">source code</a></span> </td> </tr></table> <p>db, webenv, query_key, retstart = 0, retmax = 20, retmode = "xml"</p> <p>Get the summary for a collection of records in the history</p> <p>'db' -- the database containing the history/collection 'webenv' -- the WebEnv cookie for the history 'query_key' -- the collection in the history 'retstart' -- get the summaries starting with this position 'retmax' -- get at most this many summaries 'retmode' -- can only be 'xml'. (Are there others?)</p> <p>Returns an input stream from an HTTP request. The stream contents are in 'retmode' format.</p> <dl class="fields"> </dl> </td></tr></table> </div> <a name="esummary_using_dbids"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">esummary_using_dbids</span>(<span class="sig-arg">self</span>, <span class="sig-arg">dbids</span>, <span class="sig-arg">retmode</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">xml</code><code class="variable-quote">'</code></span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.esummary_using_dbids">source code</a></span> </td> </tr></table> <pre class="literalblock"> dbids, retmode = "xml" Get the summary for records specified by identifier 'dbids' -- a DBIds containing the database name and list of record identifiers 'retmode' -- can only be 'xml' Returns an input stream from an HTTP request. The stream contents are in 'retmode' format. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <a name="efetch_using_history"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">efetch_using_history</span>(<span class="sig-arg">self</span>, <span class="sig-arg">db</span>, <span class="sig-arg">webenv</span>, <span class="sig-arg">query_key</span>, <span class="sig-arg">retstart</span>=<span class="sig-default">0</span>, <span class="sig-arg">retmax</span>=<span class="sig-default">20</span>, <span class="sig-arg">retmode</span>=<span class="sig-default">None</span>, <span class="sig-arg">rettype</span>=<span class="sig-default">None</span>, <span class="sig-arg">seq_start</span>=<span class="sig-default">None</span>, <span class="sig-arg">seq_stop</span>=<span class="sig-default">None</span>, <span class="sig-arg">strand</span>=<span class="sig-default">None</span>, <span class="sig-arg">complexity</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.efetch_using_history">source code</a></span> </td> </tr></table> <pre class="literalblock"> db, webenv, query_key, retstart=0, retmax=20, retmode=None, rettype=None, seq_start=None, seq_stop=None, strand=None, complexity=None Fetch information for a collection of records in the history, in a variety of formats. 'db' -- the database containing the history/collection 'webenv' -- the WebEnv cookie for the history 'query_key' -- the collection in the history 'retstart' -- get the formatted data starting with this position 'retmax' -- get data for at most this many records These options work for sequence databases 'seq_start' -- return the sequence starting at this position. The first position is numbered 1 'seq_stop' -- return the sequence ending at this position Includes the stop position, so seq_start = 1 and seq_stop = 5 returns the first 5 bases/residues. 'strand' -- strand. Use EUtils.PLUS_STRAND (== 1) for plus strand and EUtils.MINUS_STRAND (== 2) for negative 'complexity' -- regulates the level of display. Options are 0 - get the whole blob 1 - get the bioseq for gi of interest (default in Entrez) 2 - get the minimal bioseq-set containing the gi of interest 3 - get the minimal nuc-prot containing the gi of interest 4 - get the minimal pub-set containing the gi of interest http://www.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html The valid retmode and rettype values are For publication databases (omim, pubmed, journals) the retmodes are 'xml', 'asn.1', 'text', and 'html'. If retmode == xml ---> XML (default) if retmode == asn.1 ---> ASN.1 The following rettype values work for retmode == 'text'. docsum ----> author / title / cite / PMID brief ----> a one-liner up to about 66 chars abstract ----> cite / title / author / dept / full abstract / PMID citation ----> cite / title / author / dept / full abstract / MeSH terms / substances / PMID medline ----> full record in medline format asn.1 ----> full record in one ASN.1 format mlasn1 ----> full record in another ASN.1 format uilist ----> list of uids, one per line sgml ----> same as retmode="xml" Sequence databases (genome, protein, nucleotide, popset) also have retmode values of 'xml', 'asn.1', 'text', and 'html'. If retmode == 'xml' ---> XML (default; only supports rettype == 'native') If retmode == 'asn.1' ---> ASN.1 text (only works for rettype of 'native' and 'sequin') The following work with a retmode of 'text' or 'html' native ----> Default format for viewing sequences fasta ----> FASTA view of a sequence gb ----> GenBank view for sequences, constructed sequences will be shown as contigs (by pointing to its parts). Valid for nucleotides. gbwithparts --> GenBank view for sequences, the sequence will always be shown. Valid for nucleotides. est ----> EST Report. Valid for sequences from dbEST database. gss ----> GSS Report. Valid for sequences from dbGSS database. gp ----> GenPept view. Valid for proteins. seqid ----> To convert list of gis into list of seqids acc ----> To convert list of gis into list of accessions # XXX TRY THESE fasta_xml gb_xml gi (same as uilist?) A retmode of 'file' is the same as 'text' except the data is sent with a Content-Type of application/octet-stream, which tells the browser to save the data to a file. A retmode of 'html' is the same as 'text' except a HTML header and footer are added and special character are properly escaped. Returns an input stream from an HTTP request. The stream contents are in the requested format. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <a name="efetch_using_dbids"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">efetch_using_dbids</span>(<span class="sig-arg">self</span>, <span class="sig-arg">dbids</span>, <span class="sig-arg">retmode</span>=<span class="sig-default">None</span>, <span class="sig-arg">rettype</span>=<span class="sig-default">None</span>, <span class="sig-arg">seq_start</span>=<span class="sig-default">None</span>, <span class="sig-arg">seq_stop</span>=<span class="sig-default">None</span>, <span class="sig-arg">strand</span>=<span class="sig-default">None</span>, <span class="sig-arg">complexity</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.efetch_using_dbids">source code</a></span> </td> </tr></table> <pre class="literalblock"> dbids, retmode = None, rettype = None, seq_start = None, seq_stop = None, strand = None, complexity = None Fetch information for records specified by identifier 'dbids' -- a DBIds containing the database name and list of record identifiers 'retmode' -- See the docstring for 'efetch_using_history' 'rettype' -- See the docstring for 'efetch_using_history' These options work for sequence databases 'seq_start' -- return the sequence starting at this position. The first position is numbered 1 'seq_stop' -- return the sequence ending at this position Includes the stop position, so seq_start = 1 and seq_stop = 5 returns the first 5 bases/residues. 'strand' -- strand. Use EUtils.PLUS_STRAND (== 1) for plus strand and EUtils.MINUS_STRAND (== 2) for negative 'complexity' -- regulates the level of display. Options are 0 - get the whole blob 1 - get the bioseq for gi of interest (default in Entrez) 2 - get the minimal bioseq-set containing the gi of interest 3 - get the minimal nuc-prot containing the gi of interest 4 - get the minimal pub-set containing the gi of interest Returns an input stream from an HTTP request. The stream contents are in the requested format. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <a name="elink_using_history"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">elink_using_history</span>(<span class="sig-arg">self</span>, <span class="sig-arg">dbfrom</span>, <span class="sig-arg">webenv</span>, <span class="sig-arg">query_key</span>, <span class="sig-arg">db</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">pubmed</code><code class="variable-quote">'</code></span>, <span class="sig-arg">retstart</span>=<span class="sig-default">0</span>, <span class="sig-arg">retmax</span>=<span class="sig-default">20</span>, <span class="sig-arg">cmd</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">neighbor</code><code class="variable-quote">'</code></span>, <span class="sig-arg">retmode</span>=<span class="sig-default">None</span>, <span class="sig-arg">term</span>=<span class="sig-default">None</span>, <span class="sig-arg">field</span>=<span class="sig-default">None</span>, <span class="sig-arg">daterange</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.elink_using_history">source code</a></span> </td> </tr></table> <pre class="literalblock"> dbfrom, webenv, query_key, db="pubmed", retstart=0, retmax=20, cmd="neighbor", retmode=None, term=None, field=None, daterange=None, Find records related (in various ways) to a collection of records in the history. 'dbfrom' -- this is the name of the database containing the collection of record. NOTE! For the other methods this is named 'db'. But I'm keeping NCBI's notation. This is where the records come FROM. 'webenv' -- the WebEnv cookie for the history 'query_key' -- the collection in the history 'db' -- Where the records link TO. This is where you want to find the new records. For example, if you want to find PubMed records related to a protein then 'dbfrom' is 'protein' and 'db' is 'pubmed' 'cmd'-- one of the following (unless specified, retmode is the default value, which returns data in XML) neighbor: Display neighbors and their scores by database and ID. (This is the default 'cmd'.) prlinks: List the hyperlink to the primary LinkOut provider for multiple IDs and database. When retmode == 'ref' this URL redirects the browser to the primary LinkOut provider for a single ID and database. llinks: List LinkOut URLs and Attributes for multiple IDs and database. lcheck: Check for the existence (Y or N) of an external link in for multiple IDs and database. ncheck: Check for the existence of a neighbor link for each ID, e.g., Related Articles in PubMed. 'retstart' -- get the formatted data starting with this position 'retmax' -- get data for at most this many records 'retmode' -- only used with 'prlinks' 'term' -- restrict results to records which also match this Entrez search 'field' -- the field to use for unqualified words 'daterange' -- restrict results to records which also match this date criteria; either WithinNDays or DateRange NOTE: DateRange must have both mindate and maxdate Some examples: In PubMed, to get a list of "Related Articles" dbfrom = pubmed cmd = neighbor To get MEDLINE index only related article dbfrom = pubmed db = pubmed term = medline[sb] cmd = neighbor Given a PubMed record, find the related nucleotide records dbfrom = pubmed db = nucleotide (or "protein" for related protein records) cmd = neighbor To get "LinkOuts" (external links) for a PubMed record set dbfrom = pubmed cmd = llinks Get the primary link information for a PubMed document; includes various hyperlinks, image URL for the provider, etc. dbfrom = pubmed cmd = prlinks (optional) retmode = "ref" (causes a redirect to the privder) Returns an input stream from an HTTP request. The stream contents are in XML unless 'retmode' is 'ref'. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <a name="elink_using_dbids"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr valign="top"><td> <h3 class="epydoc"><span class="sig"><span class="sig-name">elink_using_dbids</span>(<span class="sig-arg">self</span>, <span class="sig-arg">dbids</span>, <span class="sig-arg">db</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">pubmed</code><code class="variable-quote">'</code></span>, <span class="sig-arg">cmd</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">neighbor</code><code class="variable-quote">'</code></span>, <span class="sig-arg">retmode</span>=<span class="sig-default">None</span>, <span class="sig-arg">term</span>=<span class="sig-default">None</span>, <span class="sig-arg">field</span>=<span class="sig-default">None</span>, <span class="sig-arg">daterange</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.ThinClient-pysrc.html#ThinClient.elink_using_dbids">source code</a></span> </td> </tr></table> <pre class="literalblock"> dbids, db="pubmed", cmd="neighbor", retmode=None, term=None, daterange=None Find records related (in various ways) to a set of records specified by identifier. 'dbids' -- a DBIds containing the database name and list of record identifiers 'db' -- Where the records link TO. This is where you want to find the new records. For example, if you want to find PubMed records related to a protein then 'db' is 'pubmed'. (The database they are from is part of the DBIds object.) 'cmd' -- see the docstring for 'elink_using_history' 'retmode' -- see 'elink_using_history' 'term' -- see 'elink_using_history' 'daterange' -- see 'elink_using_history' Returns an input stream from an HTTP request. The stream contents are in XML unless 'retmode' is 'ref'. </pre> <dl class="fields"> </dl> </td></tr></table> </div> <br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th> <a href="module-tree.html">Trees</a> </th> <!-- Index link --> <th> <a href="identifier-index.html">Indices</a> </th> <!-- Help link --> <th> <a href="help.html">Help</a> </th> <th class="navbar" width="100%"></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Mon Sep 15 09:26:33 2008 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>