Sophie

Sophie

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

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.GFF.Feature</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.GFF-module.html">Package&nbsp;GFF</a> ::
        Class&nbsp;Feature
      </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.GFF.Feature-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Feature</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.GFF-pysrc.html#Feature">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">Feature</strong>
</pre>

<hr />
<p>strand may be: +/0 = Watson -/1 = Crick</p>
  <p>I propose that we start calling these the Rosalind and Franklin 
  strands</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>RetrieveSeqname._dir = <span class="py-string">'GFF'</span>
<span class="py-prompt">&gt;&gt;&gt; </span>feature = Feature(<span class="py-string">&quot;NC_001802x.fna&quot;</span>, 73, 78) <span class="py-comment"># not having the x will interfere with the RetrieveSequence test</span>
<span class="py-prompt">&gt;&gt;&gt; </span>feature.seq()
<span class="py-output">Seq('AATAAA', Alphabet())</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> feature.location()
<span class="py-output">NC_001802x.fna:73..78</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">from</span> Bio <span class="py-keyword">import</span> SeqIO
<span class="py-prompt">&gt;&gt;&gt; </span>record = feature.record()
<span class="py-prompt">&gt;&gt;&gt; </span>records = [record]
<span class="py-prompt">&gt;&gt;&gt; </span>SeqIO.write(records, sys.stdout, <span class="py-string">'fasta'</span>)
<span class="py-output">&gt; NC_001802x.fna:73..78</span>
<span class="py-output">AATAAA</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>feature2 = Feature(location=easy.LocationFromString(<span class="py-string">&quot;NC_001802x.fna:73..78&quot;</span>))
<span class="py-prompt">&gt;&gt;&gt; </span>writer.write(feature2.record())
<span class="py-output">&gt; NC_001802x.fna:73..78</span>
<span class="py-output">AATAAA</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>location3 = easy.LocationFromString(<span class="py-string">&quot;NC_001802x.fna:complement(73..78)&quot;</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>feature3 = Feature(location=location3)
<span class="py-prompt">&gt;&gt;&gt; </span>writer.write(feature3.record())
<span class="py-output">&gt; NC_001802x.fna:complement(73..78)</span>
<span class="py-output">TTTATT</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>location4 = easy.LocationFromString(<span class="py-string">&quot;NC_001802x.fna:336..1631&quot;</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>feature4 = Feature(location=location4, frame=0)
<span class="py-prompt">&gt;&gt;&gt; </span>feature4.frame
<span class="py-output">0</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>feature4.translate()[:7]
<span class="py-output">Seq('MGARASV', HasStopCodon(IUPACProtein(), '*'))</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>feature4.frame = 6 <span class="py-comment"># can't happen, but a useful demonstration</span>
<span class="py-prompt">&gt;&gt;&gt; </span>feature4.translate()[:5]
<span class="py-output">Seq('ARASV', HasStopCodon(IUPACProtein(), '*'))</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>feature4.frame = 1
<span class="py-prompt">&gt;&gt;&gt; </span>feature4.translate()[:5]
<span class="py-output">Seq('WVRER', HasStopCodon(IUPACProtein(), '*'))</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>location5 = easy.LocationFromString(<span class="py-string">&quot;NC_001802lc.fna:336..1631&quot;</span>) <span class="py-comment"># lowercase data</span>
<span class="py-prompt">&gt;&gt;&gt; </span>feature5 = Feature(location=location5, frame=0)
<span class="py-prompt">&gt;&gt;&gt; </span>feature5.translate()[:7]
<span class="py-output">Seq('MGARASV', HasStopCodon(IUPACProtein(), '*'))</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>location6 = easy.LocationFromString(<span class="py-string">&quot;NC_001802lc.fna:335..351&quot;</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>feature6 = Feature(location=location6, frame=1)
<span class="py-prompt">&gt;&gt;&gt; </span>feature6.translate()
<span class="py-output">Seq('MGARA', HasStopCodon(IUPACProtein(), '*'))</span></pre>

<!-- ==================== 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 href="Bio.GFF.Feature-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">seqname</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">start</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">end</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">strand</span>=<span class="summary-sig-default">&quot;+&quot;</span>,
        <span class="summary-sig-arg">frame</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">location</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">alphabet</span>=<span class="summary-sig-default">DEFAULT_ALPHABET</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.__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 href="Bio.GFF.Feature-class.html#__hash__" class="summary-sig-name">__hash__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      hash(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.__hash__">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="seq"></a><span class="summary-sig-name">seq</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.seq">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="translate"></a><span class="summary-sig-name">translate</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.translate">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="location"></a><span class="summary-sig-name">location</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.location">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="target_location"></a><span class="summary-sig-name">target_location</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.target_location">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="id"></a><span class="summary-sig-name">id</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.id">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="record"></a><span class="summary-sig-name">record</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.record">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="xrange"></a><span class="summary-sig-name">xrange</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.xrange">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.GFF.Feature-class.html#__str__" class="summary-sig-name">__str__</a>(<span class="summary-sig-arg">self</span>)</span><br />
      str(x)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.__str__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__getattribute__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></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">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </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">seqname</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">start</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">end</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">strand</span>=<span class="sig-default">&quot;+&quot;</span>,
        <span class="sig-arg">frame</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">location</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">alphabet</span>=<span class="sig-default">DEFAULT_ALPHABET</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__hash__"></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">__hash__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Hashing function)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.__hash__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>hash(x)</p>
  <dl class="fields">
    <dt>Overrides:
        object.__hash__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="__str__"></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">__str__</span>(<span class="sig-arg">self</span>)</span>
    <br /><em class="fname">(Informal representation operator)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.GFF-pysrc.html#Feature.__str__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>str(x)</p>
  <dl class="fields">
    <dt>Overrides:
        object.__str__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </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>