Alignment.malign() — align two or more sequences

malign(rr_file='$(LIB)/as1.sim.mat', off_diagonal=100, local_alignment=False, matrix_offset=0.0, overhang=0, align_block=0, gap_penalties_1d=(-900.0, -50.0))
IMPORTANT NOTE: This command is obsolete, and is no longer maintained. It is strongly recommended that you use Alignment.salign() instead.

This command performs a multiple sequence alignment. The sequences to be aligned are the sequences in the current alignment arrays. The command uses the dynamic programming method for the best sequence alignment, given the gap initiation and extension penalties specified by gap_penalties_1d, and residue type weights read from file rr_file. See command Alignment.align() for more information.

The algorithm for the multiple alignment is as follows. First, sequence 2 is aligned with sequence 1 (i.e., block of sequences from 1-align_block). Next, sequence 3 is aligned with an average of the aligned sequences 1 and 2; i.e., the weight matrix is an average of the weights 1-3 and 2-3. For this averaging, the gap-residue and gap-gap weights are obtained from the residue-residue weight matrix file, not from gap penalties. If the corresponding weights are not in the file, they are set to the worst and best residue-residue score, respectively.

See instructions for Alignment.align() for more details.

Example: examples/commands/malign.py

# Example for: Alignment.malign()

# This will read all sequences from a file, align them, and write
# the alignment to a new file:

from modeller import *

env = Environ()

aln = Alignment(env, file='toxin.ali', align_codes='all')
aln.malign(gap_penalties_1d=(-600, -400))
aln.write(file='toxin-seq.pap', alignment_format='PAP')