comparison SMART/Java/Python/cleaning/GffCleaner.py @ 46:169d364ddd91

Uploaded
author m-zytnicki
date Mon, 30 Sep 2013 03:19:26 -0400
parents e57682cd6997
children 97aa2e42bfdf
comparison
equal deleted inserted replaced
45:e454402ba9d9 46:169d364ddd91
125 for cpt, line in enumerate(self.inputHandle): 125 for cpt, line in enumerate(self.inputHandle):
126 if not line or line[0] == "#": continue 126 if not line or line[0] == "#": continue
127 if line[0] == ">": break 127 if line[0] == ">": break
128 parsedLine = ParsedLine(line, cpt) 128 parsedLine = ParsedLine(line, cpt)
129 if self.acceptedTypes == None or parsedLine.type in self.acceptedTypes: 129 if self.acceptedTypes == None or parsedLine.type in self.acceptedTypes:
130 if parsedLine.id in self.lines:
131 cpt = 1
132 while "%s-%d" % (parsedLine.id, cpt) in self.lines:
133 cpt += 1
134 parsedLine.id = "%s-%d" % (parsedLine.id, cpt)
135 self.lines[parsedLine.id] = parsedLine 130 self.lines[parsedLine.id] = parsedLine
136 progress.inc() 131 progress.inc()
137 progress.done() 132 progress.done()
138 133
139 def sort(self): 134 def sort(self):