Commit 158711ed authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Move repository parameter to main parser. Improve debug output

parent 7429e324
......@@ -7,15 +7,16 @@ import shutil
from psot.nextflow import setup_execution_directory, execute_analysis
import tempfile
import sys
import json
def main():
parser = argparse.ArgumentParser(description='Make bioinformatic observations on aminoacid sequences')
parser.set_defaults(func=help)
parser.add_argument('--repository', '-r', action='append', help='Include the given repository')
subparsers = parser.add_subparsers()
info_parser = subparsers.add_parser('info')
info_parser.add_argument('--listanalyses', '-l', action='store_true', help='Show available analysis steps')
info_parser.add_argument('--repository', '-r', action='append', help='Include the given repository')
info_parser.set_defaults(func=info)
analyze_parser = subparsers.add_parser('analyze')
......@@ -29,7 +30,6 @@ def main():
analyze_parser.add_argument('--debug', '-d', action='store_true', help='Debug mode, computation directory will not be removed after computation')
analyze_parser.add_argument('--execution_dir', '-e', help='Use the specified execution directory and do not delete it after the computation')
analyze_parser.add_argument('--use_cluster', '-C', action='store_true', help='Use compute cluster for execution')
analyze_parser.add_argument('--repository', '-r', action='append', help='Include the given repository')
analyze_parser.set_defaults(func=analyze)
args = parser.parse_args()
......@@ -49,7 +49,7 @@ def analyze(args, config):
sys.exit(1)
execution = generate_execution(config, args)
if args.debug:
print(execution)
print(json.dumps(execution, indent=2))
setup_execution_directory(execution)
execute_analysis(execution)
cleanup(execution)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment