Mercurial > repos > yufei-luo > s_mart
comparison commons/tools/tests/Test_F_MergeMatchsFiles.py @ 18:94ab73e8a190
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 29 Apr 2013 03:20:15 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:b0e8584489e6 | 18:94ab73e8a190 |
---|---|
1 import os | |
2 import unittest | |
3 from commons.core.utils.FileUtils import FileUtils | |
4 from commons.tools.MergeMatchsFiles import MergeMatchsFiles | |
5 | |
6 | |
7 class Test_F_MergeMatchsFiles(unittest.TestCase): | |
8 | |
9 def test_run_set(self): | |
10 inFileName1 = "test1.set" | |
11 inFileName2 = "test2.set" | |
12 self._writeSetFiles(inFileName1, inFileName2) | |
13 iMMF = MergeMatchsFiles("set", "out") | |
14 iMMF.run() | |
15 obsFileName = "out.set" | |
16 expFileName = "exp.set" | |
17 self._writeExpSetFile(expFileName) | |
18 self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName)) | |
19 os.remove(expFileName) | |
20 os.remove(obsFileName) | |
21 | |
22 def test_run_align(self): | |
23 inFileName1 = "test1.align" | |
24 inFileName2 = "test2.align" | |
25 self._writeAlignFiles(inFileName1, inFileName2) | |
26 iMMF = MergeMatchsFiles("align", "out") | |
27 iMMF.run() | |
28 obsFileName = "out.align" | |
29 expFileName = "exp.align" | |
30 self._writeExpAlignFile(expFileName) | |
31 self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName)) | |
32 os.remove(expFileName) | |
33 os.remove(obsFileName) | |
34 | |
35 def test_run_align_allByAll(self): | |
36 inFileName1 = "test1.align" | |
37 inFileName2 = "test2.align" | |
38 self._writeAlignFiles(inFileName1, inFileName2) | |
39 iMMF = MergeMatchsFiles("align", "out", True) | |
40 iMMF.run() | |
41 obsFileName = "out.align" | |
42 expFileName = "exp.align" | |
43 self._writeExpAlignFile_allByAll(expFileName) | |
44 self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName)) | |
45 os.remove(expFileName) | |
46 os.remove(obsFileName) | |
47 | |
48 def test_run_path(self): | |
49 inFileName1 = "test1.path" | |
50 inFileName2 = "test2.path" | |
51 self._writePathFiles(inFileName1, inFileName2) | |
52 iMMF = MergeMatchsFiles("path", "out") | |
53 iMMF.run() | |
54 obsFileName = "out.path" | |
55 expFileName = "exp.path" | |
56 self._writeExpPathFile(expFileName) | |
57 self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName)) | |
58 os.remove(expFileName) | |
59 os.remove(obsFileName) | |
60 | |
61 def test_run_tab(self): | |
62 inFileName1 = "test1.tab" | |
63 inFileName2 = "test2.tab" | |
64 self._writeTabFiles(inFileName1, inFileName2) | |
65 iMMF = MergeMatchsFiles("tab", "out") | |
66 iMMF.run() | |
67 obsFileName = "out.tab" | |
68 expFileName = "exp.tab" | |
69 self._writeExpTabFile(expFileName) | |
70 self.assertTrue(FileUtils.are2FilesIdentical(expFileName, obsFileName)) | |
71 os.remove(expFileName) | |
72 os.remove(obsFileName) | |
73 | |
74 def _writeSetFiles(self, fileName1, fileName2): | |
75 f = open(fileName1, "w") | |
76 f.write("1\t(TCTAT)3\tchunk006\t295\t309\n") | |
77 f.write("2\t(A)33\tchunk006\t679\t711\n") | |
78 f.write("3\t(G)16\tchunk006\t731\t746\n") | |
79 f.write("4\t(GAG)9\tchunk006\t903\t929\n") | |
80 f.write("5\t(GGAGGG)4\tchunk006\t905\t929\n") | |
81 f.close() | |
82 f = open(fileName2, "w") | |
83 f.write("1\t(CCACT)3\tchunk011\t101\t116\n") | |
84 f.write("2\t(TATATA)7\tchunk011\t316\t357\n") | |
85 f.write("3\t(AT)22\tchunk011\t323\t366\n") | |
86 f.close() | |
87 | |
88 def _writeExpSetFile(self, fileName): | |
89 f = open(fileName, "w") | |
90 f.write("1\t(TCTAT)3\tchunk006\t295\t309\n") | |
91 f.write("2\t(A)33\tchunk006\t679\t711\n") | |
92 f.write("3\t(G)16\tchunk006\t731\t746\n") | |
93 f.write("4\t(GAG)9\tchunk006\t903\t929\n") | |
94 f.write("5\t(GGAGGG)4\tchunk006\t905\t929\n") | |
95 f.write("6\t(CCACT)3\tchunk011\t101\t116\n") | |
96 f.write("7\t(TATATA)7\tchunk011\t316\t357\n") | |
97 f.write("8\t(AT)22\tchunk011\t323\t366\n") | |
98 f.close() | |
99 | |
100 def _writeAlignFiles(self, fileName1, fileName2): | |
101 f = open(fileName1, "w") | |
102 f.write("chunk1\t25601\t27800\tchunk1\t52250\t54450\t0\t4244\t99.36\n") | |
103 f.write("chunk1\t27791\t28620\tchunk1\t55918\t56749\t0\t1588\t99.16\n") | |
104 f.write("chunk1\t28618\t32380\tchunk1\t56794\t60572\t0\t7299\t99.29\n") | |
105 f.write("chunk1\t28692\t30872\tchunk1\t49901\t52081\t0\t4260\t99.63\n") | |
106 f.write("chunk1\t32216\t34275\tchunk1\t52084\t54143\t0\t4012\t99.56\n") | |
107 f.write("chunk1\t41016\t45652\tchunk1\t55918\t60572\t0\t8942\t99.18\n") | |
108 f.write("chunk1\t41964\t44144\tchunk1\t49901\t52081\t0\t4252\t99.59\n") | |
109 f.write("chunk1\t46237\t46863\tchunk1\t73980\t74625\t0\t837\t91.36\n") | |
110 f.write("chunk1\t46330\t46860\tchunk1\t54981\t54450\t0\t841\t95.11\n") | |
111 f.write("chunk1\t46861\t48962\tchunk1\t52349\t54450\t0\t4103\t99.62\n") | |
112 f.write("chunk1\t48953\t50000\tchunk1\t55918\t56967\t0\t2036\t99.52\n") | |
113 f.write("chunk1\t49901\t52081\tchunk1\t28692\t30872\t0\t4260\t99.63\n") | |
114 f.write("chunk1\t49901\t52081\tchunk1\t41964\t44144\t0\t4252\t99.59\n") | |
115 f.write("chunk1\t52084\t54143\tchunk1\t32216\t34275\t0\t4012\t99.56\n") | |
116 f.write("chunk1\t52250\t54450\tchunk1\t25601\t27800\t0\t4244\t99.36\n") | |
117 f.write("chunk1\t52349\t54450\tchunk1\t46861\t48962\t0\t4103\t99.62\n") | |
118 f.write("chunk1\t54450\t54980\tchunk1\t74622\t74091\t0\t769\t93.63\n") | |
119 f.write("chunk1\t54450\t54981\tchunk1\t46860\t46330\t0\t841\t95.11\n") | |
120 f.write("chunk1\t55918\t56749\tchunk1\t27791\t28620\t0\t1588\t99.16\n") | |
121 f.write("chunk1\t55918\t56967\tchunk1\t48953\t50000\t0\t2036\t99.52\n") | |
122 f.write("chunk1\t55918\t60572\tchunk1\t41016\t45652\t0\t8942\t99.18\n") | |
123 f.write("chunk1\t56794\t60572\tchunk1\t28618\t32380\t0\t7299\t99.29\n") | |
124 f.write("chunk1\t73980\t74625\tchunk1\t46237\t46863\t0\t837\t91.36\n") | |
125 f.write("chunk1\t74091\t74622\tchunk1\t54980\t54450\t0\t769\t93.63\n") | |
126 f.write("chunk1\t99211\t99791\tchunk1\t164000\t164577\t0\t767\t91.74\n") | |
127 f.write("chunk1\t101527\t102429\tchunk1\t167161\t168059\t0\t1074\t90.14\n") | |
128 f.write("chunk1\t164000\t164577\tchunk1\t99211\t99791\t0\t767\t91.74\n") | |
129 f.write("chunk1\t167161\t168059\tchunk1\t101527\t102429\t0\t1074\t90.14\n") | |
130 f.write("chunk1\t46330\t46862\tchunk6\t2564\t3101\t0\t835\t94.8\n") | |
131 f.write("chunk1\t46372\t46862\tchunk6\t5328\t4837\t0\t753\t94.51\n") | |
132 f.write("chunk1\t54450\t54915\tchunk6\t4839\t5304\t0\t749\t95.28\n") | |
133 f.write("chunk1\t54450\t55021\tchunk6\t3099\t2524\t0\t878\t94.27\n") | |
134 f.write("chunk1\t54600\t55021\tchunk6\t25505\t25926\t0\t638\t94.08\n") | |
135 f.write("chunk1\t74091\t74624\tchunk6\t2565\t3101\t0\t898\t96.48\n") | |
136 f.write("chunk1\t74132\t74624\tchunk6\t5328\t4837\t0\t763\t94.95\n") | |
137 f.close() | |
138 f = open(fileName2, "w") | |
139 f.write("chunk6\t2524\t3099\tchunk1\t55021\t54450\t0\t878\t94.27\n") | |
140 f.write("chunk6\t2564\t3101\tchunk1\t46330\t46862\t0\t835\t94.8\n") | |
141 f.write("chunk6\t2565\t3101\tchunk1\t74091\t74624\t0\t898\t96.48\n") | |
142 f.write("chunk6\t4837\t5328\tchunk1\t46862\t46372\t0\t753\t94.51\n") | |
143 f.write("chunk6\t4837\t5328\tchunk1\t74624\t74132\t0\t763\t94.95\n") | |
144 f.write("chunk6\t4839\t5304\tchunk1\t54450\t54915\t0\t749\t95.28\n") | |
145 f.write("chunk6\t25505\t25926\tchunk1\t54600\t55021\t0\t638\t94.08\n") | |
146 f.write("chunk6\t1998\t2948\tchunk6\t26450\t25506\t0\t1758\t98.42\n") | |
147 f.write("chunk6\t2606\t3101\tchunk6\t5328\t4837\t0\t815\t95.77\n") | |
148 f.write("chunk6\t4837\t5328\tchunk6\t3101\t2606\t0\t815\t95.77\n") | |
149 f.write("chunk6\t25506\t26450\tchunk6\t2948\t1998\t0\t1758\t98.42\n") | |
150 f.write("chunk6\t95526\t96047\tchunk6\t115678\t116199\t0\t688\t92.19\n") | |
151 f.write("chunk6\t115678\t116199\tchunk6\t95526\t96047\t0\t688\t92.19\n") | |
152 f.close() | |
153 | |
154 def _writeExpAlignFile_allByAll(self, fileName): | |
155 f = open(fileName, "w") | |
156 f.write("chunk1\t25601\t27800\tchunk1\t52250\t54450\t0\t4244\t99.360000\n") | |
157 f.write("chunk1\t27791\t28620\tchunk1\t55918\t56749\t0\t1588\t99.160000\n") | |
158 f.write("chunk1\t28618\t32380\tchunk1\t56794\t60572\t0\t7299\t99.290000\n") | |
159 f.write("chunk1\t28692\t30872\tchunk1\t49901\t52081\t0\t4260\t99.630000\n") | |
160 f.write("chunk1\t32216\t34275\tchunk1\t52084\t54143\t0\t4012\t99.560000\n") | |
161 f.write("chunk1\t41016\t45652\tchunk1\t55918\t60572\t0\t8942\t99.180000\n") | |
162 f.write("chunk1\t41964\t44144\tchunk1\t49901\t52081\t0\t4252\t99.590000\n") | |
163 f.write("chunk1\t46237\t46863\tchunk1\t73980\t74625\t0\t837\t91.360000\n") | |
164 f.write("chunk1\t46330\t46860\tchunk1\t54981\t54450\t0\t841\t95.110000\n") | |
165 f.write("chunk1\t46861\t48962\tchunk1\t52349\t54450\t0\t4103\t99.620000\n") | |
166 f.write("chunk1\t48953\t50000\tchunk1\t55918\t56967\t0\t2036\t99.520000\n") | |
167 f.write("chunk1\t54450\t54980\tchunk1\t74622\t74091\t0\t769\t93.630000\n") | |
168 f.write("chunk1\t99211\t99791\tchunk1\t164000\t164577\t0\t767\t91.740000\n") | |
169 f.write("chunk1\t101527\t102429\tchunk1\t167161\t168059\t0\t1074\t90.140000\n") | |
170 f.write("chunk1\t46330\t46862\tchunk6\t2564\t3101\t0\t835\t94.800000\n") | |
171 f.write("chunk1\t46372\t46862\tchunk6\t5328\t4837\t0\t753\t94.510000\n") | |
172 f.write("chunk1\t54450\t54915\tchunk6\t4839\t5304\t0\t749\t95.280000\n") | |
173 f.write("chunk1\t54450\t55021\tchunk6\t3099\t2524\t0\t878\t94.270000\n") | |
174 f.write("chunk1\t54600\t55021\tchunk6\t25505\t25926\t0\t638\t94.080000\n") | |
175 f.write("chunk1\t74091\t74624\tchunk6\t2565\t3101\t0\t898\t96.480000\n") | |
176 f.write("chunk1\t74132\t74624\tchunk6\t5328\t4837\t0\t763\t94.950000\n") | |
177 f.write("chunk6\t1998\t2948\tchunk6\t26450\t25506\t0\t1758\t98.420000\n") | |
178 f.write("chunk6\t2606\t3101\tchunk6\t5328\t4837\t0\t815\t95.770000\n") | |
179 f.write("chunk6\t95526\t96047\tchunk6\t115678\t116199\t0\t688\t92.190000\n") | |
180 f.close() | |
181 | |
182 def _writeExpAlignFile(self, fileName): | |
183 f = open(fileName, "w") | |
184 f.write("chunk1\t25601\t27800\tchunk1\t52250\t54450\t0\t4244\t99.36\n") | |
185 f.write("chunk1\t27791\t28620\tchunk1\t55918\t56749\t0\t1588\t99.16\n") | |
186 f.write("chunk1\t28618\t32380\tchunk1\t56794\t60572\t0\t7299\t99.29\n") | |
187 f.write("chunk1\t28692\t30872\tchunk1\t49901\t52081\t0\t4260\t99.63\n") | |
188 f.write("chunk1\t32216\t34275\tchunk1\t52084\t54143\t0\t4012\t99.56\n") | |
189 f.write("chunk1\t41016\t45652\tchunk1\t55918\t60572\t0\t8942\t99.18\n") | |
190 f.write("chunk1\t41964\t44144\tchunk1\t49901\t52081\t0\t4252\t99.59\n") | |
191 f.write("chunk1\t46237\t46863\tchunk1\t73980\t74625\t0\t837\t91.36\n") | |
192 f.write("chunk1\t46330\t46860\tchunk1\t54981\t54450\t0\t841\t95.11\n") | |
193 f.write("chunk1\t46861\t48962\tchunk1\t52349\t54450\t0\t4103\t99.62\n") | |
194 f.write("chunk1\t48953\t50000\tchunk1\t55918\t56967\t0\t2036\t99.52\n") | |
195 f.write("chunk1\t49901\t52081\tchunk1\t28692\t30872\t0\t4260\t99.63\n") | |
196 f.write("chunk1\t49901\t52081\tchunk1\t41964\t44144\t0\t4252\t99.59\n") | |
197 f.write("chunk1\t52084\t54143\tchunk1\t32216\t34275\t0\t4012\t99.56\n") | |
198 f.write("chunk1\t52250\t54450\tchunk1\t25601\t27800\t0\t4244\t99.36\n") | |
199 f.write("chunk1\t52349\t54450\tchunk1\t46861\t48962\t0\t4103\t99.62\n") | |
200 f.write("chunk1\t54450\t54980\tchunk1\t74622\t74091\t0\t769\t93.63\n") | |
201 f.write("chunk1\t54450\t54981\tchunk1\t46860\t46330\t0\t841\t95.11\n") | |
202 f.write("chunk1\t55918\t56749\tchunk1\t27791\t28620\t0\t1588\t99.16\n") | |
203 f.write("chunk1\t55918\t56967\tchunk1\t48953\t50000\t0\t2036\t99.52\n") | |
204 f.write("chunk1\t55918\t60572\tchunk1\t41016\t45652\t0\t8942\t99.18\n") | |
205 f.write("chunk1\t56794\t60572\tchunk1\t28618\t32380\t0\t7299\t99.29\n") | |
206 f.write("chunk1\t73980\t74625\tchunk1\t46237\t46863\t0\t837\t91.36\n") | |
207 f.write("chunk1\t74091\t74622\tchunk1\t54980\t54450\t0\t769\t93.63\n") | |
208 f.write("chunk1\t99211\t99791\tchunk1\t164000\t164577\t0\t767\t91.74\n") | |
209 f.write("chunk1\t101527\t102429\tchunk1\t167161\t168059\t0\t1074\t90.14\n") | |
210 f.write("chunk1\t164000\t164577\tchunk1\t99211\t99791\t0\t767\t91.74\n") | |
211 f.write("chunk1\t167161\t168059\tchunk1\t101527\t102429\t0\t1074\t90.14\n") | |
212 f.write("chunk1\t46330\t46862\tchunk6\t2564\t3101\t0\t835\t94.8\n") | |
213 f.write("chunk1\t46372\t46862\tchunk6\t5328\t4837\t0\t753\t94.51\n") | |
214 f.write("chunk1\t54450\t54915\tchunk6\t4839\t5304\t0\t749\t95.28\n") | |
215 f.write("chunk1\t54450\t55021\tchunk6\t3099\t2524\t0\t878\t94.27\n") | |
216 f.write("chunk1\t54600\t55021\tchunk6\t25505\t25926\t0\t638\t94.08\n") | |
217 f.write("chunk1\t74091\t74624\tchunk6\t2565\t3101\t0\t898\t96.48\n") | |
218 f.write("chunk1\t74132\t74624\tchunk6\t5328\t4837\t0\t763\t94.95\n") | |
219 f.write("chunk6\t2524\t3099\tchunk1\t55021\t54450\t0\t878\t94.27\n") | |
220 f.write("chunk6\t2564\t3101\tchunk1\t46330\t46862\t0\t835\t94.8\n") | |
221 f.write("chunk6\t2565\t3101\tchunk1\t74091\t74624\t0\t898\t96.48\n") | |
222 f.write("chunk6\t4837\t5328\tchunk1\t46862\t46372\t0\t753\t94.51\n") | |
223 f.write("chunk6\t4837\t5328\tchunk1\t74624\t74132\t0\t763\t94.95\n") | |
224 f.write("chunk6\t4839\t5304\tchunk1\t54450\t54915\t0\t749\t95.28\n") | |
225 f.write("chunk6\t25505\t25926\tchunk1\t54600\t55021\t0\t638\t94.08\n") | |
226 f.write("chunk6\t1998\t2948\tchunk6\t26450\t25506\t0\t1758\t98.42\n") | |
227 f.write("chunk6\t2606\t3101\tchunk6\t5328\t4837\t0\t815\t95.77\n") | |
228 f.write("chunk6\t4837\t5328\tchunk6\t3101\t2606\t0\t815\t95.77\n") | |
229 f.write("chunk6\t25506\t26450\tchunk6\t2948\t1998\t0\t1758\t98.42\n") | |
230 f.write("chunk6\t95526\t96047\tchunk6\t115678\t116199\t0\t688\t92.19\n") | |
231 f.write("chunk6\t115678\t116199\tchunk6\t95526\t96047\t0\t688\t92.19\n") | |
232 f.close() | |
233 | |
234 def _writePathFiles(self, fileName1, fileName2): | |
235 f = open(fileName1, "w") | |
236 f.write("1\tchunk001\t11046\t11071\tAT_rich#Low_complexity\t166\t141\t0.0\t9\t34.62\n") | |
237 f.write("2\tchunk001\t11050\t11074\tAT_rich#Low_complexity\t161\t137\t0.0\t14\t56.0\n") | |
238 f.write("3\tchunk001\t17216\t17266\tAT_rich#Low_complexity\t144\t194\t0.0\t14\t29.41\n") | |
239 f.write("4\tchunk001\t17736\t17766\tAT_rich#Low_complexity\t118\t148\t0.0\t6\t22.58\n") | |
240 f.write("5\tchunk001\t18723\t18758\tAT_rich#Low_complexity\t110\t145\t0.0\t5\t13.89\n") | |
241 f.write("6\tchunk001\t20024\t20073\tAT_rich#Low_complexity\t125\t174\t0.0\t13\t26.0\n") | |
242 f.write("7\tchunk002\t12855\t12882\tAT_rich#Low_complexity\t131\t158\t0.0\t13\t46.43\n") | |
243 f.write("8\tchunk002\t20736\t20771\tAT_rich#Low_complexity\t135\t170\t0.0\t12\t36.11\n") | |
244 f.close() | |
245 f = open(fileName2, "w") | |
246 f.write("1\tchunk006\t12114\t12143\tAT_rich#Low_complexity\t146\t117\t0.0\t6\t20.0\n") | |
247 f.write("2\tchunk006\t25538\t25574\tAT_rich#Low_complexity\t128\t164\t0.0\t14\t37.84\n") | |
248 f.write("3\tchunk006\t25794\t25818\tAT_rich#Low_complexity\t162\t138\t0.0\t15\t60.0\n") | |
249 f.write("4\tchunk006\t28373\t28403\tAT_rich#Low_complexity\t135\t165\t0.0\t17\t54.84\n") | |
250 f.write("5\tchunk006\t29180\t29201\tAT_rich#Low_complexity\t163\t142\t0.0\t14\t68.18\n") | |
251 f.write("6\tchunk006\t33773\t33825\tAT_rich#Low_complexity\t142\t194\t0.0\t11\t22.64\n") | |
252 f.close() | |
253 | |
254 def _writeExpPathFile(self, fileName): | |
255 f = open(fileName, "w") | |
256 f.write("1\tchunk001\t11046\t11071\tAT_rich#Low_complexity\t166\t141\t0.0\t9\t34.62\n") | |
257 f.write("2\tchunk001\t11050\t11074\tAT_rich#Low_complexity\t161\t137\t0.0\t14\t56.0\n") | |
258 f.write("3\tchunk001\t17216\t17266\tAT_rich#Low_complexity\t144\t194\t0.0\t14\t29.41\n") | |
259 f.write("4\tchunk001\t17736\t17766\tAT_rich#Low_complexity\t118\t148\t0.0\t6\t22.58\n") | |
260 f.write("5\tchunk001\t18723\t18758\tAT_rich#Low_complexity\t110\t145\t0.0\t5\t13.89\n") | |
261 f.write("6\tchunk001\t20024\t20073\tAT_rich#Low_complexity\t125\t174\t0.0\t13\t26.0\n") | |
262 f.write("7\tchunk002\t12855\t12882\tAT_rich#Low_complexity\t131\t158\t0.0\t13\t46.43\n") | |
263 f.write("8\tchunk002\t20736\t20771\tAT_rich#Low_complexity\t135\t170\t0.0\t12\t36.11\n") | |
264 f.write("9\tchunk006\t12114\t12143\tAT_rich#Low_complexity\t146\t117\t0.0\t6\t20.0\n") | |
265 f.write("10\tchunk006\t25538\t25574\tAT_rich#Low_complexity\t128\t164\t0.0\t14\t37.84\n") | |
266 f.write("11\tchunk006\t25794\t25818\tAT_rich#Low_complexity\t162\t138\t0.0\t15\t60.0\n") | |
267 f.write("12\tchunk006\t28373\t28403\tAT_rich#Low_complexity\t135\t165\t0.0\t17\t54.84\n") | |
268 f.write("13\tchunk006\t29180\t29201\tAT_rich#Low_complexity\t163\t142\t0.0\t14\t68.18\n") | |
269 f.write("14\tchunk006\t33773\t33825\tAT_rich#Low_complexity\t142\t194\t0.0\t11\t22.64\n") | |
270 f.close() | |
271 | |
272 def _writeTabFiles(self, fileName1, fileName2): | |
273 f = open(fileName1, "w") | |
274 f.write("query.name\tquery.start\tquery.end\tquery.length\tquery.length.%\tmatch.length.%\tsubject.name\tsubject.start\tsubject.end\tsubject.length\tsubject.length.%\tE.value\tScore\tIdentity\tpath\n") | |
275 f.write("DmelChr4_bench_Blaster_Grouper_1_Map_3\t2\t542\t541\t0.998155\t0.32473\tTC1_DM:ClassII:TIR:Tc1-Mariner\t1\t543\t543\t0.32593\t1.4e-93\t984\t87.541\t1\n") | |
276 f.write("DmelChr4_bench_Blaster_Grouper_2_Map_8\t2\t517\t516\t0.998066\t0.115179\tPROTOP:ClassII:TIR:P\t530\t16\t515\t0.114955\t1.2e-79\t928\t95.2118\t2\n") | |
277 f.write("DmelChr4_bench_Blaster_Grouper_3_Map_20\t5\t598\t594\t0.978583\t0.537557\tPROTOP_A:ClassII:TIR:P\t572\t1\t572\t0.517647\t3e-93\t1048\t97.6307\t3\n") | |
278 f.write("DmelChr4_bench_Blaster_Grouper_4_Map_3\t5\t534\t530\t0.992509\t0.479638\tPROTOP_A:ClassII:TIR:P\t1105\t576\t530\t0.479638\t2.9e-87\t1828\t98.4848\t4\n") | |
279 f.write("DmelChr4_bench_Blaster_Grouper_5_Map_3\t5\t704\t700\t0.994318\t0.425791\tTC1-2_DM:ClassII:TIR:Tc1-Mariner\t1644\t945\t700\t0.425791\t7.3e-120\t1228\t98.1349\t5\n") | |
280 f.close() | |
281 f = open(fileName2, "w") | |
282 f.write("query.name\tquery.start\tquery.end\tquery.length\tquery.length.%\tmatch.length.%\tsubject.name\tsubject.start\tsubject.end\tsubject.length\tsubject.length.%\tE.value\tScore\tIdentity\tpath\n") | |
283 f.write("DmelChr4_bench_Blaster_Grouper_5_Map_3\t274\t702\t429\t0.609375\t1.26176\tTC1-2_DMp:ClassII:TIR:Tc1-Mariner\t340\t198\t143\t0.420588\t5e-74\t265\t98.6014\t1\n") | |
284 f.write("DmelChr4_bench_Blaster_Recon_12_Map_3\t311\t374\t64\t0.028021\t0.0359349\tBEL-27_AA-I_1p:ClassI:LTR:Bel-Pao\t605\t582\t24\t0.0134756\t6.3e-17\t11\t30.8511\t2\n") | |
285 f.write("DmelChr4_bench_Blaster_Recon_12_Map_3\t1472\t1552\t81\t0.0354641\t0.0463918\tBEL-76_AA-I_1p:ClassI:LTR:Bel-Pao\t79\t52\t28\t0.0160367\t1e-13\t8\t27.7778\t3\n") | |
286 f.close() | |
287 | |
288 def _writeExpTabFile(self, fileName): | |
289 f = open(fileName, "w") | |
290 f.write("query.name\tquery.start\tquery.end\tquery.length\tquery.length.%\tmatch.length.%\tsubject.name\tsubject.start\tsubject.end\tsubject.length\tsubject.length.%\tE.value\tScore\tIdentity\tpath\n") | |
291 f.write("DmelChr4_bench_Blaster_Grouper_1_Map_3\t2\t542\t541\t0.998155\t0.32473\tTC1_DM:ClassII:TIR:Tc1-Mariner\t1\t543\t543\t0.32593\t1.4e-93\t984\t87.541\t1\n") | |
292 f.write("DmelChr4_bench_Blaster_Grouper_2_Map_8\t2\t517\t516\t0.998066\t0.115179\tPROTOP:ClassII:TIR:P\t530\t16\t515\t0.114955\t1.2e-79\t928\t95.2118\t2\n") | |
293 f.write("DmelChr4_bench_Blaster_Grouper_3_Map_20\t5\t598\t594\t0.978583\t0.537557\tPROTOP_A:ClassII:TIR:P\t572\t1\t572\t0.517647\t3e-93\t1048\t97.6307\t3\n") | |
294 f.write("DmelChr4_bench_Blaster_Grouper_4_Map_3\t5\t534\t530\t0.992509\t0.479638\tPROTOP_A:ClassII:TIR:P\t1105\t576\t530\t0.479638\t2.9e-87\t1828\t98.4848\t4\n") | |
295 f.write("DmelChr4_bench_Blaster_Grouper_5_Map_3\t5\t704\t700\t0.994318\t0.425791\tTC1-2_DM:ClassII:TIR:Tc1-Mariner\t1644\t945\t700\t0.425791\t7.3e-120\t1228\t98.1349\t5\n") | |
296 f.write("DmelChr4_bench_Blaster_Grouper_5_Map_3\t274\t702\t429\t0.609375\t1.26176\tTC1-2_DMp:ClassII:TIR:Tc1-Mariner\t340\t198\t143\t0.420588\t5e-74\t265\t98.6014\t6\n") | |
297 f.write("DmelChr4_bench_Blaster_Recon_12_Map_3\t311\t374\t64\t0.028021\t0.0359349\tBEL-27_AA-I_1p:ClassI:LTR:Bel-Pao\t605\t582\t24\t0.0134756\t6.3e-17\t11\t30.8511\t7\n") | |
298 f.write("DmelChr4_bench_Blaster_Recon_12_Map_3\t1472\t1552\t81\t0.0354641\t0.0463918\tBEL-76_AA-I_1p:ClassI:LTR:Bel-Pao\t79\t52\t28\t0.0160367\t1e-13\t8\t27.7778\t8\n") | |
299 f.close() | |
300 | |
301 if __name__ == "__main__": | |
302 unittest.main() |