projects
/
erange.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release version for Erange 4.0a
[erange.git]
/
bedtoregion.py
diff --git
a/bedtoregion.py
b/bedtoregion.py
index 3bcd554e5406a09f31ecc988e8c60733616d0dd5..a6a344d549b907b98343d731b3a348dd9802d0ec 100755
(executable)
--- a/
bedtoregion.py
+++ b/
bedtoregion.py
@@
-21,14
+21,16
@@
def main(argv=None):
def bedToRegion(factor, infilename, outfilename):
index = 1
infile = open(infilename)
def bedToRegion(factor, infilename, outfilename):
index = 1
infile = open(infilename)
- outfile = open(outfilename,
'w'
)
+ outfile = open(outfilename,
"w"
)
for line in infile:
for line in infile:
- if
'track'
in line:
+ if
"track"
in line:
continue
continue
+
fields = line.split()
fields = line.split()
- line = string.join(fields,
'\t'
)
- outfile.write(
'%s%d\t%s\n'
% (factor, index, line))
+ line = string.join(fields,
"\t"
)
+ outfile.write(
"%s%d\t%s\n"
% (factor, index, line))
index += 1
index += 1
+
infile.close()
outfile.close()
infile.close()
outfile.close()