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 for: alignment.malign() # This will read all sequences from a file, align them, and write # the alignment to a new file: 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')