<?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.DBIdsClient</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> :: Module DBIdsClient </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.DBIdsClient-module.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== MODULE DESCRIPTION ==================== --> <h1 class="epydoc">Module DBIdsClient</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.EUtils.DBIdsClient-pysrc.html">source code</a></span></p> <p>Search and retrieve information given a set of database identifiers.</p> <p>EUtils has two major modes. One uses history while the other uses database identifiers. This is a high-level interface for working with identifiers. You should use this module to get information about a set of known database identifiers.</p> <p>See HistoryClient if you want to work with a large number of identifiers or potentially large search results.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span><span class="py-keyword">from</span> Bio <span class="py-keyword">import</span> EUtils <span class="py-prompt">>>> </span><span class="py-keyword">from</span> Bio.EUtils <span class="py-keyword">import</span> DBIdsClient <span class="py-prompt">>>> </span>client = DBIdsClient.DBIdsClient() <span class="py-prompt">>>> </span>result = client.search(<span class="py-string">"dalke"</span>, retmax = 100) <span class="py-prompt">>>> </span>len(result) <span class="py-output">30</span> <span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> result[0].efetch(retmode = <span class="py-string">"text"</span>, rettype = <span class="py-string">"abstract"</span>).read()</pre> <p>1: Pac Symp Biocomput 1997;:85-96</p> <p>Using Tcl for molecular visualization and analysis.</p> <p>Dalke A, Schulten K.</p> <p>Beckman Institute, Urbana, IL 61801, USA.</p> <p>Reading and manipulating molecular structure data is a standard task in every molecular visualization and analysis program, but is rarely available in a form readily accessible to the user. Instead, the development of new methods for analysis, display, and interaction is often achieved by writing a new program, rather than building on pre-existing software. We present the Tcl-based script language used in our molecular modeling program, VMD, and show how it can access information about the molecular structure, perform analysis, and graphically display and animate the results. The commands are available to the user and make VMD a useful environment for studying biomolecules.</p> <p>PMID: 9390282 [PubMed - indexed for MEDLINE]</p> <p>>>></p> <p>Find sequences similar to GI:4579714 which were published in 2002.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>protein = DBIdsClient.from_dbids(EUtils.DBIds(<span class="py-string">"protein"</span>, <span class="py-string">"4579714"</span>)) <span class="py-prompt">>>> </span>neighbors = protein.neighbor_links(<span class="py-string">"protein"</span>, <span class="py-more">... </span> daterange = EUtils.DateRange(<span class="py-string">"2002/01/01"</span>, <span class="py-string">"2002/12/31"</span>, <span class="py-string">"pdat"</span>)) <span class="py-prompt">>>> </span>dbids = neighbors.linksetdbs[<span class="py-string">"protein_protein"</span>].dbids <span class="py-prompt">>>> </span>len(dbids) <span class="py-output">28</span> <span class="py-output"></span><span class="py-prompt">>>> </span><span class="py-keyword">print</span> dbids <span class="py-output">DBIds(u'protein', [u'4579714', u'25298947', u'24158913', u'24158914', u'24158915', u'17942993', u'17942994', u'17942995', u'20150921', u'20150922', u'20151159', u'25298949', u'19716034', u'20663737', u'20663738', u'20663741', u'24987328', u'25533128', u'25298946', u'25298948', u'23008597', u'20219020', u'21218340', u'21218344', u'19075395', u'21218338', u'21218342', u'21311795'])</span> <span class="py-output"></span><span class="py-prompt">>>> </span> <span class="py-prompt">>>> </span><span class="py-keyword">print</span> client.from_dbids(dbids[:5]).efetch(retmode=<span class="py-string">"text"</span>, <span class="py-more">... </span> rettype=<span class="py-string">"summary"</span>).read()</pre> <p>1: BAA75200 Bacteriorhodopsin [Halobacterium sp.] gi|4579714|dbj|BAA75200.1|[4579714]</p> <p>2: H84300 bacteriorhodopsin [imported] - Halobacterium sp. NRC-1 gi|25298947|pir||H84300[25298947]</p> <p>3: 1M0KA Chain A, Bacteriorhodopsin K Intermediate At 1.43 A Resolution gi|24158913|pdb|1M0K|A[24158913]</p> <p>4: 1M0LA Chain A, BacteriorhodopsinLIPID COMPLEX AT 1.47 A RESOLUTION gi|24158914|pdb|1M0L|A[24158914]</p> <p>5: 1M0MA Chain A, Bacteriorhodopsin M1 Intermediate At 1.43 A Resolution gi|24158915|pdb|1M0M|A[24158915]</p> <p>>>></p> <!-- ==================== CLASSES ==================== --> <a name="section-Classes"></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">Classes</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Classes" 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"> <a href="Bio.EUtils.DBIdsClient.DBIdsLookup-class.html" class="summary-name">DBIdsLookup</a><br /> Look up information about a DBIds </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.DBIdsRecord-class.html" class="summary-name">DBIdsRecord</a><br /> A single record on the server </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.SequenceDBIdsFetchMixin-class.html" class="summary-name">SequenceDBIdsFetchMixin</a><br /> Support 'efetch' for sequence records </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.SequenceDBIdsRecord-class.html" class="summary-name">SequenceDBIdsRecord</a><br /> a single sequence record, referenced by database identifier </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.PublicationDBIdsFetchMixin-class.html" class="summary-name">PublicationDBIdsFetchMixin</a><br /> Support 'efetch' for publication records </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.PublicationDBIdsRecord-class.html" class="summary-name">PublicationDBIdsRecord</a><br /> a single publication record, referenced by database identifier </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.BaseDBIdsRecordSet-class.html" class="summary-name">BaseDBIdsRecordSet</a><br /> Base class for dealing with a set of records, reference by identifier </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.SequenceDBIdsRecordSet-class.html" class="summary-name">SequenceDBIdsRecordSet</a><br /> a set of sequence records, referenced by database identifier </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.PublicationDBIdsRecordSet-class.html" class="summary-name">PublicationDBIdsRecordSet</a><br /> a set of publication records, referenced by database identifier </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.EUtils.DBIdsClient.DBIdsClient-class.html" class="summary-name">DBIdsClient</a><br /> Create a RecordSet either from a search or a set of dbids </td> </tr> </table> <!-- ==================== FUNCTIONS ==================== --> <a name="section-Functions"></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">Functions</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Functions" class="privatelink" onclick="toggle_private();" >hide private</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_recordset_constructor"></a><span class="summary-sig-name">_get_recordset_constructor</span>(<span class="summary-sig-arg">db</span>, <span class="summary-sig-arg">dbtype</span>)</span><br /> get the right DataSet constructor for a database</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.DBIdsClient-pysrc.html#_get_recordset_constructor">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.DBIdsClient-module.html#from_dbids" class="summary-sig-name">from_dbids</a>(<span class="summary-sig-arg">dbids</span>, <span class="summary-sig-arg">dbtype</span>=<span class="summary-sig-default">None</span>, <span class="summary-sig-arg">eutils</span>=<span class="summary-sig-default">None</span>)</span><br /> create a RecordSet interface for the set of database identifiers</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.EUtils.DBIdsClient-pysrc.html#from_dbids">source code</a></span> </td> </tr> </table> </td> </tr> </table> <!-- ==================== FUNCTION DETAILS ==================== --> <a name="section-FunctionDetails"></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">Function Details</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-FunctionDetails" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> </table> <a name="from_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">from_dbids</span>(<span class="sig-arg">dbids</span>, <span class="sig-arg">dbtype</span>=<span class="sig-default">None</span>, <span class="sig-arg">eutils</span>=<span class="sig-default">None</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.EUtils.DBIdsClient-pysrc.html#from_dbids">source code</a></span> </td> </tr></table> <pre class="literalblock"> create a RecordSet interface for the set of database identifiers Parameters are: dbids -- a DBIds dbtype -- the dbtype to use (EUtils.Config.{SEQUENCE,PUBLIATION}_TYPE) in case dbids.db isn't in the list of know NCBI databases. Defaults to None. eutils -- the ThinClient to use, defaults to creating a new ThinClient.ThinClient() </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:23 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>