From dce83d04566df1e0271e7932a42ded1b1c0015a1 Mon Sep 17 00:00:00 2001 From: Peter Briggs Date: Tue, 19 Dec 2023 08:24:28 +0000 Subject: [PATCH] 'info' command: add bases mask & flow cell mode, and trap for bad directory. --- auto_process_ngs/cli/auto_process.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/auto_process_ngs/cli/auto_process.py b/auto_process_ngs/cli/auto_process.py index b635bbe50..39181a417 100644 --- a/auto_process_ngs/cli/auto_process.py +++ b/auto_process_ngs/cli/auto_process.py @@ -1295,10 +1295,16 @@ def info(args): if not analysis_dir: analysis_dir = os.getcwd() d = AutoProcess(analysis_dir,allow_save_params=False) - # Run ID - print("Run ID : %s" % d.run_id) - print("Platform : %s" % d.metadata.platform) - print("Sample sheet: %s" % d.params.sample_sheet) + # Check metadata and params were loaded + if not (d.metadata and d.params): + logger.fatal("Missing metadata and/or parameters") + sys.exit(1) + # Report information + print("Run ID : %s" % d.run_id) + print("Platform : %s" % d.metadata.platform) + print("Flow cell mode: %s" % d.metadata.flow_cell_mode) + print("Bases mask : %s" % d.metadata.default_bases_mask) + print("Sample sheet : %s" % d.params.sample_sheet) def metadata(args): """