Sophie

Sophie

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

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.SeqIO</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> ::
        Package&nbsp;SeqIO
      </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.SeqIO-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== PACKAGE DESCRIPTION ==================== -->
<h1 class="epydoc">Package SeqIO</h1><p class="nomargin-top"><span class="codelink"><a href="Bio.SeqIO-pysrc.html">source&nbsp;code</a></span></p>
<pre class="literalblock">
Sequence input/output as SeqRecord objects.

The Bio.SeqIO module is also documented by a whole chapter in the Biopython
tutorial, and by the wiki http://biopython.org/wiki/SeqIO on the website.
The approach is designed to be similar to the bioperl SeqIO design.

Input
=====
The main function is Bio.SeqIO.parse(...) which takes an input file handle,
and format string.  This returns an iterator giving SeqRecord objects.

    from Bio import SeqIO
    handle = open(&quot;example.fasta&quot;, &quot;rU&quot;)
    for record in SeqIO.parse(handle, &quot;fasta&quot;) :
        print record
    handle.close()

Note that the parse() function will all invoke the relevant parser for the
format with its default settings.  You may want more control, in which case
you need to create a format specific sequence iterator directly.

For non-interlaced files (e.g. Fasta, GenBank, EMBL) with multiple records
using a sequence iterator can save you a lot of memory (RAM).  There is
less benefit for interlaced file formats (e.g. most multiple alignment file
formats).  However, an iterator only lets you access the records one by one.

If you want random access to the records by number, turn this into a list:

    from Bio import SeqIO
    handle = open(&quot;example.fasta&quot;, &quot;rU&quot;)
    records = list(SeqIO.parse(handle, &quot;fasta&quot;))
    handle.close()
    print records[0]

If you want random access to the records by a key such as the record id,
turn the iterator into a dictionary:

    from Bio import SeqIO
    handle = open(&quot;example.fasta&quot;, &quot;rU&quot;)
    record_dict = SeqIO.to_dict(SeqIO.parse(handle, &quot;fasta&quot;))
    handle.close()
    print record[&quot;gi:12345678&quot;]

If you expect your file to contain one-and-only-one record, then we provide
the following 'helper' function which will return a single SeqRecord, or
raise an exception if there are no records or more than one record:

    from Bio import SeqIO
    handle = open(&quot;example.fasta&quot;, &quot;rU&quot;)
    record = SeqIO.read(handle, &quot;fasta&quot;)
    handle.close()
    print record

This style is useful when you expect a single record only (and would
consider multiple records an error).  For example, when dealing with GenBank
files for bacterial genomes or chromosomes, there is normally only a single
record.  Alternatively, use this with a handle when download a single record
from the internet.

However, if you just want the first record from a file containing multiple
record, use the iterator's next() method:

    from Bio import SeqIO
    handle = open(&quot;example.fasta&quot;, &quot;rU&quot;)
    record = SeqIO.parse(handle, &quot;fasta&quot;).next()
    handle.close()
    print record

The above code will work as long as the file contains at least one record.
Note that if there is more than one record, the remaining records will be
silently ignored.

Input - Alignments
==================
You can read in alignment files as Alignment objects using Bio.AlignIO.
Alternatively, reading in an alignment file format via Bio.SeqIO will give
you a SeqRecord for each row of each alignment.

Output
======
Use the function Bio.SeqIO.write(...), which takes a complete set of
SeqRecord objects (either as a list, or an iterator), an output file handle
and of course the file format.

    from Bio import SeqIO
    records = ...
    handle = open(&quot;example.faa&quot;, &quot;w&quot;)
    SeqIO.write(records, handle, &quot;fasta&quot;)
    handle.close()

In general, you are expected to call this function once (with all your
records) and then close the file handle.

Output - Advanced
=================
The effect of calling write() multiple times on a single file will vary
depending on the file format, and is best avoided unless you have a strong
reason to do so.

Trying this for certain alignment formats (e.g. phylip, clustal, stockholm)
would have the effect of concatenating several multiple sequence alignments
together.  Such files are created by the PHYLIP suite of programs for
bootstrap analysis.

For sequential files formats (e.g. fasta, genbank) each &quot;record block&quot; holds
a single sequence.  For these files it would probably be safe to call
write() multiple times.

File Formats
============
When specifying formats, use lowercase strings.

</pre>

