Author: bugman
Date: Thu Jan 22 16:55:21 2015
New Revision: 27271
URL: http://svn.gna.org/viewcvs/relax?rev=27271&view=rev
Log:
Modified the Test_needleman_wunsch.test_needleman_wunsch_align_DNA unit test to
pass.
This is from the unit test module
_lib._sequence_alignment.test_needleman_wunsch. The DNA sequences
were simplified so that the behaviour can be better predicted.
Modified:
trunk/test_suite/unit_tests/_lib/_sequence_alignment/test_needleman_wunsch.py
Modified:
trunk/test_suite/unit_tests/_lib/_sequence_alignment/test_needleman_wunsch.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_lib/_sequence_alignment/test_needleman_wunsch.py?rev=27271&r1=27270&r2=27271&view=diff
==============================================================================
---
trunk/test_suite/unit_tests/_lib/_sequence_alignment/test_needleman_wunsch.py
(original)
+++
trunk/test_suite/unit_tests/_lib/_sequence_alignment/test_needleman_wunsch.py
Thu Jan 22 16:55:21 2015
@@ -24,6 +24,7 @@
# relax module imports.
from lib.sequence_alignment.needleman_wunsch import needleman_wunsch_align
+from lib.sequence_alignment.substitution_matrices import NUC_4_4, NUC_4_4_SEQ,
SIMILARITY_DNA, SIMILARITY_DNA_SEQ
class Test_needleman_wunsch(TestCase):
@@ -33,14 +34,14 @@
"""Test the Needleman-Wunsch sequence alignment for two DNA
sequences."""
# The sequences.
- seq1 = 'GCATGCU'
- seq2 = 'GATTACA'
+ seq1 = 'GCATTACT'
+ seq2 = 'GATTACT'
print("\nIn:")
print(seq1)
print(seq2)
# Perform the alignment.
- align1, align2, gaps = needleman_wunsch_align(seq1, seq2)
+ align1, align2, gaps = needleman_wunsch_align(seq1, seq2,
sub_matrix=SIMILARITY_DNA, sub_seq=SIMILARITY_DNA_SEQ, gap_open_penalty=1,
gap_extend_penalty=1)
print("\nOut:")
print(align1)
print(align2)
@@ -48,12 +49,12 @@
print("\n")
# Check the alignment.
- self.assertEqual(align1, 'GCA-TGCU')
- self.assertEqual(align2, 'G-ATTACA')
+ self.assertEqual(align1, 'GCATTACT')
+ self.assertEqual(align2, 'G-ATTACT')
# The gap matrix.
real_gaps = [
- [0, 0, 0, 1, 0, 0, 0, 0],
+ [0, 0, 0, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0, 0, 0]
]
for i in range(2):
_______________________________________________
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