Sophie

Sophie

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

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.Align.AlignInfo.SummaryInfo</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.Align-module.html">Package&nbsp;Align</a> ::
        <a href="Bio.Align.AlignInfo-module.html">Module&nbsp;AlignInfo</a> ::
        Class&nbsp;SummaryInfo
      </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.Align.AlignInfo.SummaryInfo-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class SummaryInfo</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo">source&nbsp;code</a></span></p>
<p>Calculate summary info about the alignment.</p>
  <p>This class should be used to caclculate information summarizing the 
  results of an alignment. This may either be straight consensus info or 
  more complicated things.</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 href="Bio.Align.AlignInfo.SummaryInfo-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">alignment</span>)</span><br />
      Initialize with the alignment to calculate information on.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.__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.Align.AlignInfo.SummaryInfo-class.html#dumb_consensus" class="summary-sig-name">dumb_consensus</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">threshold</span>=<span class="summary-sig-default">0.7</span>,
        <span class="summary-sig-arg">ambiguous</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">X</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">consensus_alpha</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">require_multiple</span>=<span class="summary-sig-default">0</span>)</span><br />
      Output a fast consensus sequence of the alignment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.dumb_consensus">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.Align.AlignInfo.SummaryInfo-class.html#gap_consensus" class="summary-sig-name">gap_consensus</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">threshold</span>=<span class="summary-sig-default">0.7</span>,
        <span class="summary-sig-arg">ambiguous</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">X</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">consensus_alpha</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">require_multiple</span>=<span class="summary-sig-default">0</span>)</span><br />
      Same as dumb_consensus(), but allows gap on the output.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.gap_consensus">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.Align.AlignInfo.SummaryInfo-class.html#_guess_consensus_alphabet" class="summary-sig-name" onclick="show_private();">_guess_consensus_alphabet</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ambiguous</span>)</span><br />
      Pick an (ungapped) alphabet for an alignment consesus sequence.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._guess_consensus_alphabet">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.Align.AlignInfo.SummaryInfo-class.html#replacement_dictionary" class="summary-sig-name">replacement_dictionary</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">skip_chars</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      Generate a replacement dictionary to plug into a substitution matrix</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.replacement_dictionary">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.Align.AlignInfo.SummaryInfo-class.html#_pair_replacement" class="summary-sig-name" onclick="show_private();">_pair_replacement</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">seq1</span>,
        <span class="summary-sig-arg">seq2</span>,
        <span class="summary-sig-arg">weight1</span>,
        <span class="summary-sig-arg">weight2</span>,
        <span class="summary-sig-arg">start_dict</span>,
        <span class="summary-sig-arg">ignore_chars</span>)</span><br />
      Compare two sequences and generate info on the replacements seen.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._pair_replacement">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 name="_get_all_letters"></a><span class="summary-sig-name">_get_all_letters</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns a string containing the expected letters in the alignment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_all_letters">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.Align.AlignInfo.SummaryInfo-class.html#_get_base_replacements" class="summary-sig-name" onclick="show_private();">_get_base_replacements</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">skip_items</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      Get a zeroed dictonary of all possible letter combinations.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_base_replacements">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.Align.AlignInfo.SummaryInfo-class.html#pos_specific_score_matrix" class="summary-sig-name">pos_specific_score_matrix</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">axis_seq</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">chars_to_ignore</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      Create a position specific score matrix object for the alignment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.pos_specific_score_matrix">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 name="_get_base_letters"></a><span class="summary-sig-name">_get_base_letters</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">letters</span>)</span><br />
      Create a zeroed dictionary with all of the specified letters.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_base_letters">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.Align.AlignInfo.SummaryInfo-class.html#information_content" class="summary-sig-name">information_content</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">start</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">end</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">e_freq_table</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">log_base</span>=<span class="summary-sig-default">2</span>,
        <span class="summary-sig-arg">chars_to_ignore</span>=<span class="summary-sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span><br />
      Calculate the information content for each residue along an 
      alignment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.information_content">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.Align.AlignInfo.SummaryInfo-class.html#_get_letter_freqs" class="summary-sig-name" onclick="show_private();">_get_letter_freqs</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">residue_num</span>,
        <span class="summary-sig-arg">all_records</span>,
        <span class="summary-sig-arg">letters</span>,
        <span class="summary-sig-arg">to_ignore</span>)</span><br />
      Determine the frequency of specific letters in the alignment.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_letter_freqs">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.Align.AlignInfo.SummaryInfo-class.html#_get_column_info_content" class="summary-sig-name" onclick="show_private();">_get_column_info_content</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">obs_freq</span>,
        <span class="summary-sig-arg">e_freq_table</span>,
        <span class="summary-sig-arg">log_base</span>,
        <span class="summary-sig-arg">random_expected</span>)</span><br />
      Calculate the information content for a column.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_column_info_content">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="get_column"></a><span class="summary-sig-name">get_column</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">col</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.get_column">source&nbsp;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">alignment</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Initialize with the alignment to calculate information on. ic_vector 
  attribute. A dictionary. Keys: column numbers. Values:</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="dumb_consensus"></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">dumb_consensus</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">threshold</span>=<span class="sig-default">0.7</span>,
        <span class="sig-arg">ambiguous</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">X</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">consensus_alpha</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">require_multiple</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.dumb_consensus">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Output a fast consensus sequence of the alignment.</p>
  <p>This doesn't do anything fancy at all. It will just go through the 
  sequence residue by residue and count up the number of each type of 
  residue (ie. A or G or T or C for DNA) in all sequences in the alignment.
  If the percentage of the most common residue type is greater then the 
  passed threshold, then we will add that residue type, otherwise an 
  ambiguous character will be added.</p>
  <p>This could be made a lot fancier (ie. to take a substitution matrix 
  into account), but it just meant for a quick and dirty consensus.</p>
  <p>Arguments: o threshold - The threshold value that is required to add a
  particular atom. o ambiguous - The ambiguous character to be added when 
  the threshold is not reached. o consensus_alpha - The alphabet to return 
  for the consensus sequence. If this is None, then we will try to guess 
  the alphabet. o require_multiple - If set as 1, this will require that 
  more than 1 sequence be part of an alignment to put it in the consensus 
  (ie. not just 1 sequence and gaps).</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="gap_consensus"></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">gap_consensus</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">threshold</span>=<span class="sig-default">0.7</span>,
        <span class="sig-arg">ambiguous</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">X</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">consensus_alpha</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">require_multiple</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.gap_consensus">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Same as dumb_consensus(), but allows gap on the output.</p>
  <p>Things to do: Let the user define that with only one gap, the result 
  character in consensus is gap. Let the user select gap character, now it 
  takes the same is input.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_guess_consensus_alphabet"></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">_guess_consensus_alphabet</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">ambiguous</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._guess_consensus_alphabet">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Pick an (ungapped) alphabet for an alignment consesus sequence.</p>
  <p>This just looks at the sequences we have, checks their type, and 
  returns as appropriate type which seems to make sense with the sequences 
  we've got.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="replacement_dictionary"></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">replacement_dictionary</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">skip_chars</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.replacement_dictionary">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Generate a replacement dictionary to plug into a substitution 
  matrix</p>
  <p>This should look at an alignment, and be able to generate the number 
  of substitutions of different residues for each other in the aligned 
  object.</p>
  <p>Will then return a dictionary with this information: {('A', 'C') : 10,
  ('C', 'A') : 12, ('G', 'C') : 15 ....}</p>
  <p>This also treats weighted sequences. The following example shows how 
  we calculate the replacement dictionary. Given the following multiple 
  sequence alignments:</p>
  <p>GTATC  0.5 AT--C  0.8 CTGTC  1.0</p>
  <p>For the first column we have: ('A', 'G') : 0.5 * 0.8 = 0.4 ('C', 'G') 
  : 0.5 * 1.0 = 0.5 ('A', 'C') : 0.8 * 1.0 = 0.8</p>
  <p>We then continue this for all of the columns in the alignment, summing
  the information for each substitution in each column, until we end up 
  with the replacement dictionary.</p>
  <p>Arguments: o skip_chars - A list of characters to skip when creating 
  the dictionary. For instance, you might have Xs (screened stuff) or Ns, 
  and not want to include the ambiguity characters in the dictionary.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_pair_replacement"></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">_pair_replacement</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">seq1</span>,
        <span class="sig-arg">seq2</span>,
        <span class="sig-arg">weight1</span>,
        <span class="sig-arg">weight2</span>,
        <span class="sig-arg">start_dict</span>,
        <span class="sig-arg">ignore_chars</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._pair_replacement">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Compare two sequences and generate info on the replacements seen.</p>
  <p>Arguments: o seq1, seq2 - The two sequences to compare. o weight1, 
  weight2 - The relative weights of seq1 and seq2. o start_dict - The 
  dictionary containing the starting replacement info that we will modify. 
  o ignore_chars - A list of characters to ignore when calculating 
  replacements (ie. '-').</p>
  <p>Returns: o A replacment dictionary which is modified from initial_dict
  with the information from the sequence comparison.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_get_base_replacements"></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_base_replacements</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">skip_items</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_base_replacements">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Get a zeroed dictonary of all possible letter combinations.</p>
  <p>This looks at the type of alphabet and gets the letters for it. It 
  then creates a dictionary with all possible combinations of these letters
  as keys (ie. ('A', 'G')) and sets the values as zero.</p>
  <p>Returns: o The base dictionary created o A list of alphabet items to 
  skip when filling the dictionary.Right now the only thing I can imagine 
  in this list is gap characters, but maybe X's or something else might be 
  useful later. This will also include any characters that are specified to
  be skipped.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="pos_specific_score_matrix"></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">pos_specific_score_matrix</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">axis_seq</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">chars_to_ignore</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.pos_specific_score_matrix">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Create a position specific score matrix object for the alignment.</p>
  <p>This creates a position specific score matrix (pssm) which is an 
  alternative method to look at a consensus sequence.</p>
  <p>Arguments: o chars_to_ignore - A listing of all characters not to 
  include in the pssm.  If the alignment alphabet declares a gap character,
  then it will be excluded automatically. o axis_seq - An optional argument
  specifying the sequence to put on the axis of the PSSM. This should be a 
  Seq object. If nothing is specified, the consensus sequence, calculated 
  with default parameters, will be used.</p>
  <p>Returns: o A PSSM (position specific score matrix) object.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="information_content"></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">information_content</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">start</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">end</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">e_freq_table</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">log_base</span>=<span class="sig-default">2</span>,
        <span class="sig-arg">chars_to_ignore</span>=<span class="sig-default"><code class="variable-group">[</code><code class="variable-group">]</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo.information_content">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Calculate the information content for each residue along an 
  alignment.</p>
  <p>Arguments: o start, end - The starting an ending points to calculate 
  the information content. These points should be relative to the first 
  sequence in the alignment, starting at zero (ie. even if the 'real' first
  position in the seq is 203 in the initial sequence, for the info content,
  we need to use zero). This defaults to the entire length of the first 
  sequence. o e_freq_table - A FreqTable object  specifying the expected 
  frequencies for each letter in the alphabet we are using (ie. {'G' : 0.4,
  'C' : 0.4, 'T' : 0.1, 'A' : 0.1}). Gap characters should not be included,
  since these should not have expected frequencies. o log_base - The base 
  of the logathrim to use in calculating the information content. This 
  defaults to 2 so the info is in bits. o chars_to_ignore - A listing of 
  characterw which should be ignored in calculating the info content.</p>
  <p>Returns: o A number representing the info content for the specified 
  region.</p>
  <p>Please see the Biopython manual for more information on how 
  information content is calculated.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_get_letter_freqs"></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_letter_freqs</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">residue_num</span>,
        <span class="sig-arg">all_records</span>,
        <span class="sig-arg">letters</span>,
        <span class="sig-arg">to_ignore</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_letter_freqs">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Determine the frequency of specific letters in the alignment.</p>
  <p>Arguments: o residue_num - The number of the column we are getting 
  frequencies from. o all_records - All of the SeqRecords in the alignment.
  o letters - The letters we are interested in getting the frequency for. o
  to_ignore - Letters we are specifically supposed to ignore.</p>
  <p>This will calculate the frequencies of each of the specified letters 
  in the alignment at the given frequency, and return this as a dictionary 
  where the keys are the letters and the values are the frequencies.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="_get_column_info_content"></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_column_info_content</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">obs_freq</span>,
        <span class="sig-arg">e_freq_table</span>,
        <span class="sig-arg">log_base</span>,
        <span class="sig-arg">random_expected</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.Align.AlignInfo-pysrc.html#SummaryInfo._get_column_info_content">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Calculate the information content for a column.</p>
  <p>Arguments: o obs_freq - The frequencies observed for each letter in 
  the column. o e_freq_table - An optional argument specifying the expected
  frequencies for each letter. This is a SubsMat.FreqTable instance. o 
  log_base - The base of the logathrim to use in calculating the info 
  content.</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>&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:30 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>