<!-- ==================== SUBMODULES ==================== -->
<a name="section-Submodules"></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">Submodules</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Submodules"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr><td class="summary">
  <ul class="nomargin">
    <li> <strong class="uidlink"><a href="Bio.SeqIO.AceIO-module.html">Bio.SeqIO.AceIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;ace&quot; file format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.ClustalIO-module.html">Bio.SeqIO.ClustalIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;clustal&quot; (aka ClustalW) file 
        format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.FastaIO-module.html">Bio.SeqIO.FastaIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;fasta&quot; (aka FastA or Pearson) 
        file format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.IgIO-module.html">Bio.SeqIO.IgIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;ig&quot; (IntelliGenetics or MASE) 
        file format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.InsdcIO-module.html">Bio.SeqIO.InsdcIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;genbank&quot; and &quot;embl&quot; 
        file formats.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.Interfaces-module.html">Bio.SeqIO.Interfaces</a></strong>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.NexusIO-module.html">Bio.SeqIO.NexusIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;nexus&quot; file format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.PhdIO-module.html">Bio.SeqIO.PhdIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;phd&quot; file format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.PhylipIO-module.html">Bio.SeqIO.PhylipIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;phylip&quot; (PHYLIP) file format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.StockholmIO-module.html">Bio.SeqIO.StockholmIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;stockholm&quot; (aka PFAM) file 
        format.</em>    </li>
    <li> <strong class="uidlink"><a href="Bio.SeqIO.SwissIO-module.html">Bio.SeqIO.SwissIO</a></strong>: <em class="summary">Bio.SeqIO support for the &quot;swiss&quot; (aka SwissProt/UniProt)
        file format.</em>    </li>
  </ul></td></tr>
</table>

<br />
<!-- ==================== 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>
    <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.SeqIO-module.html#write" class="summary-sig-name">write</a>(<span class="summary-sig-arg">sequences</span>,
        <span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">format</span>)</span><br />
      Write complete set of sequences to a file.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.SeqIO-pysrc.html#write">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.SeqIO-module.html#parse" class="summary-sig-name">parse</a>(<span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">format</span>)</span><br />
      Turns a sequence file into an iterator returning SeqRecords.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.SeqIO-pysrc.html#parse">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="_iterate_via_AlignIO"></a><span class="summary-sig-name">_iterate_via_AlignIO</span>(<span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">format</span>)</span><br />
      Private function to iterate over all records in several alignments.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.SeqIO-pysrc.html#_iterate_via_AlignIO">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.SeqIO-module.html#read" class="summary-sig-name">read</a>(<span class="summary-sig-arg">handle</span>,
        <span class="summary-sig-arg">format</span>)</span><br />
      Turns a sequence file into a single SeqRecord.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.SeqIO-pysrc.html#read">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.SeqIO-module.html#to_dict" class="summary-sig-name">to_dict</a>(<span class="summary-sig-arg">sequences</span>,
        <span class="summary-sig-arg">key_function</span>=<span class="summary-sig-default">None</span>)</span><br />
      Turns a sequence iterator or list into a dictionary.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.SeqIO-pysrc.html#to_dict">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.SeqIO-module.html#to_alignment" class="summary-sig-name">to_alignment</a>(<span class="summary-sig-arg">sequences</span>,
        <span class="summary-sig-arg">alphabet</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">strict</span>=<span class="summary-sig-default">True</span>)</span><br />
      Returns a multiple sequence alignment (OBSOLETE).</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Bio.SeqIO-pysrc.html#to_alignment">source&nbsp;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 class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="Bio.SeqIO-module.html#_FormatToIterator" class="summary-name" onclick="show_private();">_FormatToIterator</a> = <code title="{&quot;fasta&quot;: FastaIO.FastaIterator, &quot;genbank&quot;: InsdcIO.GenBankIterator, &quot;\
