From ae9b7341cf223164033df6247141bed0f3d420f0 Mon Sep 17 00:00:00 2001 From: Brandon Kieft <162646417+bkieft-usa@users.noreply.github.com> Date: Mon, 7 Oct 2024 11:26:23 -0700 Subject: [PATCH] Improve error logging during new project initiation --- metatlas/untargeted/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metatlas/untargeted/tools.py b/metatlas/untargeted/tools.py index b0c1f66d..ac1ca3ed 100644 --- a/metatlas/untargeted/tools.py +++ b/metatlas/untargeted/tools.py @@ -1568,11 +1568,11 @@ def write_metadata_per_new_project(df: pd.DataFrame,background_designator=[],raw if department =='eb': department = 'egsb' if not department in ['jgi','egsb']: - logging.warning(tab_print("Warning! %s does not have a valid department name in the second field. Use --raw_data_subdir to provide a custom subdirectory for the raw data."%(project_name), 2)) + logging.warning(tab_print("Warning! %s does not have a valid department name in the second field. Use --raw_data_subdir to provide a custom subdirectory for the raw data."%(parent_dir), 2)) continue raw_data_subdir = department except: - logging.warning(tab_print("Warning! %s does not have a valid department name in the second field. Use --raw_data_subdir to provide a custom subdirectory for the raw data."%(project_name), 2)) + logging.warning(tab_print("Warning! %s does not have a valid department name in the second field. Use --raw_data_subdir to provide a custom subdirectory for the raw data."%(parent_dir), 2)) continue full_mzml_path = os.path.join(raw_data_dir,raw_data_subdir,parent_dir)