diff --git a/IMP b/IMP index d356da8f6ebb02f686b10b0704850e7aa6f41106..4a3d6ea9bfead63f8abfed15ec96c1744ae297d0 100755 --- a/IMP +++ b/IMP @@ -16,7 +16,7 @@ __doc__ = """Integrated Metaomic Pipeline. (____)(_/\/\_)(__) Usage: - IMP [-m MG1 -m MG2] [-t MT1 -t MT2] -o OUTPUT [--enter] [--norm] [-n CONTAINER] [-d DBPATH] [-e ENV] ... [COMMANDS ...] + IMP [-m MG1 -m MG2] [-t MT1 -t MT2] -o OUTPUT [--enter] [--norm] [--ask] [-n CONTAINER] [-d DBPATH] [-e ENV] ... [COMMANDS ...] IMP --init [-d DBPATH] IMP (-h | --help) IMP --version @@ -26,6 +26,7 @@ Options: --enter Enter the container --init Initialize IMP databases (Take a while) --norm Don't delete the container after use. Useful for debugging. + --ask Ask to create directory if it desn't exist. -h --help Show this help and exit -m MG Path to the metagenomics paired files (must be 2 files). -t MT Path to the metatranscriptomic paired files (2 files). @@ -97,10 +98,9 @@ def run(args): output = Path(args['-o']).abspath() if not output.exists(): - if yes_or_no("Output '%s' doesn't exist. Create ?" % output): - output.makedirs() - else: + if args['--ask'] and not yes_or_no("Output '%s' doesn't exist. Create ?" % output): exit(0) + output.makedirs() container_name = args['-n'] is not None and args['-n'] or 'imp:latest' db_path = Path(args['-d']).abspath() # configure IMP mount point to the docker container