Testing (back to Introduction)

Step 1. Place the scoring modules motifModule.py, touScoreModule.py, and the test module testSequences.py in the working directory.

Step 2. Begin an interactive python session. Import the scoring module by typing:

import touScoreModule as tsm
at the prompt. Then import the lists of test sequences by typing:
import testSequences as test
at the prompt.

Step 3. Test the applyScore function by typing the following commands at the prompt and checking that you get the following values returned:

>>> for t in test.applyScore: print tsm.applyScore(t)
... 
27.6637051417
20.7595812241
22.0892347392
17.7824321386

Step 3. Test the predictTou function by typing the following commands at the prompt and checking that you get the following values returned:

>>> for t in test.predictTou: print tsm.predictTou(t)
... 
(17.782432138586955, 58)
(22.089234739166024, 58)
(20.759581224050276, 57)
(27.663705141670356, 57)

Step 3. Test the findTous function by typing the following commands at the prompt and checking that you get the following values returned, testing for score thresholds of 7, 15.5, and 27:

>>> for t in test.findTous: print tsm.findTous(t,7)
... 
[]
[65, 66, 67, 68, 69, 70, 71, 72, 73]
[68, 69, 71, 72, 73]
>>> for t in test.findTous: print tsm.findTous(t,15.5)
... 
[]
[65, 68, 69, 71, 72]
[69]
>>> for t in test.findTous: print tsm.findTous(t,27)  
... 
[]
[68]
[]