annotate SMART/Java/Python/test/Test_F_FindOverlapsOptim.py @ 18:94ab73e8a190

Uploaded
author m-zytnicki
date Mon, 29 Apr 2013 03:20:15 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
1 import unittest
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
2 import os
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
3 from SMART.Java.Python.misc import Utils
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
4 from commons.core.utils.FileUtils import FileUtils
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
5 from SMART.Java.Python.FindOverlapsOptim import FindOverlapsOptim
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
6 from SMART.Java.Python.ncList.test.MockFindOverlapsWithSeveralIntervals import *
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
7
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
8 class Test_F_FindOverlapsOptim(unittest.TestCase):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
9
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
10 def setUp(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
11 self._inputRefGff3FileName = 'sorted_Ref.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
12 self._writeGFF3File(self._inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
13 self._inputQueryGff3FileName = 'sorted_Query.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
14 self._writeQueryGff3File(self._inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
15 self._outputGff3FileName = 'output.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
16 self._expOutputFileName = 'expOutGff3.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
17
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
18 def tearDown(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
19 for fileName in (self._inputRefGff3FileName, self._inputQueryGff3FileName, self._outputGff3FileName, self._expOutputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
20 if os.path.exists(fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
21 os.remove(fileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
22
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
23 def test_run_general_asScript(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
24 cmd = 'python ../FindOverlapsOptim.py -i %s -f gff -j %s -g gff -o %s -v 0' % (self._inputQueryGff3FileName, self._inputRefGff3FileName, self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
25 os.system(cmd)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
26 self._writeExpOutFile_general(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
27 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
28
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
29 def test_run_overlap_special_case(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
30 inputQueryGff3FileName = 'query2.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
31 self._writeQueryGff3File2(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
32 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
33 iFOO.setRefFileName(self._inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
34 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
35 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
36 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
37 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
38 self._writeExpOutFile_special_case(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
39 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
40 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
41
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
42 def test_run_overlap_special_case_asScript(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
43 inputQueryGff3FileName = 'query2.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
44 self._writeQueryGff3File2(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
45 cmd = 'python ../FindOverlapsOptim.py -i %s -f gff -j %s -g gff -o %s -v 0' % (inputQueryGff3FileName, self._inputRefGff3FileName, self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
46 os.system(cmd)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
47 self._writeExpOutFile_special_case(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
48 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
49 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
50
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
51 def test_case_2(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
52 inputRefGff3FileName = 'ref_case2.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
53 iMock = MockFindOverlapsWithServeralIntervals_case2()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
54 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
55 inputQueryGff3FileName = 'query_case2.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
56 self._writeQueryGff3File_case2(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
57 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
58 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
59 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
60 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
61 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
62 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
63 self._writeExpOutFile_case2(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
64 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
65 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
66 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
67
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
68 def test_case_3(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
69 inputRefGff3FileName = 'ref_case3.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
70 iMock = MockFindOverlapsWithServeralIntervals_case3()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
71 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
72 inputQueryGff3FileName = 'query_case3.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
73 self._writeQueryGff3File_case3(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
74 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
75 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
76 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
77 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
78 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
79 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
80 self._writeExpOutFile_case3(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
81 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
82 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
83 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
84
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
85 def test_case_4(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
86 inputRefGff3FileName = 'ref_case4.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
87 iMock = MockFindOverlapsWithServeralIntervals_case4_5()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
88 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
89 inputQueryGff3FileName = 'query_case4.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
90 self._writeQueryGff3File_case4(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
91 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
92 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
93 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
94 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
95 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
96 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
97 self._writeExpOutFile_case4(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
98 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
99 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
100 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
101
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
102 def test_case_5(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
103 inputRefGff3FileName = 'ref_case5.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
104 iMock = MockFindOverlapsWithServeralIntervals_case4_5()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
105 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
106 inputQueryGff3FileName = 'query_case5.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
107 self._writeQueryGff3File_case5(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
108 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
109 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
110 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
111 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
112 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
113 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
114 self._writeExpOutFile_case5(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
115 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
116 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
117 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
118
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
119 def test_case_6(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
120 inputRefGff3FileName = 'ref_case6.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
121 iMock = MockFindOverlapsWithServeralIntervals_case6_7()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
122 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
123 inputQueryGff3FileName = 'query_case6.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
124 self._writeQueryGff3File_case6(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
125 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
126 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
127 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
128 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
129 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
130 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
131 self._writeExpOutFile_case6(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
132 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
133 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
134 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
135
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
136 def test_case_7(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
137 inputRefGff3FileName = 'ref_case7.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
138 iMock = MockFindOverlapsWithServeralIntervals_case6_7()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
139 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
140 inputQueryGff3FileName = 'query_case7.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
141 self._writeQueryGff3File_case7(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
142 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
143 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
144 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
145 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
146 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
147 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
148 self._writeExpOutFile_case7(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
149 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
150 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
151 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
152
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
153 def test_case_8(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
154 inputRefGff3FileName = 'ref_case8.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
155 iMock = MockFindOverlapsWithServeralIntervals_case8()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
156 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
157 inputQueryGff3FileName = 'query_case8.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
158 self._writeQueryGff3File_case8(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
159 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
160 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
161 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
162 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
163 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
164 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
165 self._writeExpOutFile_case8(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
166 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
167 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
168 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
169
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
170 def test_case_9(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
171 inputRefGff3FileName = 'ref_case9.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
172 iMock = MockFindOverlapsWithServeralIntervals_case9()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
173 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
174 inputQueryGff3FileName = 'query_case9.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
175 self._writeQueryGff3File_case9(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
176 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
177 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
178 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
179 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
180 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
181 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
182 self._writeExpOutFile_case9(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
183 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
184 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
185 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
186
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
187 def test_case_10(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
188 inputRefGff3FileName = 'ref_case10.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
189 iMock = MockFindOverlapsWithServeralIntervals_case10()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
190 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
191 inputQueryGff3FileName = 'query_case10.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
192 self._writeQueryGff3File_case10(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
193 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
194 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
195 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
196 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
197 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
198 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
199 self._writeExpOutFile_case10(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
200 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
201 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
202 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
203
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
204 def test_case_11(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
205 inputRefGff3FileName = 'ref_case11.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
206 iMock = MockFindOverlapsWithServeralIntervals_case11()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
207 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
208 inputQueryGff3FileName = 'query_case11.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
209 self._writeQueryGff3File_case11(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
210 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
211 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
212 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
213 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
214 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
215 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
216 self._writeExpOutFile_case11(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
217 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
218 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
219 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
220
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
221 def test_case_12(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
222 inputRefGff3FileName = 'ref_case12.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
223 iMock = MockFindOverlapsWithServeralIntervals_case12()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
224 iMock.write(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
225 inputQueryGff3FileName = 'query_case12.gff3'
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
226 self._writeQueryGff3File_case12(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
227 iFOO = FindOverlapsOptim(0)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
228 iFOO.setRefFileName(inputRefGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
229 iFOO.setQueryFileName(inputQueryGff3FileName, "gff")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
230 iFOO.setOutputFileName(self._outputGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
231 iFOO.run()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
232 iFOO.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
233 self._writeExpOutFile_case12(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
234 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputGff3FileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
235 os.remove(inputQueryGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
236 os.remove(inputRefGff3FileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
237
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
238 def _writeExpOutFile_special_case(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
239 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
240 f.write("chr1\tS-MART\ttest2\t1250\t1300\t781\t+\t.\tnbOverlaps=1;overlapsWith=test2.7;ID=query_2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
241 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
242
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
243 def _writeExpOutFile_general(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
244 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
245 f.write("""chr1 S-MART test1.1 25 150 126 + . nbOverlaps=3;overlapsWith=test2.1--test2.2--test2.3;ID=query_1;Name=test1.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
246 chr1 S-MART test1.2 70 850 781 + . nbOverlaps=6;overlapsWith=test2.1--test2.2--test2.3--test2.4--test2.5--test2.6;ID=query_2;Name=test1.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
247 chr1 S-MART test1.3 550 850 201 + . nbOverlaps=4;overlapsWith=test2.1--test2.3--test2.5--test2.6;ID=query_3;Name=test1.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
248 chr1 S-MART test1.4 925 1025 101 + . nbOverlaps=2;overlapsWith=test2.1--test2.5;ID=query_4;Name=test1.4
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
249 chr1 S-MART test1.5 1201 1210 10 + . nbOverlaps=1;overlapsWith=test2.7;ID=query_5;Name=test1.5
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
250 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
251 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
252
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
253 def _writeExpOutFile_cas_1(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
254 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
255 f.write("chr1\tS-MART\ttest2.1\t9\t1000\t1001\t+\t.\tName=test2.1;overlapsWith=query_3;ID=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
256 f.write("chr1\tS-MART\ttest2.3\t100\t600\t501\t+\t.\tName=test2.3;overlapsWith=query_3;ID=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
257 f.write("chr1\tS-MART\ttest2.5\t700\t950\t251\t+\t.\tName=test2.5;overlapsWith=query_3;ID=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
258 f.write("chr1\tS-MART\ttest2.6\t800\t900\t101\t+\t.\tName=test2.6;overlapsWith=query_3;ID=test2.6\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
259 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
260
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
261 def _writeExpOutFile_cas_2(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
262 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
263 f.write("chr1\tS-MART\ttest2.1\t9\t1000\t1001\t+\t.\tName=test2.1;overlapsWith=query_2;score=1001;feature=test2.1;ID=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
264 f.write("chr1\tS-MART\ttest2.2\t50\t350\t301\t+\t.\tName=test2.2;overlapsWith=query_2;score=301;feature=test2.2;ID=test2.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
265 f.write("chr1\tS-MART\ttest2.3\t100\t600\t501\t+\t.\tName=test2.3;overlapsWith=query_2;score=501;feature=test2.3;ID=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
266 f.write("chr1\tS-MART\ttest2.4\t200\t450\t251\t+\t.\tName=test2.4;overlapsWith=query_2;score=251;feature=test2.4;ID=test2.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
267 f.write("chr1\tS-MART\ttest2.5\t700\t950\t251\t+\t.\tName=test2.5;overlapsWith=query_2;score=251;feature=test2.5;ID=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
268 f.write("chr1\tS-MART\ttest2.6\t800\t900\t101\t+\t.\tName=test2.6;overlapsWith=query_2;score=101;feature=test2.6;ID=test2.6\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
269 f.write("chr1\tS-MART\ttest2.1\t9\t1000\t1001\t+\t.\tName=test2.1;overlapsWith=query_3;score=1001;feature=test2.1;ID=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
270 f.write("chr1\tS-MART\ttest2.3\t100\t600\t501\t+\t.\tName=test2.3;overlapsWith=query_3;score=501;feature=test2.3;ID=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
271 f.write("chr1\tS-MART\ttest2.5\t700\t950\t251\t+\t.\tName=test2.5;overlapsWith=query_3;score=251;feature=test2.5;ID=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
272 f.write("chr1\tS-MART\ttest2.6\t800\t900\t101\t+\t.\tName=test2.6;overlapsWith=query_3;score=101;feature=test2.6;ID=test2.6\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
273 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
274
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
275 def _writeExpOutFile_all_overlap(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
276 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
277 f.write("chr1\tS-MART\ttest2.1\t9\t1000\t1001\t+\t.\tName=test2.1;overlapsWith=query_2;score=1001;feature=test2.1;ID=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
278 f.write("chr1\tS-MART\ttest2.2\t50\t350\t301\t+\t.\tName=test2.2;overlapsWith=query_2;score=301;feature=test2.2;ID=test2.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
279 f.write("chr1\tS-MART\ttest2.3\t100\t600\t501\t+\t.\tName=test2.3;overlapsWith=query_2;score=501;feature=test2.3;ID=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
280 f.write("chr1\tS-MART\ttest2.4\t200\t450\t251\t+\t.\tName=test2.4;overlapsWith=query_2;score=251;feature=test2.4;ID=test2.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
281 f.write("chr1\tS-MART\ttest2.5\t700\t950\t251\t+\t.\tName=test2.5;overlapsWith=query_2;score=251;feature=test2.5;ID=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
282 f.write("chr1\tS-MART\ttest2.6\t800\t900\t101\t+\t.\tName=test2.6;overlapsWith=query_2;score=101;feature=test2.6;ID=test2.6\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
283 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
284
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
285 def _writeExpOutFile_overlap_to_children(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
286 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
287 f.write("chr1\tS-MART\ttest2.1\t9\t1000\t1001\t+\t.\tName=test2.1;overlapsWith=query_3;score=1001;feature=test2.1;ID=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
288 f.write("chr1\tS-MART\ttest2.3\t100\t600\t501\t+\t.\tName=test2.3;overlapsWith=query_3;score=501;feature=test2.3;ID=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
289 f.write("chr1\tS-MART\ttest2.5\t700\t950\t251\t+\t.\tName=test2.5;overlapsWith=query_3;score=251;feature=test2.5;ID=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
290 f.write("chr1\tS-MART\ttest2.6\t800\t900\t101\t+\t.\tName=test2.6;overlapsWith=query_3;score=101;feature=test2.6;ID=test2.6\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
291 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
292
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
293 def _writeExpOutFile_not_overlap_to_children(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
294 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
295 f.write("chr1\tS-MART\ttest2.1\t9\t1000\t1001\t+\t.\tName=test2.1;overlapsWith=query_1;score=1001;feature=test2.1;ID=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
296 f.write("chr1\tS-MART\ttest2.2\t50\t350\t301\t+\t.\tName=test2.2;overlapsWith=query_1;score=301;feature=test2.2;ID=test2.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
297 f.write("chr1\tS-MART\ttest2.3\t100\t600\t501\t+\t.\tName=test2.3;overlapsWith=query_1;score=501;feature=test2.3;ID=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
298 f.write("chr1\tS-MART\ttest2.1\t9\t1000\t1001\t+\t.\tName=test2.1;overlapsWith=query_4;score=1001;feature=test2.1;ID=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
299 f.write("chr1\tS-MART\ttest2.5\t700\t950\t251\t+\t.\tName=test2.5;overlapsWith=query_4;score=251;feature=test2.5;ID=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
300 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
301
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
302 def _writeExpOutFile_no_overlap_right(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
303 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
304 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
305
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
306 def _writeExpOutFile_one_overlap(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
307 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
308 f.write("chr1\tS-MART\ttest2.7\t1200\t1300\t101\t+\t.\tName=test2.7;overlapsWith=query_5;score=101;feature=test2.7;ID=test2.7\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
309 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
310
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
311 def _writeExpOutFile_case2(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
312 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
313 f.write("""chr1 S-MART test2.1 150 300 151 + . nbOverlaps=4;overlapsWith=test2.1--test2.2--test2.3--test2.4;ID=query_1;Name=test2.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
314 chr1 S-MART test2.2 300 450 781 + . nbOverlaps=3;overlapsWith=test2.1--test2.2--test2.3;ID=query_2;Name=test2.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
315 chr1 S-MART test2.3 480 800 321 + . nbOverlaps=1;overlapsWith=test2.1;ID=query_3;Name=test2.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
316 chr1 S-MART test2.5 850 1000 151 + . nbOverlaps=1;overlapsWith=test2.5;ID=query_5;Name=test2.5
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
317 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
318 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
319
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
320 def _writeExpOutFile_case3(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
321 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
322 f.write("""chr1 S-MART test3.1 150 250 101 + . nbOverlaps=4;overlapsWith=test3.1--test3.2--test3.3--test3.4;ID=query_1;Name=test3.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
323 chr1 S-MART test3.2 380 400 21 + . nbOverlaps=4;overlapsWith=test3.1--test3.2--test3.3--test3.5;ID=query_2;Name=test3.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
324 chr1 S-MART test3.3 480 520 41 + . nbOverlaps=1;overlapsWith=test3.1;ID=query_3;Name=test3.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
325 chr1 S-MART test3.5 900 950 51 + . nbOverlaps=1;overlapsWith=test3.6;ID=query_5;Name=test3.5
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
326 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
327 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
328
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
329 def _writeExpOutFile_case4(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
330 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
331 f.write("""chr1 S-MART test4.1 400 500 101 + . nbOverlaps=3;overlapsWith=test4.1--test4.2--test4.3;ID=query_1;Name=test4.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
332 chr1 S-MART test4.2 450 600 151 + . nbOverlaps=3;overlapsWith=test4.1--test4.2--test4.3;ID=query_2;Name=test4.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
333 chr1 S-MART test4.3 700 800 101 + . nbOverlaps=2;overlapsWith=test4.1--test4.2;ID=query_3;Name=test4.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
334 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
335 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
336
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
337 def _writeExpOutFile_case5(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
338 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
339 f.write("chr1 S-MART test5.1 850 950 101 + . nbOverlaps=1;overlapsWith=test4.1;ID=query_1;Name=test5.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
340 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
341
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
342 def _writeExpOutFile_case6(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
343 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
344 f.write("""chr1 S-MART test6.1 200 300 101 + . nbOverlaps=2;overlapsWith=test6.1--test6.2;ID=query_1;Name=test6.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
345 chr1 S-MART test6.2 800 900 101 + . nbOverlaps=2;overlapsWith=test6.1--test6.5;ID=query_2;Name=test6.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
346 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
347 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
348
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
349 def _writeExpOutFile_case7(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
350 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
351 f.write("""chr1 S-MART test7.1 530 550 21 + . nbOverlaps=1;overlapsWith=test6.1;ID=query_1;Name=test7.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
352 chr1 S-MART test7.2 600 700 101 + . nbOverlaps=1;overlapsWith=test6.1;ID=query_2;Name=test7.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
353 chr1 S-MART test7.3 650 900 251 + . nbOverlaps=2;overlapsWith=test6.1--test6.5;ID=query_3;Name=test7.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
354 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
355 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
356
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
357 def _writeExpOutFile_case8(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
358 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
359 f.write("""chr1 S-MART test8.1 500 600 101 + . nbOverlaps=1;overlapsWith=test8.1;ID=query_1;Name=test8.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
360 chr1 S-MART test8.2 700 800 101 + . nbOverlaps=1;overlapsWith=test8.1;ID=query_2;Name=test8.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
361 chr1 S-MART test8.3 900 1100 201 + . nbOverlaps=1;overlapsWith=test8.1;ID=query_3;Name=test8.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
362 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
363 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
364
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
365 def _writeExpOutFile_case9(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
366 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
367 f.write("""chr1 S-MART test9.1 400 500 101 + . nbOverlaps=1;overlapsWith=test9.1;ID=query_1;Name=test9.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
368 chr1 S-MART test9.2 550 650 101 + . nbOverlaps=2;overlapsWith=test9.1--test9.2;ID=query_2;Name=test9.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
369 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
370 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
371
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
372 def _writeExpOutFile_case10(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
373 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
374 f.write("""chr1 S-MART test10.1 700 800 101 + . nbOverlaps=1;overlapsWith=test10.1;ID=query_1;Name=test10.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
375 chr1 S-MART test10.2 900 1000 101 + . nbOverlaps=1;overlapsWith=test10.1;ID=query_2;Name=test10.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
376 chr1 S-MART test10.3 1100 1300 201 + . nbOverlaps=1;overlapsWith=test10.5;ID=query_3;Name=test10.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
377 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
378 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
379
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
380 def _writeExpOutFile_case11(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
381 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
382 f.write("""chr1 S-MART test11.1 420 480 61 + . nbOverlaps=1;overlapsWith=test11.1;ID=query_1;Name=test11.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
383 chr1 S-MART test11.2 450 715 266 + . nbOverlaps=3;overlapsWith=test11.1--test11.4--test11.5;ID=query_2;Name=test11.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
384 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
385 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
386
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
387 def _writeExpOutFile_case12(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
388 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
389 f.write("""chr1 S-MART test12.1 200 400 . + . nbOverlaps=3;overlapsWith=test12.1--test12.2--test12.3;ID=query_1;Name=test12.1
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
390 chr1 S-MART test12.2 600 900 . + . nbOverlaps=2;overlapsWith=test12.1--test12.4;ID=query_2;Name=test12.2
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
391 chr1 S-MART test12.3 700 1000 . + . nbOverlaps=2;overlapsWith=test12.1--test12.4;ID=query_3;Name=test12.3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
392 """)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
393 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
394
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
395 def _writeQueryGff3File2(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
396 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
397 f.write("chr1\tquery\ttest1\t1100\t1150\t126\t+\t.\tID=query_1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
398 f.write("chr1\tquery\ttest2\t1250\t1300\t781\t+\t.\tID=query_2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
399 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
400
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
401 def _writeQueryGff3File(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
402 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
403 f.write("chr1\tquery\ttest1.1\t25\t150\t126\t+\t.\tID=query_1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
404 f.write("chr1\tquery\ttest1.2\t70\t850\t781\t+\t.\tID=query_2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
405 f.write("chr1\tquery\ttest1.3\t550\t850\t201\t+\t.\tID=query_3;Name=test1.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
406 f.write("chr1\tquery\ttest1.4\t925\t1025\t101\t+\t.\tID=query_4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
407 f.write("chr1\tquery\ttest1.5\t1201\t1210\t10\t+\t.\tID=query_5;Name=test1.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
408 f.write("chr1\tquery\ttest1.6\t1500\t1600\t101\t+\t.\tID=query_6;Name=test1.6\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
409 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
410
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
411 def _writeQueryGff3File_case2(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
412 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
413 f.write("chr1\tquery\ttest2.1\t150\t300\t151\t+\t.\tID=query_1;Name=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
414 f.write("chr1\tquery\ttest2.2\t300\t450\t781\t+\t.\tID=query_2;Name=test2.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
415 f.write("chr1\tquery\ttest2.3\t480\t800\t321\t+\t.\tID=query_3;Name=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
416 f.write("chr1\tquery\ttest2.4\t560\t800\t241\t+\t.\tID=query_4;Name=test2.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
417 f.write("chr1\tquery\ttest2.5\t850\t1000\t151\t+\t.\tID=query_5;Name=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
418 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
419
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
420 def _writeQueryGff3File_case3(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
421 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
422 f.write("chr1\tquery\ttest3.1\t150\t250\t101\t+\t.\tID=query_1;Name=test3.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
423 f.write("chr1\tquery\ttest3.2\t380\t400\t21\t+\t.\tID=query_2;Name=test3.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
424 f.write("chr1\tquery\ttest3.3\t480\t520\t41\t+\t.\tID=query_3;Name=test3.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
425 f.write("chr1\tquery\ttest3.4\t510\t700\t191\t+\t.\tID=query_4;Name=test3.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
426 f.write("chr1\tquery\ttest3.5\t900\t950\t51\t+\t.\tID=query_5;Name=test3.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
427 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
428
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
429 def _writeQueryGff3File_case4(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
430 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
431 f.write("chr1\tquery\ttest4.1\t400\t500\t101\t+\t.\tID=query_1;Name=test4.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
432 f.write("chr1\tquery\ttest4.2\t450\t600\t151\t+\t.\tID=query_2;Name=test4.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
433 f.write("chr1\tquery\ttest4.3\t700\t800\t101\t+\t.\tID=query_3;Name=test4.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
434 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
435
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
436 def _writeQueryGff3File_case5(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
437 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
438 f.write("chr1\tquery\ttest5.1\t850\t950\t101\t+\t.\tID=query_1;Name=test5.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
439 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
440
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
441 def _writeQueryGff3File_case6(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
442 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
443 f.write("chr1\tquery\ttest6.1\t200\t300\t101\t+\t.\tID=query_1;Name=test6.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
444 f.write("chr1\tquery\ttest6.2\t800\t900\t101\t+\t.\tID=query_2;Name=test6.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
445 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
446
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
447 def _writeQueryGff3File_case7(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
448 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
449 f.write("chr1\tquery\ttest7.1\t530\t550\t21\t+\t.\tID=query_1;Name=test7.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
450 f.write("chr1\tquery\ttest7.2\t600\t700\t101\t+\t.\tID=query_2;Name=test7.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
451 f.write("chr1\tquery\ttest7.3\t650\t900\t251\t+\t.\tID=query_3;Name=test7.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
452 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
453
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
454 def _writeQueryGff3File_case8(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
455 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
456 f.write("chr1\tquery\ttest8.1\t500\t600\t101\t+\t.\tID=query_1;Name=test8.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
457 f.write("chr1\tquery\ttest8.2\t700\t800\t101\t+\t.\tID=query_2;Name=test8.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
458 f.write("chr1\tquery\ttest8.3\t900\t1100\t201\t+\t.\tID=query_3;Name=test8.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
459 f.write("chr1\tquery\ttest8.4\t1200\t1300\t101\t+\t.\tID=query_4;Name=test8.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
460 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
461
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
462 def _writeQueryGff3File_case9(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
463 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
464 f.write("chr1\tquery\ttest9.1\t400\t500\t101\t+\t.\tID=query_1;Name=test9.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
465 f.write("chr1\tquery\ttest9.2\t550\t650\t101\t+\t.\tID=query_2;Name=test9.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
466 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
467
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
468 def _writeQueryGff3File_case10(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
469 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
470 f.write("chr1\tquery\ttest10.1\t700\t800\t101\t+\t.\tID=query_1;Name=test10.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
471 f.write("chr1\tquery\ttest10.2\t900\t1000\t101\t+\t.\tID=query_2;Name=test10.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
472 f.write("chr1\tquery\ttest10.3\t1100\t1300\t201\t+\t.\tID=query_3;Name=test10.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
473 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
474
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
475 def _writeQueryGff3File_case11(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
476 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
477 f.write("chr1\tquery\ttest11.1\t420\t480\t61\t+\t.\tID=query_1;Name=test11.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
478 f.write("chr1\tquery\ttest11.2\t450\t715\t266\t+\t.\tID=query_2;Name=test11.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
479 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
480
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
481 def _writeQueryGff3File_case12(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
482 f = open(fileName, 'w')
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
483 f.write("chr1\tquery\ttest12.1\t200\t400\t.\t+\t.\tID=query_1;Name=test12.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
484 f.write("chr1\tquery\ttest12.2\t600\t900\t.\t+\t.\tID=query_2;Name=test12.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
485 f.write("chr1\tquery\ttest12.3\t700\t1000\t.\t+\t.\tID=query_3;Name=test12.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
486 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
487
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
488 def _writeGFF3File(self, fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
489 f = open(fileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
490 f.write("chr1\ttest\ttest2.1\t9\t1000\t1001\t+\t.\tID=test2.1;Name=test2.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
491 f.write("chr1\ttest\ttest2.2\t50\t350\t301\t+\t.\tID=test2.2;Name=test2.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
492 f.write("chr1\ttest\ttest2.3\t100\t600\t501\t+\t.\tID=test2.3;Name=test2.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
493 f.write("chr1\ttest\ttest2.4\t200\t450\t251\t+\t.\tID=test2.4;Name=test2.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
494 f.write("chr1\ttest\ttest2.5\t700\t950\t251\t+\t.\tID=test2.5;Name=test2.5\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
495 f.write("chr1\ttest\ttest2.6\t800\t900\t101\t+\t.\tID=test2.6;Name=test2.6\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
496 f.write("chr1\ttest\ttest2.7\t1200\t1300\t101\t+\t.\tID=test2.7;Name=test2.7\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
497 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
498
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
499 if __name__ == "__main__":
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
500 unittest.main()