Mercurial > repos > eric-rasche > circos
comparison wiggle.py @ 4:4ff5ff4c84fa draft
planemo upload for repository https://github.com/TAMU-CPT/galaxy-circos-tool commit e4192d8d51efd2bf52c8094df65c164d90168e66
author | eric-rasche |
---|---|
date | Sun, 05 Mar 2017 17:02:17 -0500 |
parents | e8475d0195fe |
children |
comparison
equal
deleted
inserted
replaced
3:b56f47c58779 | 4:4ff5ff4c84fa |
---|---|
4 value = line.strip() | 4 value = line.strip() |
5 start_position = self.stepIdx * self.parserConfig['step'] + self.parserConfig['start'] | 5 start_position = self.stepIdx * self.parserConfig['step'] + self.parserConfig['start'] |
6 stop_position = start_position + self.parserConfig['span'] - 1 | 6 stop_position = start_position + self.parserConfig['span'] - 1 |
7 self.stepIdx += 1 | 7 self.stepIdx += 1 |
8 | 8 |
9 for position in xrange(start_position, stop_position): | 9 for position in range(start_position, stop_position): |
10 yield (self.parserConfig['chrom'], position, value) | 10 yield (self.parserConfig['chrom'], position, value) |
11 | 11 |
12 def variableStepParser(self, line): | 12 def variableStepParser(self, line): |
13 (start, value) = line.strip().split() | 13 (start, value) = line.strip().split() |
14 start = int(start) | 14 start = int(start) |
15 start_position = start | 15 start_position = start |
16 stop_position = start + self.parserConfig['span'] | 16 stop_position = start + self.parserConfig['span'] |
17 | 17 |
18 for position in xrange(start_position, stop_position): | 18 for position in range(start_position, stop_position): |
19 yield (self.parserConfig['chrom'], position, value) | 19 yield (self.parserConfig['chrom'], position, value) |
20 | 20 |
21 def walk(self, handle): | 21 def walk(self, handle): |
22 | 22 |
23 parser = None | 23 parser = None |