genbank-cds&quot;: InsdcIO.GenBankCdsFeatureIterator, &quot;embl&quot;: InsdcIO.EmblI\
terator, &quot;embl-cds&quot;: InsdcIO.EmblCdsFeatureIterator, &quot;ig&quot;: IgIO.IgIter\
ator, &quot;swiss&quot;: SwissIO.SwissIterator, &quot;phd&quot;: PhdIO.PhdIterator, &quot;ace&quot;:\
 AceIO.AceIterator,}">{&quot;fasta&quot;: FastaIO.FastaIterator, &quot;genbank&quot;<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_FormatToWriter"></a><span class="summary-name">_FormatToWriter</span> = <code title="{&quot;fasta&quot;: FastaIO.FastaWriter,}">{&quot;fasta&quot;: FastaIO.FastaWriter,}</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="write"></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">write</span>(<span class="sig-arg">sequences</span>,
        <span class="sig-arg">handle</span>,
        <span class="sig-arg">format</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.SeqIO-pysrc.html#write">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Write complete set of sequences to a file.</p>
  <p>sequences - A list (or iterator) of SeqRecord objects handle    - File
  handle object to write to format    - What format to use.</p>
  <p>You should close the handle after calling this function.</p>
  <p>There is no return value.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="parse"></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">parse</span>(<span class="sig-arg">handle</span>,
        <span class="sig-arg">format</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.SeqIO-pysrc.html#parse">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Turns a sequence file into an iterator returning SeqRecords.</p>
  <p>handle   - handle to the file. format   - string describing the file 
  format.</p>
  <p>If you have the file name in a string 'filename', use:</p>
  <p>from Bio import SeqIO my_iterator = 
  SeqIO.parse(open(filename,&quot;rU&quot;), format)</p>
  <p>If you have a string 'data' containing the file contents, use:</p>
  <p>from Bio import SeqIO from StringIO import StringIO my_iterator = 
  SeqIO.parse(StringIO(data), format)</p>
  <p>Note that file will be parsed with default settings, which may result 
  in a generic alphabet or other non-ideal settings.  For more control, you
  must use the format specific iterator directly...</p>
  <p>Use the Bio.SeqIO.read(handle, format) function when you expect a 
  single record only.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="read"></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">read</span>(<span class="sig-arg">handle</span>,
        <span class="sig-arg">format</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.SeqIO-pysrc.html#read">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Turns a sequence file into a single SeqRecord.</p>
  <p>handle   - handle to the file. format   - string describing the file 
  format.</p>
  <p>If the handle contains no records, or more than one record, an 
  exception is raised.  For example, using a GenBank file containing one 
  record:</p>
  <p>from Bio import SeqIO record = 
  SeqIO.read(open(&quot;example.gbk&quot;), &quot;genbank&quot;)</p>
  <p>If however you want the first record from a file containing, multiple 
  records this function would raise an exception. Instead use:</p>
  <p>from Bio import SeqIO record = 
  SeqIO.parse(open(&quot;example.gbk&quot;), 
  &quot;genbank&quot;).next()</p>
  <p>Use the Bio.SeqIO.parse(handle, format) function if you want to read 
  multiple records from the handle.</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="to_dict"></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">to_dict</span>(<span class="sig-arg">sequences</span>,
        <span class="sig-arg">key_function</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.SeqIO-pysrc.html#to_dict">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Turns a sequence iterator or list into a dictionary.

sequences  - An iterator that returns SeqRecord objects,
             or simply a list of SeqRecord objects.
key_function - Optional function which when given a SeqRecord
               returns a unique string for the dictionary key.

e.g. key_function = lambda rec : rec.name
or,  key_function = lambda rec : rec.description.split()[0]

If key_function is ommitted then record.id is used, on the
assumption that the records objects returned are SeqRecords
with a unique id field.

If there are duplicate keys, an error is raised.

Example usage:

from Bio import SeqIO
filename = &quot;example.fasta&quot;
d = SeqIO.to_dict(SeqIO.parse(open(faa_filename, &quot;rU&quot;)),
    key_function = lambda rec : rec.description.split()[0])
print len(d)
print d.keys()[0:10]
key = d.keys()[0]
print d[key]

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="to_alignment"></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">to_alignment</span>(<span class="sig-arg">sequences</span>,
        <span class="sig-arg">alphabet</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">strict</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Bio.SeqIO-pysrc.html#to_alignment">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">
Returns a multiple sequence alignment (OBSOLETE).

sequences -An iterator that returns SeqRecord objects,
           or simply a list of SeqRecord objects.
           All the record sequences must be the same length.
alphabet - Optional alphabet.  Stongly recommended.
strict   - Optional, defaults to True.  Should error checking
           be done?

Using this function is now discouraged.  Rather doing this:

from Bio import SeqIO
alignment = SeqIO.to_alignment(SeqIO.parse(handle, format))

You are now encouraged to use Bio.AlignIO instead, e.g.

from Bio import AlignIO
alignment = AlignIO.read(handle, format)

</pre>
  <dl class="fields">
  </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="_FormatToIterator"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_FormatToIterator</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{&quot;fasta&quot;: FastaIO.FastaIterator, &quot;genbank&quot;: InsdcIO.GenBankIterator, &quot;<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
genbank-cds&quot;: InsdcIO.GenBankCdsFeatureIterator, &quot;embl&quot;: InsdcIO.EmblI<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
terator, &quot;embl-cds&quot;: InsdcIO.EmblCdsFeatureIterator, &quot;ig&quot;: IgIO.IgIter<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ator, &quot;swiss&quot;: SwissIO.SwissIterator, &quot;phd&quot;: PhdIO.PhdIterator, &quot;ace&quot;:<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 AceIO.AceIterator,}
</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>&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:25 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>