diff options
| author | Pjotr Prins | 2026-03-27 13:15:58 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2026-03-27 13:15:58 +0100 |
| commit | f6e63d3d53a3f4c03c646ccadf718920a0a1095e (patch) | |
| tree | 2f7fc652c2238e0fbe17f2117e9df18c69a441b1 /more_functions.py | |
| parent | 643bb3f622da68b109f3a99524713c8c1e66239b (diff) | |
| download | genecup-f6e63d3d53a3f4c03c646ccadf718920a0a1095e.tar.gz | |
Make sure paths are available
Diffstat (limited to 'more_functions.py')
| -rwxr-xr-x | more_functions.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/more_functions.py b/more_functions.py index 8162acc..7f12215 100755 --- a/more_functions.py +++ b/more_functions.py @@ -175,5 +175,12 @@ def searchArchived(sets, query, filetype,sents, path_user): gwas_json+="{ \"id\": \"" + edgeID + "\", \"source\": \"" + query + "\", \"target\": \"" + key + "\", \"sentCnt\": \"" + str(catCnt[key]) + "\", \"url\":\"/sentences?edgeID=" + edgeID + "\" },\n" return(nodes+edges,gwas_json,sn_file) -pubmed_path=os.environ["EDIRECT_PUBMED_MASTER"] +pubmed_path=os.environ.get("EDIRECT_PUBMED_MASTER", "./minipubmed") + +if not os.path.isdir(pubmed_path): + print(f"ERROR: EDIRECT_PUBMED_MASTER directory not found: {pubmed_path}") + raise SystemExit(1) +if not os.path.isdir(os.path.join(pubmed_path, "PubMed", "Archive")): + print(f"ERROR: PubMed/Archive not found in {pubmed_path}") + raise SystemExit(1) |
