aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn3/db/datasets.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gn3/db/datasets.py b/gn3/db/datasets.py
index 043be4c..171a70e 100644
--- a/gn3/db/datasets.py
+++ b/gn3/db/datasets.py
@@ -1,7 +1,6 @@
"""
This module contains functions relating to specific trait dataset manipulation
"""
-import os
from typing import Any
from pathlib import Path
@@ -16,11 +15,13 @@ def retrieve_sample_list(group: str):
"""
samplelist = []
- genofile_path = (
- f'{app.config.get("GENENETWORK_FILES", "/home/gn2/production/genotype_files/")}'
- f'/genotype/{group}.geno'
+ genofile_path = Path(
+ app.config.get(
+ "GENENETWORK_FILES",
+ "/home/gn2/production/genotype_files/"
+ ), f'genotype/{group}.geno'
)
- if os.path.isfile(genofile_path):
+ if genofile_path.is_file():
with open(genofile_path, encoding="utf-8") as genofile:
line = ""
for line in genofile: