<?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> <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.GFF-module.html">Package GFF</a> :: Class 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 private</a>]</span></td></tr> <tr><td align="right"><span class="options" >[<a href="frames.html" target="_top">frames</a >] | <a href="Bio.GFF.Feature-class.html" target="_top">no 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 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">>>> </span>RetrieveSeqname._dir = <span class="py-string">'GFF'</span> <span class="py-prompt">>>> </span>feature = Feature(<span class="py-string">"NC_001802x.fna"</span>, 73, 78) <span class="py-comment"># not having the x will interfere with the RetrieveSequence test</span> <span class="py-prompt">>>> </span>feature.seq() <span class="py-output">Seq('AATAAA', Alphabet())</span> <span class="py-output"></span><span class="py-prompt">>>> </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">>>> </span><span class="py-keyword">from</span> Bio <span class="py-keyword">import</span> SeqIO <span class="py-prompt">>>> </span>record = feature.record() <span class="py-prompt">>>> </span>records = [record] <span class="py-prompt">>>> </span>SeqIO.write(records, sys.stdout, <span class="py-string">'fasta'</span>) <span class="py-output">> NC_001802x.fna:73..78</span> <span class="py-output">AATAAA</span> <span class="py-output"></span><span class="py-prompt">>>> </span>feature2 = Feature(location=easy.LocationFromString(<span class="py-string">"NC_001802x.fna:73..78"</span>)) <span class="py-prompt">>>> </span>writer.write(feature2.record()) <span class="py-output">> NC_001802x.fna:73..78</span> <span class="py-output">AATAAA</span> <span class="py-output"></span><span class="py-prompt">>>> </span>location3 = easy.LocationFromString(<span class="py-string">"NC_001802x.fna:complement(73..78)"</span>) <span class="py-prompt">>>> </span>feature3 = Feature(location=location3) <span class="py-prompt">>>> </span>writer.write(feature3.record()) <span class="py-output">> NC_001802x.fna:complement(73..78)</span> <span class="py-output">TTTATT</span> <span class="py-output"></span><span class="py-prompt">>>> </span>location4 = easy.LocationFromString(<span class="py-string">"NC_001802x.fna:336..1631"</span>) <span class="py-prompt">>>> </span>feature4 = Feature(location=location4, frame=0) <span class="py-prompt">>>> </span>feature4.frame <span class="py-output">0</span> <span class="py-output"></span><span class="py-prompt">>>> </span>feature4.translate()[:7] <span class="py-output">Seq('MGARASV', HasStopCodon(IUPACProtein(), '*'))</span> <span class="py-output"></span><span class="py-prompt">>>> </span>feature4.frame = 6 <span class="py-comment"># can't happen, but a useful demonstration</span> <span class="py-prompt">>>> </span>feature4.translate()[:5] <span class="py-output">Seq('ARASV', HasStopCodon(IUPACProtein(), '*'))</span> <span class="py-output"></span><span class="py-prompt">>>> </span>feature4.frame = 1 <span class="py-prompt">>>> </span>feature4.translate()[:5] <span class="py-output">Seq('WVRER', HasStopCodon(IUPACProtein(), '*'))</span> <span class="py-output"></span><span class="py-prompt">>>> </span>location5 = easy.LocationFromString(<span class="py-string">"NC_001802lc.fna:336..1631"</span>) <span class="py-comment"># lowercase data</span> <span class="py-prompt">>>> </span>feature5 = Feature(location=location5, frame=0) <span class="py-prompt">>>> </span>feature5.translate()[:7] <span class="py-output">Seq('MGARASV', HasStopCodon(IUPACProtein(), '*'))</span> <span class="py-output"></span><span class="py-prompt">>>> </span>location6 = easy.LocationFromString(<span class="py-string">"NC_001802lc.fna:335..351"</span>) <span class="py-prompt">>>> </span>feature6 = Feature(location=location6, frame=1) <span class="py-prompt">>>> </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"> </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">"+"</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 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.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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.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 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">"+"</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 code</a></span> </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 code</a></span> </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 code</a></span> </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> <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: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>