next up previous contents index
Next: alignment.align() align Up: The alignment class: comparison Previous: alignment.id_table() calculate   Contents   Index

alignment.compare_sequences() -- compare sequences in alignment

mdl = <model>   Model
rr_file = <str:1> '$(LIB)/as1.sim.mat' input residue-residue scoring file
matrix_file = <str:1> 'family.mat' the filename of the pairwise distance matrix
variability_file = <str:1> 'undefined' output filename
max_gaps_match = <int:1> 1

The pairwise similarity of sequences in the current alignment is evaluated using a user specified residue-residue scores file.

The residue-residue scores, including gap-residue, and gap-gap scores, are read from file rr_file. The sequence pair score is equal to the average pairwise residue-residue score for all alignment positions that have at most max_gaps_match gaps (1 by default). If the gap-residue and gap-gap scores are not defined in matrix_file, they are set to the worst and best residue-residue score, respectively. If matrix_file is a similarity matrix, it is converted into a distance matrix ( $ x' = -x + x_{\mbox{max}}$ ).

The comparison matrix is written in the PHYLIP format to file matrix_file.

The family variability as a function of alignment position is calculated as the RMS deviation of all residue - residue scores at a given position, but only for those pairs of residues that have at most max_gaps_match gaps (0, 1, or 2). The variability is written to file variability_file, as is the number of pairwise comparisons contributing to each positional variability. The variability is also written into the fourth column of the current model, which must correspond to the first sequence in the alignment.

Example: See alignment.id_table() command.


next up previous contents index
Next: alignment.align() align Up: The alignment class: comparison Previous: alignment.id_table() calculate   Contents   Index
Ben Webb 2007-01-19