6
|
1 from SMART.Java.Python.misc import Utils
|
|
2
|
|
3 class MockFindOverlapsWithOneInterval (object) :
|
|
4 def write(self, inFileName):
|
|
5 Utils.writeFile(inFileName, "chr1\ttest\ttest1.1\t0\t1000\t.\t+\t.\tID=test1.1;Name=test1.1\n")
|
|
6
|
|
7 class MockFindOverlapsWithServeralIntervals_case1 (object) :
|
|
8 def write(self,inFileName):
|
|
9 f = open(inFileName, "w")
|
|
10 f.write("chr1\ttest\ttest1.1\t0\t1000\t1001\t+\t.\tID=test1.1;Name=test1.1\n")
|
|
11 f.write("chr1\ttest\ttest1.2\t50\t350\t301\t+\t.\tID=test1.2;Name=test1.2\n")
|
|
12 f.write("chr1\ttest\ttest1.3\t100\t600\t501\t+\t.\tID=test1.3;Name=test1.3\n")
|
|
13 f.write("chr1\ttest\ttest1.4\t200\t450\t251\t+\t.\tID=test1.4;Name=test1.4\n")
|
|
14 f.write("chr1\ttest\ttest1.5\t700\t950\t251\t+\t.\tID=test1.5;Name=test1.5\n")
|
|
15 f.write("chr1\ttest\ttest1.6\t800\t900\t101\t+\t.\tID=test1.6;Name=test1.6\n")
|
|
16 f.write("chr1\ttest\ttest1.7\t1200\t1300\t101\t+\t.\tID=test1.7;Name=test1.7\n")
|
|
17 f.close()
|
|
18
|
|
19 class MockFindOverlapsWithServeralIntervals_case2 (object) :
|
|
20 def write(self,inFileName):
|
|
21 f = open(inFileName,'w')
|
|
22 f.write("chr1\ttest\ttest2.1\t0\t500\t501\t+\t.\tID=test2.1;Name=test2.1\n")
|
|
23 f.write("chr1\ttest\ttest2.2\t50\t450\t401\t+\t.\tID=test2.2;Name=test2.2\n")
|
|
24 f.write("chr1\ttest\ttest2.3\t100\t400\t301\t+\t.\tID=test2.3;Name=test2.3\n")
|
|
25 f.write("chr1\ttest\ttest2.4\t100\t200\t101\t+\t.\tID=test2.4;Name=test2.4\n")
|
|
26 f.write("chr1\ttest\ttest2.5\t900\t1200\t301\t+\t.\tID=test2.5;Name=test2.5\n")
|
|
27 f.close()
|
|
28
|
|
29 class MockFindOverlapsWithServeralIntervals_case3 (object) :
|
|
30 def write(self,inFileName):
|
|
31 f = open(inFileName,'w')
|
|
32 f.write("chr1\ttest\ttest3.1\t0\t500\t501\t+\t.\tID=test3.1;Name=test3.1\n")
|
|
33 f.write("chr1\ttest\ttest3.2\t50\t450\t401\t+\t.\tID=test3.2;Name=test3.2\n")
|
|
34 f.write("chr1\ttest\ttest3.3\t100\t400\t301\t+\t.\tID=test3.3;Name=test3.3\n")
|
|
35 f.write("chr1\ttest\ttest3.4\t100\t200\t101\t+\t.\tID=test3.4;Name=test3.4\n")
|
|
36 f.write("chr1\ttest\ttest3.5\t300\t400\t101\t+\t.\tID=test3.5;Name=test3.5\n")
|
|
37 f.write("chr1\ttest\ttest3.6\t800\t1000\t201\t+\t.\tID=test3.6;Name=test3.6\n")
|
|
38 f.close()
|
|
39
|
|
40 class MockFindOverlapsWithServeralIntervals_case4_5 (object) :
|
|
41 def write(self,inFileName):
|
|
42 f = open(inFileName,'w')
|
|
43 f.write("chr1\ttest\ttest4.1\t0\t1000\t1001\t+\t.\tID=test4.1;Name=test4.1\n")
|
|
44 f.write("chr1\ttest\ttest4.2\t200\t800\t601\t+\t.\tID=test4.2;Name=test4.2\n")
|
|
45 f.write("chr1\ttest\ttest4.3\t400\t600\t201\t+\t.\tID=test4.3;Name=test4.3\n")
|
|
46 f.close()
|
|
47
|
|
48 class MockFindOverlapsWithServeralIntervals_case6_7 (object) :
|
|
49 def write(self,inFileName):
|
|
50 f = open(inFileName,'w')
|
|
51 f.write("chr1\ttest\ttest6.1\t0\t1000\t1001\t+\t.\tID=test6.1;Name=test6.1\n")
|
|
52 f.write("chr1\ttest\ttest6.2\t100\t300\t201\t+\t.\tID=test6.2;Name=test6.2\n")
|
|
53 f.write("chr1\ttest\ttest6.3\t400\t500\t101\t+\t.\tID=test6.3;Name=test6.3\n")
|
|
54 f.write("chr1\ttest\ttest6.4\t510\t520\t11\t+\t.\tID=test6.4;Name=test6.4\n")
|
|
55 f.write("chr1\ttest\ttest6.5\t850\t950\t001\t+\t.\tID=test6.5;Name=test6.5\n")
|
|
56 f.close()
|
|
57
|
|
58 class MockFindOverlapsWithServeralIntervals_case8 (object) :
|
|
59 def write(self,inFileName):
|
|
60 f = open(inFileName,'w')
|
|
61 f.write("chr1\ttest\ttest8.1\t0\t1000\t1001\t+\t.\tID=test8.1;Name=test8.1\n")
|
|
62 f.write("chr1\ttest\ttest8.2\t100\t200\t101\t+\t.\tID=test8.2;Name=test8.2\n")
|
|
63 f.write("chr1\ttest\ttest8.3\t300\t400\t101\t+\t.\tID=test8.3;Name=test8.3\n")
|
|
64 f.close()
|
|
65
|
|
66 class MockFindOverlapsWithServeralIntervals_case9 (object) :
|
|
67 def write(self,inFileName):
|
|
68 f = open(inFileName,'w')
|
|
69 f.write("chr1\ttest\ttest9.1\t0\t1000\t1001\t+\t.\tID=test9.1;Name=test9.1\n")
|
|
70 f.write("chr1\ttest\ttest9.2\t600\t700\t101\t+\t.\tID=test9.2;Name=test9.2\n")
|
|
71 f.write("chr1\ttest\ttest9.3\t800\t1200\t401\t+\t.\tID=test9.3;Name=test9.3\n")
|
|
72 f.close()
|
|
73
|
|
74 class MockFindOverlapsWithServeralIntervals_case10 (object) :
|
|
75 def write(self,inFileName):
|
|
76 f = open(inFileName,'w')
|
|
77 f.write("chr1\ttest\ttest10.1\t0\t1000\t1001\t+\t.\tID=test10.1;Name=test10.1\n")
|
|
78 f.write("chr1\ttest\ttest10.2\t100\t200\t101\t+\t.\tID=test10.2;Name=test10.2\n")
|
|
79 f.write("chr1\ttest\ttest10.3\t300\t400\t101\t+\t.\tID=test10.3;Name=test10.3\n")
|
|
80 f.write("chr1\ttest\ttest10.4\t500\t600\t101\t+\t.\tID=test10.4;Name=test10.4\n")
|
|
81 f.write("chr1\ttest\ttest10.5\t1200\t1300\t101\t+\t.\tID=test10.5;Name=test10.5\n")
|
|
82 f.write("chr1\ttest\ttest10.6\t1400\t1500\t101\t+\t.\tID=test10.6;Name=test10.6\n")
|
|
83 f.close()
|
|
84
|
|
85 class MockFindOverlapsWithServeralIntervals_case11 (object) :
|
|
86 def write(self,inFileName):
|
|
87 f = open(inFileName,'w')
|
|
88 f.write("chr1\ttest\ttest11.1\t0\t500\t501\t+\t.\tID=test11.1;Name=test11.1\n")
|
|
89 f.write("chr1\ttest\ttest11.2\t100\t200\t101\t+\t.\tID=test11.2;Name=test11.2\n")
|
|
90 f.write("chr1\ttest\ttest11.3\t300\t400\t101\t+\t.\tID=test11.3;Name=test11.3\n")
|
|
91 f.write("chr1\ttest\ttest11.4\t700\t900\t201\t+\t.\tID=test11.4;Name=test11.4\n")
|
|
92 f.write("chr1\ttest\ttest11.5\t710\t720\t11\t+\t.\tID=test11.5;Name=test11.5\n")
|
|
93 f.write("chr1\ttest\ttest11.6\t740\t750\t11\t+\t.\tID=test11.6;Name=test11.6\n")
|
|
94 f.close()
|
|
95
|
|
96 class MockFindOverlapsWithServeralIntervals_case12 (object) :
|
|
97 def write(self,inFileName):
|
|
98 f = open(inFileName,'w')
|
|
99 f.write("chr1\ttest\ttest12.1\t0\t1400\t.\t+\t.\tID=test12.1;Name=test12.1\n")
|
|
100 f.write("chr1\ttest\ttest12.2\t300\t500\t.\t+\t.\tID=test12.2;Name=test12.2\n")
|
|
101 f.write("chr1\ttest\ttest12.3\t300\t500\t.\t+\t.\tID=test12.3;Name=test12.3\n")
|
|
102 f.write("chr1\ttest\ttest12.4\t800\t1100\t.\t+\t.\tID=test12.4;Name=test12.4\n")
|
|
103 f.write("chr1\ttest\ttest12.5\t1200\t1300\t.\t+\t.\tID=test12.5;Name=test12.5\n")
|
|
104 f.close()
|
|
105
|
|
106 class MockFindOverlapsWithServeralIntervals_query_case1 (object):
|
|
107 def write(self, fileName):
|
|
108 f = open(fileName, 'w')
|
|
109 f.write("chr1\tquery\tquery1.1\t25\t150\t126\t+\t.\tID=query_1;Name=query1.1\n")
|
|
110 f.write("chr1\tquery\tquery1.2\t70\t850\t781\t+\t.\tID=query_2;Name=query1.2\n")
|
|
111 f.write("chr1\tquery\tquery1.3\t550\t850\t201\t+\t.\tID=query_3;Name=query1.3\n")
|
|
112 f.write("chr1\tquery\tquery1.4\t925\t1025\t101\t+\t.\tID=query_4;Name=query1.4\n")
|
|
113 f.write("chr1\tquery\tquery1.5\t1201\t1210\t10\t+\t.\tID=query_5;Name=query1.5\n")
|
|
114 f.write("chr1\tquery\tquery1.6\t1500\t1600\t101\t+\t.\tID=query_6;Name=query1.6\n")
|
|
115 f.close()
|
|
116
|
|
117 class MockFindOverlapsWithServeralIntervals_query_case2 (object):
|
|
118 def write(self, fileName):
|
|
119 f = open(fileName, 'w')
|
|
120 f.write("chr1\tquery\tquery2.1\t150\t300\t151\t+\t.\tID=query_1;Name=query2.1\n")
|
|
121 f.write("chr1\tquery\tquery2.2\t300\t450\t151\t+\t.\tID=query_2;Name=query2.2\n")
|
|
122 f.write("chr1\tquery\tquery2.3\t480\t800\t321\t+\t.\tID=query_3;Name=query2.3\n")
|
|
123 f.write("chr1\tquery\tquery2.4\t560\t800\t241\t+\t.\tID=query_4;Name=query2.4\n")
|
|
124 f.write("chr1\tquery\tquery2.5\t850\t1000\t151\t+\t.\tID=query_5;Name=query2.5\n")
|
|
125 f.close()
|
|
126
|
|
127 class MockFindOverlapsWithServeralIntervals_query_case3 (object):
|
|
128 def write(self, fileName):
|
|
129 f = open(fileName, 'w')
|
|
130 f.write("chr1\tquery\tquery3.1\t150\t250\t101\t+\t.\tID=query_1;Name=query3.1\n")
|
|
131 f.write("chr1\tquery\tquery3.2\t380\t400\t21\t+\t.\tID=query_2;Name=query3.2\n")
|
|
132 f.write("chr1\tquery\tquery3.3\t480\t520\t41\t+\t.\tID=query_3;Name=query3.3\n")
|
|
133 f.write("chr1\tquery\tquery3.4\t510\t700\t191\t+\t.\tID=query_4;Name=query3.4\n")
|
|
134 f.write("chr1\tquery\tquery3.5\t900\t950\t41\t+\t.\tID=query_5;Name=query3.5\n")
|
|
135 f.close()
|
|
136
|
|
137 class MockFindOverlapsWithServeralIntervals_query_case4 (object):
|
|
138 def write(self, fileName):
|
|
139 f = open(fileName, 'w')
|
|
140 f.write("chr1\tquery\tquery4.1\t400\t500\t101\t+\t.\tID=query_1;Name=query4.1\n")
|
|
141 f.write("chr1\tquery\tquery4.2\t450\t600\t151\t+\t.\tID=query_2;Name=query4.2\n")
|
|
142 f.write("chr1\tquery\tquery4.3\t700\t800\t101\t+\t.\tID=query_3;Name=query4.3\n")
|
|
143 f.close()
|
|
144
|
|
145 class MockFindOverlapsWithServeralIntervals_query_case5 (object):
|
|
146 def write(self, fileName):
|
|
147 f = open(fileName, 'w')
|
|
148 f.write("chr1\tquery\tquery5.1\t850\t950\t101\t+\t.\tID=query_1;Name=query5.1\n")
|
|
149 f.close()
|
|
150
|
|
151 class MockFindOverlapsWithServeralIntervals_query_case6 (object):
|
|
152 def write(self, fileName):
|
|
153 f = open(fileName, 'w')
|
|
154 f.write("chr1\tquery\tquery6.1\t200\t300\t101\t+\t.\tID=query_1;Name=query6.1\n")
|
|
155 f.write("chr1\tquery\tquery6.2\t800\t900\t101\t+\t.\tID=query_2;Name=query6.2\n")
|
|
156 f.close()
|
|
157
|
|
158 class MockFindOverlapsWithServeralIntervals_query_case7 (object):
|
|
159 def write(self, fileName):
|
|
160 f = open(fileName, 'w')
|
|
161 f.write("chr1\tquery\tquery6.1\t530\t550\t21\t+\t.\tID=query_1;Name=query6.1\n")
|
|
162 f.write("chr1\tquery\tquery6.2\t600\t700\t101\t+\t.\tID=query_2;Name=query6.2\n")
|
|
163 f.write("chr1\tquery\tquery6.3\t650\t900\t251\t+\t.\tID=query_3;Name=query6.3\n")
|
|
164 f.close()
|
|
165
|
|
166 class MockFindOverlapsWithServeralIntervals_query_case8 (object):
|
|
167 def write(self, fileName):
|
|
168 f = open(fileName, 'w')
|
|
169 f.write("chr1\tquery\tquery7.1\t500\t600\t101\t+\t.\tID=query_1;Name=query7.1\n")
|
|
170 f.write("chr1\tquery\tquery7.2\t700\t800\t101\t+\t.\tID=query_2;Name=query7.2\n")
|
|
171 f.write("chr1\tquery\tquery7.3\t900\t1100\t201\t+\t.\tID=query_3;Name=query7.3\n")
|
|
172 f.write("chr1\tquery\tquery7.4\t1200\t1300\t101\t+\t.\tID=query_4;Name=query7.4\n")
|
|
173 f.close()
|
|
174
|
|
175 class MockFindOverlapsWithServeralIntervals_query_case9 (object):
|
|
176 def write(self, fileName):
|
|
177 f = open(fileName, 'w')
|
|
178 f.write("chr1\tquery\tquery8.1\t400\t400\t101\t+\t.\tID=query_1;Name=query8.1\n")
|
|
179 f.write("chr1\tquery\tquery8.2\t550\t650\t101\t+\t.\tID=query_2;Name=query8.2\n")
|
|
180 f.close()
|
|
181
|
|
182 class MockFindOverlapsWithServeralIntervals_query_case10 (object):
|
|
183 def write(self, fileName):
|
|
184 f = open(fileName, 'w')
|
|
185 f.write("chr1\tquery\tquery10.1\t700\t800\t101\t+\t.\tID=query_1;Name=query10.1\n")
|
|
186 f.write("chr1\tquery\tquery10.2\t900\t1000\t101\t+\t.\tID=query_2;Name=query10.2\n")
|
|
187 f.write("chr1\tquery\tquery10.3\t1100\t1300\t201\t+\t.\tID=query_3;Name=query10.3\n")
|
|
188 f.close()
|
|
189
|
|
190 class MockFindOverlapsWithServeralIntervals_query_case11 (object):
|
|
191 def write(self, fileName):
|
|
192 f = open(fileName, 'w')
|
|
193 f.write("chr1\tquery\tquery11.1\t420\t480\t61\t+\t.\tID=query_1;Name=query11.1\n")
|
|
194 f.write("chr1\tquery\tquery11.2\t450\t715\t266\t+\t.\tID=query_2;Name=query11.2\n")
|
|
195 f.close()
|
|
196
|
|
197
|