<?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.NeuralNetwork.Gene.Schema.SchemaFactory</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.NeuralNetwork-module.html">Package NeuralNetwork</a> :: <a href="Bio.NeuralNetwork.Gene-module.html">Package Gene</a> :: <a href="Bio.NeuralNetwork.Gene.Schema-module.html">Module Schema</a> :: Class SchemaFactory </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.NeuralNetwork.Gene.Schema.SchemaFactory-class.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== CLASS DESCRIPTION ==================== --> <h1 class="epydoc">Class SchemaFactory</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory">source code</a></span></p> <p>Generate Schema from inputs of Motifs or Signatures.</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 href="Bio.NeuralNetwork.Gene.Schema.SchemaFactory-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">ambiguity_symbol</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">*</code><code class="variable-quote">'</code></span>)</span><br /> Initialize the SchemaFactory</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory.__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.NeuralNetwork.Gene.Schema.SchemaFactory-class.html#from_motifs" class="summary-sig-name">from_motifs</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">motif_repository</span>, <span class="summary-sig-arg">motif_percent</span>, <span class="summary-sig-arg">num_ambiguous</span>)</span><br /> Generate schema from a list of motifs.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory.from_motifs">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="_get_num_motifs"></a><span class="summary-sig-name">_get_num_motifs</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">repository</span>, <span class="summary-sig-arg">motif_list</span>)</span><br /> Return the number of motif counts for the list of motifs.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory._get_num_motifs">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.NeuralNetwork.Gene.Schema.SchemaFactory-class.html#_get_unique_schema" class="summary-sig-name" onclick="show_private();">_get_unique_schema</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">cur_schemas</span>, <span class="summary-sig-arg">motif_list</span>, <span class="summary-sig-arg">num_ambiguous</span>)</span><br /> Retrieve a unique schema from a motif.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory._get_unique_schema">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.NeuralNetwork.Gene.Schema.SchemaFactory-class.html#_schema_from_motif" class="summary-sig-name" onclick="show_private();">_schema_from_motif</a>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">motif</span>, <span class="summary-sig-arg">motif_list</span>, <span class="summary-sig-arg">num_ambiguous</span>)</span><br /> Create a schema from a given starting motif.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory._schema_from_motif">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="from_signatures"></a><span class="summary-sig-name">from_signatures</span>(<span class="summary-sig-arg">self</span>, <span class="summary-sig-arg">signature_repository</span>, <span class="summary-sig-arg">num_ambiguous</span>)</span></td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory.from_signatures">source code</a></span> </td> </tr> </table> </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">ambiguity_symbol</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">*</code><code class="variable-quote">'</code></span>)</span> <br /><em class="fname">(Constructor)</em> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory.__init__">source code</a></span> </td> </tr></table> <p>Initialize the SchemaFactory</p> <p>Arguments:</p> <p>o ambiguity_symbol -- The symbol to use when specifying that a position is arbitrary.</p> <dl class="fields"> </dl> </td></tr></table> </div> <a name="from_motifs"></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_motifs</span>(<span class="sig-arg">self</span>, <span class="sig-arg">motif_repository</span>, <span class="sig-arg">motif_percent</span>, <span class="sig-arg">num_ambiguous</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory.from_motifs">source code</a></span> </td> </tr></table> <p>Generate schema from a list of motifs.</p> <p>Arguments:</p> <p>o motif_repository - A MotifRepository class that has all of the motifs we want to convert to Schema.</p> <p>o motif_percent - The percentage of motifs in the motif bank which should be matches. We'll try to create schema that match this percentage of motifs.</p> <p>o num_ambiguous - The number of ambiguous characters to include in each schema. The positions of these ambiguous characters will be randomly selected.</p> <dl class="fields"> </dl> </td></tr></table> </div> <a name="_get_unique_schema"></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">_get_unique_schema</span>(<span class="sig-arg">self</span>, <span class="sig-arg">cur_schemas</span>, <span class="sig-arg">motif_list</span>, <span class="sig-arg">num_ambiguous</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory._get_unique_schema">source code</a></span> </td> </tr></table> <p>Retrieve a unique schema from a motif.</p> <p>We don't want to end up with schema that match the same thing, since this could lead to ambiguous results, and be messy. This tries to create schema, and checks that they do not match any currently existing schema.</p> <dl class="fields"> </dl> </td></tr></table> </div> <a name="_schema_from_motif"></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">_schema_from_motif</span>(<span class="sig-arg">self</span>, <span class="sig-arg">motif</span>, <span class="sig-arg">motif_list</span>, <span class="sig-arg">num_ambiguous</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.NeuralNetwork.Gene.Schema-pysrc.html#SchemaFactory._schema_from_motif">source code</a></span> </td> </tr></table> <p>Create a schema from a given starting motif.</p> <p>Arguments:</p> <p>o motif - A motif with the pattern we will start from.</p> <p>o motif_list - The total motifs we have.to match to.</p> <p>o num_ambiguous - The number of ambiguous characters that should be present in the schema.</p> <p>Returns:</p> <p>o A string representing the newly generated schema.</p> <p>o A list of all of the motifs in motif_list that match the schema.</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:36 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>