diff SMART/Java/Python/cleaning/GffCleaner.py @ 41:e57682cd6997

Uploaded
author m-zytnicki
date Thu, 30 May 2013 03:04:47 -0400
parents 769e306b7933
children 169d364ddd91
line wrap: on
line diff
--- a/SMART/Java/Python/cleaning/GffCleaner.py	Thu May 30 03:03:34 2013 -0400
+++ b/SMART/Java/Python/cleaning/GffCleaner.py	Thu May 30 03:04:47 2013 -0400
@@ -127,6 +127,11 @@
 			if line[0] == ">": break
 			parsedLine = ParsedLine(line, cpt)
 			if self.acceptedTypes == None or parsedLine.type in self.acceptedTypes:
+				if parsedLine.id in self.lines:
+					cpt = 1
+					while "%s-%d" % (parsedLine.id, cpt) in self.lines:
+						cpt += 1
+					parsedLine.id = "%s-%d" % (parsedLine.id, cpt)
 				self.lines[parsedLine.id] = parsedLine
 			progress.inc()
 		progress.done()