Skip to content

Commit

Permalink
make command line option printout in header copy/pasteable
Browse files Browse the repository at this point in the history
  • Loading branch information
bulik committed May 16, 2015
1 parent 77581bd commit e2ea09c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ldsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,11 @@ def ldscore(args, log):
opts = vars(args)
non_defaults = [x for x in opts.keys() if opts[x] != defaults[x]]
header = MASTHEAD
header += "\nOptions: \n"
options = ['--'+x.replace('_','-')+' '+str(opts[x]) for x in non_defaults]
header += '\n'.join(options).replace('True','').replace('False','')+'\n'
header += "Call: \n"
header += './ldsc.py \\\n'
options = ['--'+x.replace('_','-')+' '+str(opts[x])+' \\' for x in non_defaults]
header += '\n'.join(options).replace('True','').replace('False','')
header = header[0:-1]+'\n'
log.log(header)
log.log('Beginning analysis at {T}'.format(T=time.ctime()))
start_time = time.time()
Expand Down

0 comments on commit e2ea09c

Please sign in to comment.