From db6f7c5099445ce52ff8869438aabd4dc3b332f3 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 22 May 2023 17:39:52 +0000 Subject: Use f-string for setting genofile_path Also set default value for os.environ.get("GENENETWORK_FILES") --- gn3/db/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn3/db/datasets.py b/gn3/db/datasets.py index 4fdf797..4372818 100644 --- a/gn3/db/datasets.py +++ b/gn3/db/datasets.py @@ -13,7 +13,7 @@ def retrieve_sample_list(group: str): """ samplelist = [] - genofile_path = os.environ.get("GENENETWORK_FILES") + "/genotype/" + group + ".geno" + genofile_path = f"{os.environ.get("GENENETWORK_FILES", "/home/gn2/production/genotype_files/")}/genotype/{group}.geno" if os.path.isfile(genofile_path): with open(genofile_path, encoding="utf-8") as genofile: line = "" -- cgit v1.2.3