Author: bugman Date: Thu Jan 22 18:01:40 2015 New Revision: 27278 URL: http://svn.gna.org/viewcvs/relax?rev=27278&view=rev Log: Added support for the PAM250 substitution matrix to the protein pairwise sequence alignment function.
This is the function lib.sequence_alignment.align_protein.align_pairwise(). Modified: trunk/lib/sequence_alignment/align_protein.py Modified: trunk/lib/sequence_alignment/align_protein.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/sequence_alignment/align_protein.py?rev=27278&r1=27277&r2=27278&view=diff ============================================================================== --- trunk/lib/sequence_alignment/align_protein.py (original) +++ trunk/lib/sequence_alignment/align_protein.py Thu Jan 22 18:01:40 2015 @@ -29,7 +29,7 @@ # relax module imports. from lib.errors import RelaxError from lib.sequence_alignment.needleman_wunsch import needleman_wunsch_align -from lib.sequence_alignment.substitution_matrices import BLOSUM62, BLOSUM62_SEQ +from lib.sequence_alignment.substitution_matrices import BLOSUM62, BLOSUM62_SEQ, PAM250, PAM250_SEQ def align_pairwise(sequence1, sequence2, algorithm='NW70', matrix='BLOSUM62', gap_open_penalty=1.0, gap_extend_penalty=1.0, end_gap_open_penalty=0.0, end_gap_extend_penalty=0.0): @@ -59,7 +59,7 @@ allowed_algor = ['NW70'] if algorithm not in allowed_algor: raise RelaxError("The sequence alignment algorithm '%s' is unknown, it must be one of %s." % (algorithm, allowed_algor)) - allowed_matrices = ['BLOSUM62'] + allowed_matrices = ['BLOSUM62', 'PAM250'] if matrix not in allowed_matrices: raise RelaxError("The substitution matrix '%s' is unknown, it must be one of %s." % (matrix, allowed_matrices)) @@ -79,6 +79,9 @@ if matrix == 'BLOSUM62': sub_matrix = BLOSUM62 sub_seq = BLOSUM62_SEQ + elif matrix == 'PAM250': + sub_matrix = PAM250 + sub_seq = PAM250_SEQ # The alignment. if algorithm == 'NW70': _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-commits mailing list relax-commits@gna.org To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits