view repeats/test.py @ 668:3bdcee61356d
blocks3d/www: fix log-file caused bug of building
r2w was configured to use /tmp/blocks3d-www-build.log.
It caused build error if this file has been creted by other user.
Log-file path was changed to ./output/blocks3d-www-build.log
Makefile was changed to create ./output directory before running r2w
author |
boris (kodomo) <bnagaev@gmail.com> |
date |
Fri, 01 Jul 2011 10:32:37 +0400 |
parents |
6070ac379ec8 |
children |
|
line source
4 from repeat_joiner import Interval, RepeatJoiner
7 for line in open(sys.argv[1]):
10 c1, c2, from1, to1, from2, to2, ori1, ori2 = line.split()[:8]
13 ori1 = True if int(ori1) == 1 else False
14 ori2 = True if int(ori2) == 1 else False
20 r1 = Interval(rj, c1, from1, to1, ori1)
21 r2 = Interval(rj, c2, from2, to2, ori2)
25 rj.interval_groups.sort(key=lambda g: len(g), reverse=True)
28 print "group\tchr\tchr_from\tchr_to\tgroup_from\tgroup_to\tori\tgroup_ori"
29 for i, interval_group in enumerate(rj.interval_groups):
30 interval_group.sort(key=lambda i: i.group_start)
32 for interval in interval_group:
33 if interval.tuple() in prev:
35 prev.add(interval.tuple())
36 print "%i\t%s" % (i, str(interval).replace(' ', '\t'))