annotate SMART/Java/Python/getSizes.py @ 71:d96f6c9a39e0 draft default tip

Removed pyc files.
author m-zytnicki
date Thu, 07 Apr 2016 09:25:18 -0400
parents 44d5973c188c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
1 #! /usr/bin/env python
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
2 #
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
3 # Copyright INRA-URGI 2009-2010
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
4 #
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
5 # This software is governed by the CeCILL license under French law and
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
6 # abiding by the rules of distribution of free software. You can use,
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
7 # modify and/ or redistribute the software under the terms of the CeCILL
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
8 # license as circulated by CEA, CNRS and INRIA at the following URL
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
9 # "http://www.cecill.info".
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
10 #
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
11 # As a counterpart to the access to the source code and rights to copy,
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
12 # modify and redistribute granted by the license, users are provided only
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
13 # with a limited warranty and the software's author, the holder of the
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
14 # economic rights, and the successive licensors have only limited
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
15 # liability.
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
16 #
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
17 # In this respect, the user's attention is drawn to the risks associated
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
18 # with loading, using, modifying and/or developing or reproducing the
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
19 # software by the user in light of its specific status of free software,
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
20 # that may mean that it is complicated to manipulate, and that also
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
21 # therefore means that it is reserved for developers and experienced
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
22 # professionals having in-depth computer knowledge. Users are therefore
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
23 # encouraged to load and test the software's suitability as regards their
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
24 # requirements in conditions enabling the security of their systems and/or
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
25 # data to be ensured and, more generally, to use and operate it in the
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
26 # same conditions as regards security.
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
27 #
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
28 # The fact that you are presently reading this means that you have had
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
29 # knowledge of the CeCILL license and that you accept its terms.
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
30 #
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
31 import os, sys
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
32 from optparse import OptionParser
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
33 from commons.core.parsing.FastaParser import FastaParser
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
34 from commons.core.parsing.FastqParser import FastqParser
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
35 from SMART.Java.Python.structure.TranscriptContainer import TranscriptContainer
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
36 from commons.core.parsing.GffParser import GffParser
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
37 from SMART.Java.Python.misc.Progress import Progress
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
38 from SMART.Java.Python.misc.RPlotter import RPlotter
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
39 from SMART.Java.Python.misc import Utils
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
40
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
41 from commons.core.LoggerFactory import LoggerFactory
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
42 from commons.core.utils.RepetOptionParser import RepetOptionParser
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
43
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
44 LOG_DEPTH = "smart"
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
45
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
46 class GetSizes(object):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
47
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
48 def __init__(self, inFileName = None, inFormat=None, outFileName = None, query=None,xMax=None, xMin=None, verbosity = 0):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
49 self.inFileName = inFileName
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
50 self.inFormat= inFormat
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
51 self.outFileName = outFileName
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
52 self.query = query
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
53 self.xMax = xMax
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
54 self.xMin = xMin
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
55 self.xLab = "Size"
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
56 self.yLab = "# reads"
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
57 self.barplot = False
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
58 self._verbosity = verbosity
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
59 self.parser = None
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
60 self._log = LoggerFactory.createLogger("%s.%s" % (LOG_DEPTH, self.__class__.__name__), self._verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
61
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
62 def setAttributesFromCmdLine(self):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
63 description = "Usage: getSizes.py [options]\n\nGet Sizes v1.0.2: Get the sizes of a set of genomic coordinates. [Category: Visualization]\n"
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
64 epilog = ""
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
65 parser = RepetOptionParser(description = description, epilog = epilog)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
66 parser.add_option("-i", "--input", dest="inputFileName", action="store", default=None, type="string", help="input file [compulsory] [format: file in transcript or sequence format given by -f]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
67 parser.add_option("-f", "--format", dest="format", action="store", default=None, type="string", help="format of the input [compulsory] [format: transcript or sequence file format]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
68 parser.add_option("-q", "--query", dest="query", action="store", default=None, type="string", help="type to mesure [default: size] [format: choice (size, intron size, exon size, 1st exon size)]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
69 parser.add_option("-o", "--output", dest="outputFileName", action="store", default=None, type="string", help="output file [format: output file in PNG format]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
70 parser.add_option("-x", "--xMax", dest="xMax", action="store", default=None, type="int", help="maximum value on the x-axis to plot [format: int]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
71 parser.add_option("-X", "--xMin", dest="xMin", action="store", default=None, type="int", help="minimum value on the x-axis to plot [format: int]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
72 parser.add_option("-v", "--verbosity", dest="verbosity", action="store", default=1, type="int", help="trace level [format: int]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
73 parser.add_option("-a", "--xLabel", dest="xLab", action="store", default="Size", type="string", help="x absis label name [format: string] [default: Size]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
74 parser.add_option("-b", "--yLabel", dest="yLab", action="store", default="# reads", type="string", help="y absis label name [format: string] [default: Reads]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
75 parser.add_option("-B", "--barplot", dest="barplot", action="store_true", default=False, help="use barplot representation [format: bool] [default: false]")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
76 options = parser.parse_args()[0]
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
77 self._setAttributesFromOptions(options)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
78
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
79 def _setAttributesFromOptions(self, options):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
80 self.setInFileName(options.inputFileName)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
81 self.setInFormat(options.format)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
82 self.setQuery(options.query)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
83 self.setOutFileName(options.outputFileName)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
84 self.setXMax(options.xMax)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
85 self.setXMin(options.xMin)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
86 self.setxLab(options.xLab)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
87 self.setyLab(options.yLab)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
88 self.setBarplot(options.barplot)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
89 self.setVerbosity(options.verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
90
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
91 def setInFileName(self, inputFileName):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
92 self.inFileName = inputFileName
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
93
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
94 def setInFormat(self, inFormat):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
95 self.inFormat = inFormat
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
96
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
97 def setQuery(self, query):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
98 self.query = query
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
99
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
100 def setOutFileName(self, outFileName):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
101 self.outFileName = outFileName
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
102
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
103 def setXMax(self, xMax):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
104 self.xMax = xMax
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
105
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
106 def setXMin(self, xMin):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
107 self.xMin = xMin
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
108
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
109 def setxLab(self, xLab):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
110 self.xLab = xLab
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
111
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
112 def setyLab(self, yLab):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
113 self.yLab = yLab
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
114
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
115 def setBarplot(self, barplot):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
116 self.barplot = barplot
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
117
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
118 def setVerbosity(self, verbosity):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
119 self._verbosity = verbosity
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
120
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
121 def _checkOptions(self):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
122 if self.inFileName == None:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
123 self._logAndRaise("ERROR: Missing input file name")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
124 if self.inFormat == "fasta":
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
125 self.parser = FastaParser(self.inFileName, self._verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
126 elif self.inFormat == "fastq":
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
127 self.parser = FastqParser(self.inFileName, self._verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
128 else:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
129 self.parser = TranscriptContainer(self.inFileName, self.inFormat, self._verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
130
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
131 def _logAndRaise(self, errorMsg):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
132 self._log.error(errorMsg)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
133 raise Exception(errorMsg)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
134
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
135 def run(self):
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
136 LoggerFactory.setLevel(self._log, self._verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
137 self._checkOptions()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
138 self._log.info("START getsizes")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
139 self._log.debug("Input file name: %s" % self.inFileName)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
140
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
141 nbItems = self.parser.getNbItems()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
142 self._log.info( "%i items found" % (nbItems))
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
143
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
144 # treat items
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
145 progress = Progress(nbItems, "Analyzing sequences of %s" % (self.inFileName), self._verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
146 sizes = {}
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
147 minimum = 1000000000000
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
148 maximum = 0
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
149 sum = 0
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
150 number = 0
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
151 nbSubItems = 0
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
152 for item in self.parser.getIterator():
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
153 items = []
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
154 if self.query == "exon":
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
155 items = item.getExons()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
156 elif self.query == "exon1":
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
157 if len(item.getExons()) > 1:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
158 item.sortExons()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
159 items = [item.getExons()[0]]
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
160 elif self.query == "intron":
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
161 items = item.getIntrons()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
162 else:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
163 items = [item, ]
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
164
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
165 for thisItem in items:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
166 try:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
167 nbElements = int(float(thisItem.getTagValue("nbElements")))
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
168 if nbElements == None:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
169 nbElements = 1
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
170 except:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
171 nbElements = 1
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
172 size = thisItem.getSize()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
173 minimum = min(minimum, size)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
174 maximum = max(maximum, size)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
175
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
176 if size not in sizes:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
177 sizes[size] = nbElements
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
178 else:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
179 sizes[size] += nbElements
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
180 sum += size
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
181 nbSubItems += nbElements
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
182 number += 1
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
183 progress.inc()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
184 progress.done()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
185
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
186 if self.outFileName != None:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
187 plotter = RPlotter(self.outFileName, self._verbosity)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
188 plotter.setFill(0)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
189 plotter.setMinimumX(self.xMin)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
190 plotter.setMaximumX(self.xMax)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
191 plotter.setXLabel(self.xLab)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
192 plotter.setYLabel(self.yLab)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
193 plotter.setBarplot(self.barplot)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
194 plotter.addLine(sizes)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
195 plotter.plot()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
196
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
197 if nbSubItems == 0:
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
198 self._logAndRaise("No item found")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
199
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
200 self.items = number
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
201 self.subItems = nbSubItems
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
202 self.nucleotides = sum
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
203 self.minAvgMedMax = Utils.getMinAvgMedMax(sizes)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
204
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
205 print "%d items" % (number)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
206 print "%d sub-items" % (nbSubItems)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
207 print "%d nucleotides" % (sum)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
208 print "min/avg/med/max transcripts: %d/%.2f/%.1f/%d" % Utils.getMinAvgMedMax(sizes)
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
209
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
210 self._log.info("END getsizes")
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
211
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
212
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
213 if __name__ == "__main__":
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
214 iGetSizes = GetSizes()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
215 iGetSizes.setAttributesFromCmdLine()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
216 iGetSizes.run()
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
217
44d5973c188c Uploaded
m-zytnicki
parents:
diff changeset
218 #TODO: add two more options!!!!!!