Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 763d6289e1351f2d34257ce697a3ccb7 > files > 732

biopython-doc-1.47-2mdv2008.1.x86_64.rpm

<?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.Scanner.InsdcScanner</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>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</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&nbsp;Bio</a> ::
        <a href="Bio.GenBank-module.html">Package&nbsp;GenBank</a> ::
        <a href="Bio.GenBank.Scanner-module.html">Module&nbsp;Scanner</a> ::
        Class&nbsp;InsdcScanner
      </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&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="Bio.GenBank.Scanner.InsdcScanner-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class InsdcScanner</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner">source&nbsp;code</a></span></p>
<dl><dt>Known Subclasses:</dt>
<dd>
      <ul class="subclass-list">
<li><a href="Bio.GenBank.Scanner.EmblScanner-class.html">EmblScanner</a></li><li>, <a href="Bio.GenBank.Scanner.GenBankScanner-class.html">GenBankScanner</a></li>  </ul>
</dd></dl>

<hr />
<p>Basic functions for breaking up a GenBank/EMBL file into sub 
  sections.</p>
  <p>The International Nucleotide Sequence Database Collaboration (INSDC) 
  between the DDBJ, EMBL, and GenBank.  These organisations all use the 
  same &quot;Feature Table&quot; layout in their plain text flat file 
  formats.</p>
  <p>However, the header and sequence sections of an EMBL file are very 
  different in layout to those produced by GenBank/DDBJ.</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">&nbsp;</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 class="summary-sig-arg">debug</span>=<span class="summary-sig-default">0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="set_handle"></a><span class="summary-sig-name">set_handle</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">handle</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.set_handle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#find_start" class="summary-sig-name">find_start</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Read in lines until find the ID/LOCUS line, which is returned.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.find_start">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#parse_header" class="summary-sig-name">parse_header</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Return list of strings making up the header</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_header">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#parse_features" class="summary-sig-name">parse_features</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">skip</span>=<span class="summary-sig-default">False</span>)</span><br />
      Return list of tuples for the features (if present)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_features">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#parse_feature" class="summary-sig-name">parse_feature</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">feature_key</span>,
        <span class="summary-sig-arg">lines</span>)</span><br />
      Expects a feature as a list of strings, returns a tuple (key, location, qualifiers)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_feature">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="parse_footer"></a><span class="summary-sig-name">parse_footer</span>(<span class="summary-sig-arg">self</span>)</span><br />
      returns a tuple containing a list of any misc strings, and the 
      sequence</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_footer">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#_feed_first_line" class="summary-sig-name" onclick="show_private();">_feed_first_line</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">consumer</span>,
        <span class="summary-sig-arg">line</span>)</span><br />
      Handle the LOCUS/ID line, passing data to the comsumer</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_first_line">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#_feed_header_lines" class="summary-sig-name" onclick="show_private();">_feed_header_lines</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">consumer</span>,
        <span class="summary-sig-arg">lines</span>)</span><br />
      Handle the header lines (list of strings), passing data to the 
      comsumer</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_header_lines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#_feed_feature_table" class="summary-sig-name" onclick="show_private();">_feed_feature_table</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">consumer</span>,
        <span class="summary-sig-arg">feature_tuples</span>)</span><br />
      Handle the feature table (list of tuples), passing data to the 
      comsumer</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_feature_table">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#_feed_misc_lines" class="summary-sig-name" onclick="show_private();">_feed_misc_lines</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">consumer</span>,
        <span class="summary-sig-arg">lines</span>)</span><br />
      Handle any lines between features and sequence (list of strings), 
      passing data to the consumer</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_misc_lines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#feed" class="summary-sig-name">feed</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">consumer</span>,
        <span class="summary-sig-arg">do_features</span>=<span class="summary-sig-default">True</span>)</span><br />
      Feed a set of data into the consumer.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.feed">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#parse" class="summary-sig-name">parse</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">do_features</span>=<span class="summary-sig-default">True</span>)</span><br />
      Returns a SeqRecord (with SeqFeatures if do_features=True)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#parse_records" class="summary-sig-name">parse_records</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">do_features</span>=<span class="summary-sig-default">True</span>)</span><br />
      Returns a SeqRecord object iterator</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_records">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Bio.GenBank.Scanner.InsdcScanner-class.html#parse_cds_features" class="summary-sig-name">parse_cds_features</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">alphabet</span>=<span class="summary-sig-default">ProteinAlphabet()</span>,
        <span class="summary-sig-arg">tags2id</span>=<span class="summary-sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">protein_id</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">locus_tag</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">product</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span><br />
      Returns SeqRecord object iterator</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_cds_features">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </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">&nbsp;</span>
    </td><td class="summary">
        <a name="RECORD_START"></a><span class="summary-name">RECORD_START</span> = <code title="'XXX'"><code class="variable-quote">'</code><code class="variable-string">XXX</code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HEADER_WIDTH"></a><span class="summary-name">HEADER_WIDTH</span> = <code title="3">3</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="FEATURE_START_MARKERS"></a><span class="summary-name">FEATURE_START_MARKERS</span> = <code title="['XXX***FEATURES***XXX']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">XXX***FEATURES***XXX</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="FEATURE_END_MARKERS"></a><span class="summary-name">FEATURE_END_MARKERS</span> = <code title="['XXX***END FEATURES***XXX']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">XXX***END FEATURES***XXX</code><code class="variable-quote">'</code><code class="variable-group">]</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="FEATURE_QUALIFIER_INDENT"></a><span class="summary-name">FEATURE_QUALIFIER_INDENT</span> = <code title="0">0</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="FEATURE_QUALIFIER_SPACER"></a><span class="summary-name">FEATURE_QUALIFIER_SPACER</span> = <code title="''"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SEQUENCE_HEADERS"></a><span class="summary-name">SEQUENCE_HEADERS</span> = <code title="['XXX']"><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">XXX</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="find_start"></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">find_start</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.find_start">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Read in lines until find the ID/LOCUS line, which is returned.</p>
  <p>Any preamble (such as the header used by the NCBI on *.seq.gz 
  archives) will we ignored.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse_header"></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">parse_header</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_header">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return list of strings making up the header</p>
  <p>New line characters are removed.</p>
  <p>Assumes you have just read in the ID/LOCUS line.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse_features"></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">parse_features</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">skip</span>=<span class="sig-default">False</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_features">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return list of tuples for the features (if present)</p>
  <p>Each feature is returned as a tuple (key, location, qualifiers) where 
  key and location are strings (e.g. &quot;CDS&quot; and 
  &quot;complement(join(490883..490885,1..879))&quot;) while qualifiers is 
  a list of two string tuples (feature qualifier keys and values).</p>
  <p>Assumes you have already read to the start of the features table.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse_feature"></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">parse_feature</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">feature_key</span>,
        <span class="sig-arg">lines</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_feature">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Expects a feature as a list of strings, returns a tuple (key, location, qualifiers)

        For example given this GenBank feature:

             CDS             complement(join(490883..490885,1..879))
                             /locus_tag=&quot;NEQ001&quot;
                             /note=&quot;conserved hypothetical [Methanococcus jannaschii];
                             COG1583:Uncharacterized ACR; IPR001472:Bipartite nuclear
                             localization signal; IPR002743: Protein of unknown
                             function DUF57&quot;
                             /codon_start=1
                             /transl_table=11
                             /product=&quot;hypothetical protein&quot;
                             /protein_id=&quot;NP_963295.1&quot;
                             /db_xref=&quot;GI:41614797&quot;
                             /db_xref=&quot;GeneID:2732620&quot;
                             /translation=&quot;MRLLLELKALNSIDKKQLSNYLIQGFIYNILKNTEYSWLHNWKK
                             EKYFNFTLIPKKDIIENKRYYLIISSPDKRFIEVLHNKIKDLDIITIGLAQFQLRKTK
                             KFDPKLRFPWVTITPIVLREGKIVILKGDKYYKVFVKRLEELKKYNLIKKKEPILEEP
                             IEISLNQIKDGWKIIDVKDRYYDFRNKSFSAFSNWLRDLKEQSLRKYNNFCGKNFYFE
                             EAIFEGFTFYKTVSIRIRINRGEAVYIGTLWKELNVYRKLDKEEREFYKFLYDCGLGS
                             LNSMGFGFVNTKKNSAR&quot;

        Then should give input key=&quot;CDS&quot; and the rest of the data as a list of strings
        lines=[&quot;complement(join(490883..490885,1..879))&quot;, ..., &quot;LNSMGFGFVNTKKNSAR&quot;]
        where the leading spaces and trailing newlines have been removed.

        Returns tuple containing: (key as string, location string, qualifiers as list)
        as follows for this example:

        key = &quot;CDS&quot;, string
        location = &quot;complement(join(490883..490885,1..879))&quot;, string
        qualifiers = list of string tuples:

        [('locus_tag', '&quot;NEQ001&quot;'),
         ('note', '&quot;conserved hypothetical [Methanococcus jannaschii];
COG1583:...&quot;'),
         ('codon_start', '1'),
         ('transl_table', '11'),
         ('product', '&quot;hypothetical protein&quot;'),
         ('protein_id', '&quot;NP_963295.1&quot;'),
         ('db_xref', '&quot;GI:41614797&quot;'),
         ('db_xref', '&quot;GeneID:2732620&quot;'),
         ('translation', '&quot;MRLLLELKALNSIDKKQLSNYLIQGFIYNILKNTEYSWLHNWKK
EKYFNFT...&quot;')]

        In the above example, the &quot;note&quot; and &quot;translation&quot; were edited for compactness,
        and they would contain multiple new line characters (displayed above as 
)

        If a qualifier is quoted (in this case, everything except codon_start and
        transl_table) then the quotes are NOT removed.

        Note that no whitespace is removed.
        

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_feed_first_line"></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">_feed_first_line</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">consumer</span>,
        <span class="sig-arg">line</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_first_line">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Handle the LOCUS/ID line, passing data to the comsumer</p>
  <p>This should be implemented by the EMBL / GenBank specific subclass</p>
  <p>Used by the parse_records() and parse() methods.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_feed_header_lines"></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">_feed_header_lines</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">consumer</span>,
        <span class="sig-arg">lines</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_header_lines">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Handle the header lines (list of strings), passing data to the 
  comsumer</p>
  <p>This should be implemented by the EMBL / GenBank specific subclass</p>
  <p>Used by the parse_records() and parse() methods.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_feed_feature_table"></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">_feed_feature_table</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">consumer</span>,
        <span class="sig-arg">feature_tuples</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_feature_table">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Handle the feature table (list of tuples), passing data to the 
  comsumer</p>
  <p>Used by the parse_records() and parse() methods.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_feed_misc_lines"></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">_feed_misc_lines</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">consumer</span>,
        <span class="sig-arg">lines</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner._feed_misc_lines">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Handle any lines between features and sequence (list of strings), 
  passing data to the consumer</p>
  <p>This should be implemented by the EMBL / GenBank specific subclass</p>
  <p>Used by the parse_records() and parse() methods.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="feed"></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">feed</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">handle</span>,
        <span class="sig-arg">consumer</span>,
        <span class="sig-arg">do_features</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.feed">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Feed a set of data into the consumer.

This method is intended for use with the &quot;old&quot; code in Bio.GenBank

Arguments:
handle - A handle with the information to parse.
consumer - The consumer that should be informed of events.
do_features - Boolean, should the features be parsed?
              Skipping the features can be much faster.

Return values:
true  - Passed a record
false - Did not find a record

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse"></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">parse</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">handle</span>,
        <span class="sig-arg">do_features</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns a SeqRecord (with SeqFeatures if do_features=True)</p>
  <p>See also the method parse_records() for use on multi-record files.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse_records"></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">parse_records</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">handle</span>,
        <span class="sig-arg">do_features</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_records">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Returns a SeqRecord object iterator</p>
  <p>Each record (from the ID/LOCUS line to the // line) becomes a 
  SeqRecord</p>
  <p>The SeqRecord objects include SeqFeatures if do_features=True</p>
  <p>This method is intended for use in Bio.SeqIO</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse_cds_features"></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">parse_cds_features</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">handle</span>,
        <span class="sig-arg">alphabet</span>=<span class="sig-default">ProteinAlphabet()</span>,
        <span class="sig-arg">tags2id</span>=<span class="sig-default"><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">protein_id</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">locus_tag</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">product</code><code class="variable-quote">'</code><code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GenBank.Scanner-pysrc.html#InsdcScanner.parse_cds_features">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Returns SeqRecord object iterator

Each CDS feature becomes a SeqRecord.

alphabet - Used for any sequence found in a translation field.
tags2id  - Tupple of three strings, the feature keys to use
           for the record id, name and description,

This method is intended for use in Bio.SeqIO

</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>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</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:34 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>