Package Bio :: Package Clustalw
[hide private]
[frames] | no frames]

Package Clustalw

source code

Code for calling ClustalW and parsing its output (DEPRECATED).

This module has been superseded by the Bio.AlignIO framework for
alignment parsing, and the ClustalW command line wrapper in
Bio.Align.Applications for calling the tool. These are both described
in the current version of the Biopython Tutorial and Cookbook.
This means Bio.Clustalw is now deprecated and likely to be
removed in future releases of Biopython.

A set of classes to interact with the multiple alignment command
line program clustalw. 

Clustalw is the command line version of the graphical Clustalx 
aligment program.

This requires clustalw available from:

ftp://ftp-igbmc.u-strasbg.fr/pub/ClustalW/.

functions:
o read
o parse_file
o do_alignment

classes:
o ClustalAlignment
o MultipleAlignCL

Classes [hide private]
  ClustalAlignment
Work with the clustal aligment format (OBSOLETE).
  MultipleAlignCL
Represent a clustalw multiple alignment command line (OBSOLETE).
Functions [hide private]
 
parse_file(file_name, alphabet=IUPACUnambiguousDNA(), debug_level=0)
Parse the given file into a clustal aligment object (OBSOLETE).
source code
 
do_alignment(command_line, alphabet=None)
Perform an alignment with the given command line (OBSOLETE).
source code
 
_test()
Run the Bio.Clustalw module's doctests (PRIVATE).
source code
Variables [hide private]
  __warningregistry__ = {('Bio.Clustalw is deprecated. Please us...
Function Details [hide private]

parse_file(file_name, alphabet=IUPACUnambiguousDNA(), debug_level=0)

source code 
Parse the given file into a clustal aligment object (OBSOLETE).

Arguments:
o file_name - The name of the file to parse.
o alphabet - The type of alphabet to use for the alignment sequences.
This should correspond to the type of information contained in the file.
Defaults to be unambiguous_dna sequence.

There is a deprecated optional argument debug_level which has no effect.

This function is obsolete, and any new code should call Bio.AlignIO
instead. For example using Bio.Clustalw, you might have:

>>> from Bio import Clustalw
>>> from Bio import Alphabet
>>> filename = "Clustalw/protein.aln"
>>> alpha = Alphabet.Gapped(Alphabet.generic_protein)
>>> align = Clustalw.parse_file(filename, alphabet=alpha)
>>> print align.get_alignment_length()
411
>>> clustalw_string = str(align)

This becomes:

>>> from Bio import AlignIO
>>> from Bio import Alphabet
>>> filename = "Clustalw/protein.aln"
>>> alpha = Alphabet.Gapped(Alphabet.generic_protein)
>>> align = AlignIO.read(open(filename), "clustal", alphabet=alpha)
>>> print align.get_alignment_length()
411
>>> assert clustalw_string == align.format("clustal")

do_alignment(command_line, alphabet=None)

source code 
Perform an alignment with the given command line (OBSOLETE).

Arguments:
o command_line - A command line object that can give out
the command line we will input into clustalw.
o alphabet - the alphabet to use in the created alignment. If not
specified IUPAC.unambiguous_dna and IUPAC.protein will be used for
dna and protein alignment respectively.

Returns:
o A clustal alignment object corresponding to the created alignment.
If the alignment type was not a clustal object, None is returned.

This function (and the associated command line object) are now obsolete.
Please use the Bio.Align.Applications.ClustalwCommandline wrapper with
the Python subprocess module (and Bio.AlignIO for parsing) as described
in the tutorial.

_test()

source code 
Run the Bio.Clustalw module's doctests (PRIVATE).

This will try and locate the unit tests directory, and run the doctests
from there in order that the relative paths used in the examples work.


Variables Details [hide private]

__warningregistry__

Value:
{('Bio.Clustalw is deprecated. Please use the Bio.AlignIO framework fo\
r alignment parsing, and the ClustalW command line wrapper in Bio.Alig\
n.Applications for calling the tool. These are both described in the c\
urrent version of the Biopython Tutorial and Cookbook.',
  <class 'Bio.BiopythonDeprecationWarning'>,
  34): 1,
 ('This class is obsolete.',
  <type 'exceptions.PendingDeprecationWarning'>,
...