<?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.PDB.FragmentMapper'</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.PDB-module.html">Package PDB</a> :: Module FragmentMapper' </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.PDB.FragmentMapper%27-module.html" target="_top">no frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== MODULE DESCRIPTION ==================== --> <h1 class="epydoc">Module FragmentMapper'</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.PDB.FragmentMapper%27-pysrc.html">source code</a></span></p> <p>Classify protein backbone structure according to Kolodny et al's fragment libraries. It can be regarded as a form of objective secondary structure classification. Only fragments of length 5 or 7 are supported (ie. there is a 'central' residue).</p> <p>Full reference:</p> <p>Kolodny R, Koehl P, Guibas L, Levitt M. Small libraries of protein fragments model native protein structures accurately. J Mol Biol. 2002 323(2):297-307.</p> <p>The definition files of the fragments can be obtained from:</p> <p><a href="http://csb.stanford.edu/~rachel/fragments/" target="_top">http://csb.stanford.edu/~rachel/fragments/</a></p> <p>You need these files to use this module.</p> <p>The following example uses the library with 10 fragments of length 5. The library files can be found in directory 'fragment_data'.</p> <pre class="py-doctest"> <span class="py-prompt">>>> </span>model=structure[0] <span class="py-prompt">>>> </span>fm=FragmentMapper(lsize=10, flength=5, dir=<span class="py-string">"fragment_data"</span>) <span class="py-prompt">>>> </span>fm.map(model) <span class="py-prompt">>>> </span>fragment=fm[residue]</pre> <!-- ==================== CLASSES ==================== --> <a name="section-Classes"></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">Classes</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Classes" 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 href="Bio.PDB.FragmentMapper%27.Fragment-class.html" class="summary-name">Fragment</a><br /> Represent a polypeptide C-alpha fragment. </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.PDB.FragmentMapper%27.FragmentMapper-class.html" class="summary-name">FragmentMapper</a><br /> Map polypeptides in a model to lists of representative fragments. </td> </tr> </table> <!-- ==================== FUNCTIONS ==================== --> <a name="section-Functions"></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">Functions</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Functions" class="privatelink" onclick="toggle_private();" >hide private</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.PDB.FragmentMapper%27-module.html#_make_fragment_list" class="summary-sig-name" onclick="show_private();">_make_fragment_list</a>(<span class="summary-sig-arg">pp</span>, <span class="summary-sig-arg">length</span>)</span><br /> Dice up a peptide in fragments of length "length".</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.PDB.FragmentMapper%27-pysrc.html#_make_fragment_list">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.PDB.FragmentMapper%27-module.html#_map_fragment_list" class="summary-sig-name" onclick="show_private();">_map_fragment_list</a>(<span class="summary-sig-arg">flist</span>, <span class="summary-sig-arg">reflist</span>)</span><br /> Map all frgaments in flist to the closest (in RMSD) fragment in reflist.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.PDB.FragmentMapper%27-pysrc.html#_map_fragment_list">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.PDB.FragmentMapper%27-module.html#_read_fragments" class="summary-sig-name" onclick="show_private();">_read_fragments</a>(<span class="summary-sig-arg">size</span>, <span class="summary-sig-arg">length</span>, <span class="summary-sig-arg">dir</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">.</code><code class="variable-quote">'</code></span>)</span><br /> Read a fragment spec file (available from <a href="http://csb.stanford.edu/rachel/fragments/" target="_top">http://csb.stanford.edu/rachel/fragments/</a> and return a list of Fragment objects.</td> <td align="right" valign="top"> <span class="codelink"><a href="Bio.PDB.FragmentMapper%27-pysrc.html#_read_fragments">source code</a></span> </td> </tr> </table> </td> </tr> </table> <!-- ==================== VARIABLES ==================== --> <a name="section-Variables"></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">Variables</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Variables" 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="Float0"></a><span class="summary-name">Float0</span> = <code title="'f'"><code class="variable-quote">'</code><code class="variable-string">f</code><code class="variable-quote">'</code></code> </td> </tr> <tr class="private"> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a name="_FRAGMENT_FILE"></a><span class="summary-name">_FRAGMENT_FILE</span> = <code title="'lib_%s_z_%s.txt'"><code class="variable-quote">'</code><code class="variable-string">lib_%s_z_%s.txt</code><code class="variable-quote">'</code></code> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.PDB.FragmentMapper%27-module.html#standard_aa_names" class="summary-name">standard_aa_names</a> = <code title="['ALA', 'CYS', 'ASP', 'GLU', 'PHE', 'GLY', 'HIS', 'ILE', ..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">ALA</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">CYS</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ASP</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">GLU</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">PHE</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">GLY</code><code class="variable-quote">'</code><code class="variable-op">,</code><code class="variable-ellipsis">...</code></code> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type"> </span> </td><td class="summary"> <a href="Bio.PDB.FragmentMapper%27-module.html#to_one_letter_code" class="summary-name">to_one_letter_code</a> = <code title="{'2AS': 'D', '3AH': 'H', '5HP': 'E', 'ACL': 'R', 'AGM': 'R', 'AIB': 'A', 'ALA': 'A', 'ALM': 'A', ..."><code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">2AS</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">D</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3AH</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">H</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">5HP</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">E</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">ACL</code><code class="variable-ellipsis">...</code></code> </td> </tr> </table> <!-- ==================== FUNCTION DETAILS ==================== --> <a name="section-FunctionDetails"></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">Function Details</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-FunctionDetails" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> </table> <a name="_make_fragment_list"></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">_make_fragment_list</span>(<span class="sig-arg">pp</span>, <span class="sig-arg">length</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.PDB.FragmentMapper%27-pysrc.html#_make_fragment_list">source code</a></span> </td> </tr></table> <p>Dice up a peptide in fragments of length "length".</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>pp</code></strong> ([<a href="Bio.PDB.Residue-module.html" class="link">Residue</a>, <a href="Bio.PDB.Residue-module.html" class="link">Residue</a>, ...]) - a list of residues (part of one peptide)</li> <li><strong class="pname"><code>length</code></strong> (int) - fragment length</li> </ul></dd> </dl> </td></tr></table> </div> <a name="_map_fragment_list"></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">_map_fragment_list</span>(<span class="sig-arg">flist</span>, <span class="sig-arg">reflist</span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.PDB.FragmentMapper%27-pysrc.html#_map_fragment_list">source code</a></span> </td> </tr></table> <p>Map all frgaments in flist to the closest (in RMSD) fragment in reflist.</p> <p>Returns a list of reflist indices.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>flist</code></strong> ([<a href="Bio.PDB.FragmentMapper%27.Fragment-class.html" class="link">Fragment</a>, <a href="Bio.PDB.FragmentMapper%27.Fragment-class.html" class="link">Fragment</a>, ...]) - list of protein fragments</li> <li><strong class="pname"><code>reflist</code></strong> ([<a href="Bio.PDB.FragmentMapper%27.Fragment-class.html" class="link">Fragment</a>, <a href="Bio.PDB.FragmentMapper%27.Fragment-class.html" class="link">Fragment</a>, ...]) - list of reference (ie. library) fragments</li> </ul></dd> </dl> </td></tr></table> </div> <a name="_read_fragments"></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">_read_fragments</span>(<span class="sig-arg">size</span>, <span class="sig-arg">length</span>, <span class="sig-arg">dir</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">.</code><code class="variable-quote">'</code></span>)</span> </h3> </td><td align="right" valign="top" ><span class="codelink"><a href="Bio.PDB.FragmentMapper%27-pysrc.html#_read_fragments">source code</a></span> </td> </tr></table> <p>Read a fragment spec file (available from <a href="http://csb.stanford.edu/rachel/fragments/" target="_top">http://csb.stanford.edu/rachel/fragments/</a> and return a list of Fragment objects.</p> <dl class="fields"> <dt>Parameters:</dt> <dd><ul class="nomargin-top"> <li><strong class="pname"><code>size</code></strong> (int) - number of fragments in the library</li> <li><strong class="pname"><code>length</code></strong> (int) - length of the fragments</li> <li><strong class="pname"><code>dir</code></strong> (string) - directory where the fragment spec files can be found</li> </ul></dd> </dl> </td></tr></table> </div> <br /> <!-- ==================== VARIABLES DETAILS ==================== --> <a name="section-VariablesDetails"></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">Variables Details</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-VariablesDetails" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> </table> <a name="standard_aa_names"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">standard_aa_names</h3> <dl class="fields"> </dl> <dl class="fields"> <dt>Value:</dt> <dd><table><tr><td><pre class="variable"> <code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">ALA</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">CYS</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">ASP</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">GLU</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">PHE</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">GLY</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">HIS</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">ILE</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-ellipsis">...</code> </pre></td></tr></table> </dd> </dl> </td></tr></table> </div> <a name="to_one_letter_code"></a> <div> <table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr><td> <h3 class="epydoc">to_one_letter_code</h3> <dl class="fields"> </dl> <dl class="fields"> <dt>Value:</dt> <dd><table><tr><td><pre class="variable"> <code class="variable-group">{</code><code class="variable-quote">'</code><code class="variable-string">2AS</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">D</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">3AH</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">H</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">5HP</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">E</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">ACL</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">R</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">AGM</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">R</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">AIB</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">ALA</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-quote">'</code><code class="variable-string">ALM</code><code class="variable-quote">'</code><code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">A</code><code class="variable-quote">'</code><code class="variable-op">,</code> <code class="variable-ellipsis">...</code> </pre></td></tr></table> </dd> </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:24 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>