annotate SMART/Java/Python/test/Test_F_compareOverlapping.py @ 24:452e051f6562

Deleted selected files
author m-zytnicki
date Mon, 29 Apr 2013 03:28:24 -0400
parents 94ab73e8a190
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, os.path
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
3 from SMART.Java.Python.misc import Utils
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
4
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
5 SMART_PATH = os.environ["REPET_PATH"] + "/SMART"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
6
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
7 class Test_F_compareOverlapping(unittest.TestCase):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
8
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
9 def setUp(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
10 self._inputFileQuery = "inputFileTest1.bed"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
11 self._inputFileReference = "inputFileTest2.bed"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
12 self._inputFileName3 = "inputFileTest3.bed"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
13 self._expOutputFileName = "expOutput.gff3"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
14 self._outputFileName = "output.gff3"
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
15 self._writeInputFileQuery()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
16 self._writeInputFileRefence()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
17 self._writeInputFile3()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
18
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
19 def tearDown(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
20 for fileName in (self._inputFileQuery, self._inputFileReference, self._inputFileName3, self._expOutputFileName, self._outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
21 if os.path.exists(fileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
22 os.remove(fileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
23
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
24 def test_runAsScript_withoutOption(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
25 self._writeOutputFile_withoutOption(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
26 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
27 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
28
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
29 def test_runAsScript_optionNFirstNucleotide(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
30 self._writeOutputFile_NFirstNucleotide(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
31 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -S 200 -s 200 -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
32 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
33
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
34 def test_runAsScript_optionNLastNucleotide(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
35 self._writeOutputFile_NLastNucleotide(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
36 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -U 200 -u 200 -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
37 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
38
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
39 def test_runAsScript_option_5PrimeExtension(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
40 self._writeOutputFile_5PrimeExtension(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
41 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -E 110 -e 110 -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
42 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
43
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
44 def test_runAsScript_option_3PrimeExtension(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
45 self._writeOutputFile_3PrimeExtension(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
46 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -N 110 -n 110 -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
47 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
48
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
49 def test_runAsScript_colinear(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
50 self._writeOutputFile_colinear(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
51 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -c -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
52 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
53
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
54 def test_runAsScript_antisense(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
55 self._writeOutputFile_antisense(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
56 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -a -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
57 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
58
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
59 def test_runAsScript_minOverlap(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
60 self._writeOutputFile_minOverlap(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
61 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -m 51 -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileName3, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
62 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
63
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
64 def test_runAsScript_pcOverlap(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
65 self._writeOutputFile_pcOverlap(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
66 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -p 60 -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileName3, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
67 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
68
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
69 def test_runAsScript_included(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
70 self._writeOutputFile_included(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
71 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -k -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
72 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
73
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
74 def test_runAsScript_including(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
75 self._writeOutputFile_including(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
76 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -K -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
77 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
78
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
79 def test_runAsScript_includeNotOverlap(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
80 self._writeOutputFile_includeNotOverlap(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
81 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -O -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
82 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
83
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
84 def test_runAsScript_exclude(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
85 self._writeOutputFile_exclude(self._expOutputFileName)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
86 os.system("python %s/Java/Python/CompareOverlapping.py -i %s -f bed -j %s -g bed -o %s -x -v 0" % (SMART_PATH, self._inputFileQuery, self._inputFileReference, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
87 self.assertTrue(Utils.diff(self._expOutputFileName, self._outputFileName))
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
88
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
89 def _writeInputFileQuery(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
90 f = open(self._inputFileQuery, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
91 f.write("arm_X\t1000\t2000\ttest1.1\t1000\t+\t1000\t2000\t0\t1\t1000,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
92 f.write("arm_X\t1000\t2000\ttest1.2\t1000\t-\t1000\t2000\t0\t1\t1000,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
93 f.write("arm_X\t100\t200\ttest1.3\t1000\t+\t100\t200\t0\t1\t100,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
94 f.write("arm_X\t100\t3200\ttest1.4\t1000\t+\t100\t3200\t0\t1\t3100,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
95 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
96
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
97 def _writeInputFileRefence(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
98 f = open(self._inputFileReference, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
99 f.write("arm_X\t1000\t2000\ttest2.1\t1000\t+\t1000\t2000\t0\t1\t1000,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
100 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
101
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
102 def _writeInputFile3(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
103 f = open(self._inputFileName3, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
104 f.write("arm_X\t1000\t2000\ttest2.1\t1000\t+\t1000\t2000\t0\t1\t1000,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
105 f.write("arm_X\t250\t350\ttest2.2\t1000\t+\t250\t350\t0\t1\t100,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
106 f.write("arm_X\t150\t250\ttest2.3\t1000\t+\t150\t250\t0\t1\t100,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
107 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
108
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
109 def _writeOutputFile_withoutOption(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
110 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
111 f.write("arm_X\tS-MART\ttranscript\t100\t3199\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
112 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
113 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
114 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
115
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
116 def _writeOutputFile_NFirstNucleotide(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
117 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
118 f.write("arm_X\tS-MART\ttranscript\t1000\t1199\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
119 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
120
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
121 def _writeOutputFile_NLastNucleotide(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
122 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
123 f.write("arm_X\tS-MART\ttranscript\t1800\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
124 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
125
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
126 def _writeOutputFile_5PrimeExtension(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
127 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
128 f.write("arm_X\tS-MART\ttranscript\t0\t3199\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
129 f.write("arm_X\tS-MART\ttranscript\t890\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
130 f.write("arm_X\tS-MART\ttranscript\t1000\t2109\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
131 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
132
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
133 def _writeOutputFile_3PrimeExtension(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
134 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
135 f.write("arm_X\tS-MART\ttranscript\t100\t3309\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
136 f.write("arm_X\tS-MART\ttranscript\t1000\t2109\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
137 f.write("arm_X\tS-MART\ttranscript\t890\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
138 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
139
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
140 def _writeOutputFile_colinear(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
141 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
142 f.write("arm_X\tS-MART\ttranscript\t100\t3199\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
143 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
144 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
145
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
146 def _writeOutputFile_antisense(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
147 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
148 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
149 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
150
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
151 def _writeOutputFile_minOverlap(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
152 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
153 f.write("arm_X\tS-MART\ttranscript\t100\t3199\t.\t+\t.\toverlapWith=test2.3,test2.2,test2.1;nbOverlaps=3.000000;ID=test1.4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
154 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
155 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
156 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
157
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
158 def _writeOutputFile_pcOverlap(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
159 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
160 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
161 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
162 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
163
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
164 def _writeOutputFile_includeNotOverlap(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
165 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
166 f.write("arm_X\tS-MART\ttranscript\t100\t3199\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
167 f.write("arm_X\tS-MART\ttranscript\t100\t199\t.\t+\t.\tnbOverlaps=0;ID=test1.3;Name=test1.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
168 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
169 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
170 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
171
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
172 def _writeOutputFile_exclude(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
173 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
174 f.write("arm_X\tS-MART\ttranscript\t100\t199\t.\t+\t.\tID=test1.3;Name=test1.3\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
175 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
176
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
177 def _writeOutputFile_included(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
178 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
179 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
180 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
181 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
182
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
183 def _writeOutputFile_including(self, outputFileName):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
184 f = open(outputFileName, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
185 f.write("arm_X\tS-MART\ttranscript\t100\t3199\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.4;Name=test1.4\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
186 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t+\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.1;Name=test1.1\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
187 f.write("arm_X\tS-MART\ttranscript\t1000\t1999\t.\t-\t.\toverlapWith=test2.1;nbOverlaps=1.000000;ID=test1.2;Name=test1.2\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
188 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
189
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
190 def _writeInputFileQuery_withExon(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
191 f = open(self._inputFileQuery, "w")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
192 f.write("arm_X\t1000\t2000\ttest1.1\t1000\t+\t1000\t2000\t0\t1\t1000,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
193 f.write("arm_X\t1000\t2000\ttest1.2\t1000\t-\t1000\t2000\t0\t1\t1000,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
194 f.write("arm_X\t100\t200\ttest1.3\t1000\t+\t100\t200\t0\t1\t100,\t0,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
195 f.write("arm_X\t100\t3200\ttest1.4\t1000\t+\t100\t3200\t0\t2\t100,100,\t0,3000,\n")
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
196 f.close()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
197
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
198 if __name__ == "__main__":
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
199 unittest.main()