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

Class ClustalAlignment

source code

Align.Generic.Alignment --+
                          |
                         ClustalAlignment

Work with the clustal aligment format.

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

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__, __repr__, add_sequence, format, get_alignment_length, get_all_seqs, get_column, get_seq_by_num

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

Class Variables [hide private]
  DEFAULT_VERSION = '1.81'
Method Details [hide private]

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

source code 

Initialize a new Alignment object.

Arguments: o 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", "ACTGCTAGDTAG") >>> print align Gapped(IUPACUnambiguousDNA(), '-') alignment with 3 rows and 12 columns ACTGCTAGCTAG Alpha ACT-CTAGCTAG Beta ACTGCTAGDTAG Gamma

Overrides: Align.Generic.Alignment.__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: Align.Generic.Alignment.__str__