Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

test the degenerate consensus sequence also

  • Loading branch information...
commit 9c3e4319cc26e33d1c789ae47b80bad5a6e43000 1 parent d84866e
Michiel de Hoon authored
Showing with 42 additions and 0 deletions.
  1. +42 −0 Tests/test_Motif.py
View
42 Tests/test_Motif.py
@@ -2479,10 +2479,52 @@ def test_transfac_parser(self):
self.assertEqual(motif.counts['T', 9], 2)
self.assertEqual(motif.counts['T',10], 3)
self.assertEqual(motif.counts['T',11], 1)
+ self.assertEqual(str(motif.counts.degenerate_consensus), "SRACAGGTGKYG")
motif = motifs[1]
self.assertEqual(motif['ID'], 'motif2')
self.assertEqual(len(motif.counts), 4)
self.assertEqual(motif.counts.length, 10)
+ self.assertEqual(motif.counts['A', 0], 2)
+ self.assertEqual(motif.counts['A', 1], 1)
+ self.assertEqual(motif.counts['A', 2], 0)
+ self.assertEqual(motif.counts['A', 3], 3)
+ self.assertEqual(motif.counts['A', 4], 0)
+ self.assertEqual(motif.counts['A', 5], 5)
+ self.assertEqual(motif.counts['A', 6], 0)
+ self.assertEqual(motif.counts['A', 7], 0)
+ self.assertEqual(motif.counts['A', 8], 0)
+ self.assertEqual(motif.counts['A', 9], 0)
+ self.assertEqual(motif.counts['C', 0], 1)
+ self.assertEqual(motif.counts['C', 1], 2)
+ self.assertEqual(motif.counts['C', 2], 5)
+ self.assertEqual(motif.counts['C', 3], 0)
+ self.assertEqual(motif.counts['C', 4], 0)
+ self.assertEqual(motif.counts['C', 5], 0)
+ self.assertEqual(motif.counts['C', 6], 1)
+ self.assertEqual(motif.counts['C', 7], 0)
+ self.assertEqual(motif.counts['C', 8], 0)
+ self.assertEqual(motif.counts['C', 9], 2)
+ self.assertEqual(motif.counts['G', 0], 2)
+ self.assertEqual(motif.counts['G', 1], 2)
+ self.assertEqual(motif.counts['G', 2], 0)
+ self.assertEqual(motif.counts['G', 3], 1)
+ self.assertEqual(motif.counts['G', 4], 4)
+ self.assertEqual(motif.counts['G', 5], 0)
+ self.assertEqual(motif.counts['G', 6], 4)
+ self.assertEqual(motif.counts['G', 7], 5)
+ self.assertEqual(motif.counts['G', 8], 0)
+ self.assertEqual(motif.counts['G', 9], 0)
+ self.assertEqual(motif.counts['T', 0], 0)
+ self.assertEqual(motif.counts['T', 1], 0)
+ self.assertEqual(motif.counts['T', 2], 0)
+ self.assertEqual(motif.counts['T', 3], 1)
+ self.assertEqual(motif.counts['T', 4], 1)
+ self.assertEqual(motif.counts['T', 5], 0)
+ self.assertEqual(motif.counts['T', 6], 0)
+ self.assertEqual(motif.counts['T', 7], 0)
+ self.assertEqual(motif.counts['T', 8], 5)
+ self.assertEqual(motif.counts['T', 9], 3)
+ self.assertEqual(str(motif.counts.degenerate_consensus), "RSCAGAGGTY")
handle.close()
Please sign in to comment.
Something went wrong with that request. Please try again.