check to handle missing I/O/P dirs if drug unset

This commit is contained in:
Tanushree Tunstall 2021-02-09 15:00:03 +00:00
parent 0d2f5c55ef
commit 73b705a563

View file

@ -73,6 +73,14 @@ pdb_filename = args.pdb_file
# Just the filename, thanks # Just the filename, thanks
#pdb_name = Path(in_filename_pdb).stem #pdb_name = Path(in_filename_pdb).stem
# Handle the case where neither 'drug'
# nor (indir,outdir,process_dir) are defined
if not drug:
if not indir or not outdir or not process_dir:
print('ERROR: if "drug" is not specified, you must specify Input, Output, and Process directories')
sys.exit()
#============== #==============
# directories # directories
#============== #==============
@ -80,8 +88,7 @@ if not datadir:
datadir = homedir + '/' + 'git/Data' datadir = homedir + '/' + 'git/Data'
if not indir: if not indir:
indir = indir = datadir + '/' + drug + '/input'
datadir + '/' + drug + '/input'
if not outdir: if not outdir:
outdir = datadir + '/' + drug + '/output' outdir = datadir + '/' + drug + '/output'
@ -141,6 +148,7 @@ print('Arguments being passed:'
, '\n=============================================================') , '\n=============================================================')
#### Delay for 10 seconds to check the params #### #### Delay for 10 seconds to check the params ####
print('Sleeping for 10 seconds to give you time to cancel')
time.sleep(10) time.sleep(10)
#======================================================================= #=======================================================================