Author: bugman
Date: Thu Jan 29 15:37:23 2015
New Revision: 27354
URL: http://svn.gna.org/viewcvs/relax?rev=27354&view=rev
Log:
The protein pairwise sequence alignment function now returns the alignment
score.
This is in the lib.sequence_alignment.align_protein.align_pairwise() function.
The score from the
Needleman-Wunsch sequence alignment algorithm is simply passed along.
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=27354&r1=27353&r2=27354&view=diff
==============================================================================
--- trunk/lib/sequence_alignment/align_protein.py (original)
+++ trunk/lib/sequence_alignment/align_protein.py Thu Jan 29 15:37:23 2015
@@ -52,8 +52,8 @@
@type end_gap_extend_penalty: float
@keyword verbosity: The level of verbosity. Setting this
to zero silences all printouts.
@type verbosity: int
- @return: The two alignment strings and the gap
matrix.
- @rtype: str, str, numpy rank-2 int array
+ @return: The alignment score, two alignment
strings and the gap matrix.
+ @rtype: float, str, str, numpy rank-2 int array
"""
# Checks.
@@ -87,7 +87,7 @@
# The alignment.
if algorithm == 'NW70':
- align1, align2, gaps = needleman_wunsch_align(sequence1, sequence2,
sub_matrix=sub_matrix, sub_seq=sub_seq, gap_open_penalty=gap_open_penalty,
gap_extend_penalty=gap_extend_penalty,
end_gap_open_penalty=end_gap_open_penalty,
end_gap_extend_penalty=end_gap_extend_penalty)
+ score, align1, align2, gaps = needleman_wunsch_align(sequence1,
sequence2, sub_matrix=sub_matrix, sub_seq=sub_seq,
gap_open_penalty=gap_open_penalty, gap_extend_penalty=gap_extend_penalty,
end_gap_open_penalty=end_gap_open_penalty,
end_gap_extend_penalty=end_gap_extend_penalty)
# Final printout.
if verbosity:
@@ -102,4 +102,4 @@
sys.stdout.write("\n\n")
# Return the results.
- return align1, align2, gaps
+ return score, align1, align2, gaps
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
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