From 1f353050aef2d4869e35d61bf68bc8b342ebad92 Mon Sep 17 00:00:00 2001 From: Dakota Howard <58985143+dthoward96@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:26:55 -0400 Subject: [PATCH] Bug fix process.py Bug fix for upload log. When only one database was submitted it, it would convert the database name into a list and error out. --- process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/process.py b/process.py index 9ac66c9..23d3585 100644 --- a/process.py +++ b/process.py @@ -79,7 +79,7 @@ def get_required_colnames(database, organism): # Check the config file def get_config(config_file, database): # Determine which portal is the database belongs to - submission_portals = ["NCBI" if x in ["BIOSAMPLE", "SRA", "GENBANK"] else "GISAID" for x in database] + submission_portals = ["NCBI" if x in ["BIOSAMPLE", "SRA", "GENBANK"] else "GISAID" if x in ["GISAID"] else "Unknown" for x in database] # Read in config file with open(config_file, "r") as f: config_dict = yaml.load(f, Loader=yaml.BaseLoader) # Load yaml as str only @@ -362,7 +362,7 @@ def update_submission_status(submission_dir, submission_name, organism, test): print("Error: Config file for "+submission_name+" does not exist at "+config_file, file=sys.stderr) sys.exit(1) else: - config_dict = get_config(config_file=config_file, database=database_name) + config_dict = get_config(config_file=config_file, database=database) # IF GISAID in a list of submitting databases, check if CLI is downloaded and store in the correct directory gisaid_cli = os.path.join(submission_dir, "gisaid_cli", organism.lower()+"CLI", organism.lower()+"CLI") if "GISAID" in database_name else None # Check if the gisaid_cli exists