-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing.py
65 lines (55 loc) · 1.67 KB
/
testing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# For the purpose of writing test scripts
# USE: python testing.py <input file location> <output file location>
# OUTPUT: Footprint sequence, sequence position(number), motif start position, Seed info (list)
import sys
import load
import out
import main
import align
import seed
import paring
import cluster
peak1 = ['ATTGCTCTAGCTACGATCTATACTGTACACAAA',0]
peak2 = ['GCGCGTAATCATTACGTATTTCCGGCGATATCGGGGGG',1]
peak3 = ['GCGCGTAGGCGCTATTTCTG',2]
peak4 = ['TTCTTTTTTCGCTTATATCGGCTAT',3]
peak5 = ['TCCTCTACTG',4]
peak6 = ['CGTATTATCTTTCGTTTGTCTTATCGTTTCTTATTTCGCGCGATTCTAGCTTATGCTATTGCTA',5]
mean1 = []
meanWords1 = []
def test_seed_abstraction1():
print 'seed: ' + str(peak1)
mean1 = seed.abstract(peak1)
print 'abstracted seed: ' + str(mean1)
return mean1
def test_wordification1():
# print 'mean: ' + str(mean1)
meanWords1 = align.wordify(mean1)
# print 'mean words: ' + str(meanWords1)
return meanWords1
def test_align(peak1, peak2):
print align.align(peak1,align.wordify(seed.abstract(peak2)))
def test_align1():
print 'peak: ' + str(peak1)
print 'mean: ' + str(mean1)
(i, score) = align.align(peak1,meanWords1)
print 'index is ' + str(i) + ', should be 0?'
print 'score is ' + str(score)
return
def test_pickInitMeans():
peaks = [peak1,peak2,peak3,peak4,peak5,peak6]
print seed.pickInitMeans(peaks,3)
print ['test_start \n']
# mean1 = test_seed_abstraction()
# print '\n'
# meanWords1 = test_wordification()
# print '\n'
test_align(peak1,peak1)
test_align(peak2,peak2)
test_align(peak3,peak3)
print '\n'
# test_pickInitMeans()
# input_loc = str(sys.argv[1])
# output_loc = str(sys.argv[2])
# out.writeOutput(output_loc, main.main(load.process_Generated(input_loc)))
print ['test_end']