diff makewindow.py @ 14:76e1b1b21cce default tip

Deleted selected files
author xuebing
date Tue, 13 Mar 2012 19:05:10 -0400
parents 292186c14b08
children
line wrap: on
line diff
--- a/makewindow.py	Sat Mar 10 08:17:36 2012 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-def makeWindow(filename,outfile,window):
-    window = window/2
-    f=open(filename)
-    out = open(outfile,'w')
-    for line in f:
-        flds = line.strip().split()
-        #new position
-        center = (int(flds[1]) + int(flds[2]))/2
-        start = center - window
-        end = center + window
-        if start >= 0:
-            flds[1] = str(start)
-            flds[2] = str(end)
-            out.write('\t'.join(flds)+'\n')
-    f.close()
-    out.close()
-
-import sys
-makeWindow(sys.argv[1],sys.argv[2],int(sys.argv[3]))