Skip to content

Commit

Permalink
minor things
Browse files Browse the repository at this point in the history
  • Loading branch information
bvilhjal committed Mar 15, 2019
1 parent a14c36f commit 51e36d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ldpred/sum_stats_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def parse_sum_stats_custom(filename=None, bimfile=None, only_hm3=False, hdf5_fil
for line in f:
line_i +=1
if line_i%1000==0 and num_lines>0:
sys.stdout.write('\b\b\b\b\b\b\b%0.2f%%' % (100.0 * (float(line_i) / (num_lines-1.0))))
sys.stdout.write('\b\b\b\b\b\b\b%0.2f%%' % (100.0 * (float(line_i) / (num_lines))))
sys.stdout.flush()
if is_gz(filename):
line = line.decode('utf-8')
Expand Down Expand Up @@ -268,8 +268,9 @@ def parse_sum_stats_custom(filename=None, bimfile=None, only_hm3=False, hdf5_fil
chrom_dict[chrom]['betas'].append(beta / sp.sqrt(N))

if len(bad_chromosomes) > 0:
print('Ignored chromosomes: %s' % (','.join(list(bad_chromosomes))))
print('Please note that only data on chromosomes 1-23, and X are parsed.')
if debug:
print('Ignored chromosomes: %s' % (','.join(list(bad_chromosomes))))
print('Please note that only data on chromosomes 1-23, and X are parsed.')

if num_lines>0:
sys.stdout.write('\b\b\b\b\b\b\b%0.2f%%\n' % (100.0))
Expand Down

0 comments on commit 51e36d9

Please sign in to comment.