Permalink
Browse files

Test Bio.Motif & Bio.motifs PSSM with alternative alphabet.

  • Loading branch information...
peterjc committed Jul 17, 2013
1 parent 5f74206 commit 0c4ad9adbd3a7953f8a4850d5f6db9c10e94ffe9
Showing with 11 additions and 1 deletion.
  1. +6 −1 Tests/test_Motif.py
  2. +5 −0 Tests/test_motifs.py
View
@@ -11,7 +11,7 @@
from Bio import BiopythonDeprecationWarning
warnings.simplefilter('ignore', BiopythonDeprecationWarning)
-
+from Bio.Alphabet import IUPAC
from Bio import Motif
from Bio.Seq import Seq
@@ -1531,6 +1531,11 @@ def test_simple(self):
self.assertAlmostEqual(result[4], -20.3014183, places=5)
self.assertAlmostEqual(result[5], -25.18009186, places=5)
+ def test_with_alt_alphabet(self):
+ """Test motif search using alternative instance of alphabet."""
+ self.s = Seq(str(self.s), IUPAC.IUPACUnambiguousDNA())
+ self.test_simple()
+
if __name__ == "__main__":
runner = unittest.TextTestRunner(verbosity = 2)
View
@@ -1624,6 +1624,11 @@ def test_simple(self):
self.assertAlmostEqual(result[4], -20.3014183, places=5)
self.assertAlmostEqual(result[5], -25.18009186, places=5)
+ def test_with_alt_alphabet(self):
+ """Test motif search using alternative instance of alphabet."""
+ self.s = Seq(str(self.s), IUPAC.IUPACUnambiguousDNA())
+ self.test_simple()
+
def test_with_mixed_case(self):
"""Test if Bio.motifs PWM scoring works with mixed case."""
counts = self.m.counts

0 comments on commit 0c4ad9a

Please sign in to comment.