Skip to content

Commit 069000b

Browse files
committed
update stats_wrapper bug
1 parent 78e559b commit 069000b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

scripts/stats_wrapper.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@
1919

2020
lines_per_file = 25000
2121
smallfile = None
22-
num_small_file = 0
2322
with open(f'all_splicing_variants_{tag}.bed', 'r') as bigfile:
24-
num_small_file +=1
23+
header = bigfile.readline()
2524
for lineno, line in enumerate(bigfile):
2625
if lineno % lines_per_file == 0:
2726
if smallfile:
2827
smallfile.close()
2928
small_filename = 'small_file_{}.txt'.format(lineno + lines_per_file)
3029
smallfile = open(small_filename, "w")
30+
smallfile.write(header)
3131
smallfile.write(line)
3232
if smallfile:
33-
num_small_file += 1
3433
smallfile.close()
3534
#get chunks
3635
files = glob.glob('small_file_*')
@@ -54,5 +53,5 @@
5453
print("Number of output files doesn't match the number of input files that should have been processed")
5554
files = glob.glob('small_file_*')
5655
for file in files:
57-
os.remove(file)
56+
os.remove(file)
5857

scripts/vep_aws_workflow.py

Whitespace-only changes.

0 commit comments

Comments
 (0)