next up previous contents index
Next: alignment.compare_structures() compare Up: The alignment class: comparison Previous: alignment.malign() align   Contents   Index

alignment.consensus() -- consensus sequence alignment

gap_penalties_1d = <float:2> 900 50 gap creation and extension penalties for sequence/sequence alignment
align_block = <int:1> 0 the last sequence in the first block of sequences
max_gap_length = <int:1> 999999 maximal length of gap in protein comparisons
read_weights = <bool:1> False whether to read the whole NxM weight matrix for ALIGN*
write_weights = <bool:1> False whether to write the whole NxM weight matrix for ALIGN*
input_weights_file = <str:1> '' Exteral weight matrix input to MODELLER (SALIGN/ALIGN)
output_weights_file = <str:1> '' File into which the weight file is wriiten (iff WRITE_WEIGHTS = 'on')

Description:
This command is similar to alignment.align() except that a consensus alignment of two blocks of sequences is produced. A consensus alignment is obtained from a consensus similarity matrix using the specified gap penalties and the global dynamic programming method. The consensus similarity matrix is obtained by aligning the two blocks of sequences many times with different parameters and methods and counting how many times each pair was aligned. This command is still experimental and no detailed description is given at this time.

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: examples/commands/align_consensus.py


# 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')


next up previous contents index
Next: alignment.compare_structures() compare Up: The alignment class: comparison Previous: alignment.malign() align   Contents   Index
Ben Webb 2006-02-28