<?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.GenBank._BaseGenBankConsumer</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"> Bio :: GenBank :: _BaseGenBankConsumer :: Class _BaseGenBankConsumer </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.GenBank._BaseGenBankConsumer-class.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class _BaseGenBankConsumer</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer">source code</a></span></p> <pre class="base-tree"> <a href="Bio.ParserSupport.AbstractConsumer-class.html">ParserSupport.AbstractConsumer</a> --+ | <strong class="uidshort">_BaseGenBankConsumer</strong> </pre> <dl><dt>Known Subclasses:</dt> <dd> <ul class="subclass-list"> <li><a href="Bio.GenBank._FeatureConsumer-class.html">_FeatureConsumer</a></li><li>, <a href="Bio.GenBank._RecordConsumer-class.html">_RecordConsumer</a></li> </ul> </dd></dl> <hr /> <p>Abstract GenBank consumer providing useful general functions.</p> <p>This just helps to eliminate some duplication in things that most GenBank consumers want to do.</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 name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>)</span></td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer.__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="_split_keywords"></a><span class="summary-sig-name">_split_keywords</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">keyword_string</span>)</span><br /> Split a string of keywords into a nice clean list.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._split_keywords">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="_split_accessions"></a><span class="summary-sig-name">_split_accessions</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">accession_string</span>)</span><br /> Split a string of accession numbers into a list.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._split_accessions">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="_split_taxonomy"></a><span class="summary-sig-name">_split_taxonomy</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">taxonomy_string</span>)</span><br /> Split a string with taxonomy info into a list.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._split_taxonomy">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.GenBank._BaseGenBankConsumer-class.html#_clean_location" class="summary-sig-name" onclick="show_private();">_clean_location</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">location_string</span>)</span><br /> Clean whitespace out of a location string.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._clean_location">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="_remove_newlines"></a><span class="summary-sig-name">_remove_newlines</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">text</span>)</span><br /> Remove any newlines in the passed text, returning the new string.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._remove_newlines">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="_normalize_spaces"></a><span class="summary-sig-name">_normalize_spaces</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">text</span>)</span><br /> Replace multiple spaces in the passed text with single spaces.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._normalize_spaces">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="_remove_spaces"></a><span class="summary-sig-name">_remove_spaces</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">text</span>)</span><br /> Remove all spaces from the passed text.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._remove_spaces">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.GenBank._BaseGenBankConsumer-class.html#_convert_to_python_numbers" class="summary-sig-name" onclick="show_private();">_convert_to_python_numbers</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">start</span>, <span class="summary-sig-arg">end</span>)</span><br /> Convert a start and end range to python notation.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._convert_to_python_numbers">source code</a></span> </td> </tr> </table> </td> </tr> <tr> <td colspan="2" class="summary"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="Bio.ParserSupport.AbstractConsumer-class.html">ParserSupport.AbstractConsumer</a></code></b>: <code><a href="Bio.ParserSupport.AbstractConsumer-class.html#__getattr__">__getattr__</a></code> </p> <div class="private"> <p class="indent-wrapped-lines"><b>Inherited from <code><a href="Bio.ParserSupport.AbstractConsumer-class.html">ParserSupport.AbstractConsumer</a></code></b> (private): <code><a href="Bio.ParserSupport.AbstractConsumer-class.html#_unhandled" onclick="show_private();">_unhandled</a></code>, <code><a href="Bio.ParserSupport.AbstractConsumer-class.html#_unhandled_section" onclick="show_private();">_unhandled_section</a></code> </p></div> </td> </tr> </table> <!-- ==================== CLASS VARIABLES ==================== --> <a name="section-ClassVariables"></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">Class Variables</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-ClassVariables" 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 name="remove_space_keys"></a><span class="summary-name">remove_space_keys</span> = <code title="['translation']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">translation</code><code class="variable-quote">'</code><code class="variable-group">]</code></code> </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="_clean_location"></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">_clean_location</span>(<span class="sig-arg">self</span>, <span class="sig-arg">location_string</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._clean_location">source code</a></span> </td> </tr></table> <p>Clean whitespace out of a location string.</p> <p>The location parser isn't a fan of whitespace, so we clean it out before feeding it into the parser.</p> <dl class="fields"> </dl> </td></tr></table> </div> <a name="_convert_to_python_numbers"></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">_convert_to_python_numbers</span>(<span class="sig-arg">self</span>, <span class="sig-arg">start</span>, <span class="sig-arg">end</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.GenBank-pysrc.html#_BaseGenBankConsumer._convert_to_python_numbers">source code</a></span> </td> </tr></table> <p>Convert a start and end range to python notation.</p> <p>In GenBank, starts and ends are defined in "biological" coordinates, where 1 is the first base and [i, j] means to include both i and j.</p> <p>In python, 0 is the first base and [i, j] means to include i, but not j.</p> <p>So, to convert "biological" to python coordinates, we need to subtract 1 from the start, and leave the end and things should be converted happily.</p> <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:35 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>