From 8302d0186776ba34e83655e8429ba3e56736983e Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Tue, 9 Feb 2021 15:00:03 +0000 Subject: [PATCH] check to handle missing I/O/P dirs if drug unset --- foldx/runFoldx.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/foldx/runFoldx.py b/foldx/runFoldx.py index 7b89ae9..b5a4e69 100755 --- a/foldx/runFoldx.py +++ b/foldx/runFoldx.py @@ -73,6 +73,14 @@ pdb_filename = args.pdb_file # Just the filename, thanks #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 #============== @@ -80,8 +88,7 @@ if not datadir: datadir = homedir + '/' + 'git/Data' if not indir: - indir = - datadir + '/' + drug + '/input' + indir = datadir + '/' + drug + '/input' if not outdir: outdir = datadir + '/' + drug + '/output' @@ -141,6 +148,7 @@ print('Arguments being passed:' , '\n=============================================================') #### Delay for 10 seconds to check the params #### +print('Sleeping for 10 seconds to give you time to cancel') time.sleep(10) #=======================================================================