Mercurial > repos > yufei-luo > s_mart
comparison SMART/Java/Python/cleaning/GtfCleaner.py @ 56:97aa2e42bfdf
Uploaded
author | m-zytnicki |
---|---|
date | Wed, 05 Feb 2014 11:51:11 -0500 |
parents | 769e306b7933 |
children |
comparison
equal
deleted
inserted
replaced
55:2ac71607aa60 | 56:97aa2e42bfdf |
---|---|
94 self.acceptedTypes = types | 94 self.acceptedTypes = types |
95 | 95 |
96 def parse(self): | 96 def parse(self): |
97 progress = UnlimitedProgress(100000, "Reading input file", self.verbosity) | 97 progress = UnlimitedProgress(100000, "Reading input file", self.verbosity) |
98 for cpt, line in enumerate(self.inputHandle): | 98 for cpt, line in enumerate(self.inputHandle): |
99 if not line or line[0] == "#": continue | 99 if not line or (not line.strip()) or line[0] == "#": continue |
100 parsedLine = ParsedLine(line, cpt) | 100 parsedLine = ParsedLine(line, cpt) |
101 if self.acceptedTypes == None or parsedLine.type in self.acceptedTypes: | 101 if self.acceptedTypes == None or parsedLine.type in self.acceptedTypes: |
102 transcriptId = parsedLine.transcriptId | 102 transcriptId = parsedLine.transcriptId |
103 if transcriptId not in self.parents: | 103 if transcriptId not in self.parents: |
104 self.parents[parsedLine.transcriptId] = [parsedLine] | 104 self.parents[parsedLine.transcriptId] = [parsedLine] |