This command also produces the alignment accuracy that can be printed out by the alignment.write() command in the 'PAP' format (0 inaccurate, 9 accurate). If the gap initiation penalty is 0, the gap extension penalty of say 0.4 means that only those positions will be equivalenced that were aligned in at least 80% of the individual alignments (i.e., 2 times 0.40).
# Example for: alignment.consensus() # This will read 2 sequences and prepare a consensus alignment # from many different pairwise alignments. env = environ() aln = alignment(env) aln.append(file='toxin.ali', align_codes=('2ctx', '2abx')) aln.consensus(gap_penalties_1d=(0, 0.4), align_block=1) aln.write(file='toxin-seq.pap', alignment_format='PAP')