changeset 41:e57682cd6997

Uploaded
author m-zytnicki
date Thu, 30 May 2013 03:04:47 -0400
parents cd852f3e04ab
children 2abc37c27164
files SMART/Java/Python/cleaning/GffCleaner.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
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()