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

Class ClustalAlignment

source code

             object --+    
                      |    
Align.Generic.Alignment --+
                          |
                         ClustalAlignment

Work with the clustal aligment format (OBSOLETE).

This format is the default output from clustal -- these files normally
have an extension of .aln.

This obsolete alignment object is a subclass of the more general alignment
object used in Bio.AlignIO. The old practical difference is here str(align)
would give the alignment as a string in clustal format, whereas in general
you must do align.format("clustal"), which supports other formats too.

Instance Methods [hide private]
 
__init__(self, alphabet=Gapped(IUPACAmbiguousDNA(), '-'))
Initialize a new Alignment object.
source code
 
__str__(self)
Print out the alignment so it looks pretty.
source code

Inherited from Align.Generic.Alignment: __format__, __getitem__, __iter__, __len__, __repr__, add_sequence, format, get_alignment_length, get_all_seqs, get_column, get_seq_by_num

Inherited from Align.Generic.Alignment (private): _str_line

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  DEFAULT_VERSION = '1.81'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, alphabet=Gapped(IUPACAmbiguousDNA(), '-'))
(Constructor)

source code 

Initialize a new Alignment object.

Arguments:

  • alphabet - The alphabet to use for the sequence objects that are created. This alphabet must be a gapped type.

e.g.

>>> from Bio.Alphabet import IUPAC, Gapped
>>> align = Alignment(Gapped(IUPAC.unambiguous_dna, "-"))
>>> align.add_sequence("Alpha", "ACTGCTAGCTAG")
>>> align.add_sequence("Beta",  "ACT-CTAGCTAG")
>>> align.add_sequence("Gamma", "ACTGCTAGATAG")
>>> print align
Gapped(IUPACUnambiguousDNA(), '-') alignment with 3 rows and 12 columns
ACTGCTAGCTAG Alpha
ACT-CTAGCTAG Beta
ACTGCTAGATAG Gamma
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Print out the alignment so it looks pretty.

The output produced from this should also be formatted in valid
clustal format.

Overrides: object.__str__