aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2023-04-11 18:25:04 +0300
committerAlexander_Kabui2023-04-11 18:25:04 +0300
commit7fcd0aee1d9753856c14c8b4a21c6094dc7727ff (patch)
treeba09c1f8f3138a198d5b79db4b20651946031b59
parent8cf19b761c036f94e20c1ba7e214134173d9484c (diff)
downloadgenenetwork2-7fcd0aee1d9753856c14c8b4a21c6094dc7727ff.tar.gz
modify default textfile path
-rw-r--r--wqflask/wqflask/correlation/pre_computes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/wqflask/correlation/pre_computes.py b/wqflask/wqflask/correlation/pre_computes.py
index f21ec06a..961f5161 100644
--- a/wqflask/wqflask/correlation/pre_computes.py
+++ b/wqflask/wqflask/correlation/pre_computes.py
@@ -171,13 +171,13 @@ def get_datasets_data(base_dataset, target_dataset_data):
return (target_results, base_results)
-def fetch_text_file(dataset_name, conn, text_dir=TEXTDIR):
+def fetch_text_file(dataset_name, conn, text_dir=TMPDIR):
"""fetch textfiles with strain vals if exists"""
def __file_scanner__(text_dir,target_file):
for file in os.listdir(text_dir):
- if file.startswith(f"ProbeSetFreezeId_{results[0]}_"):
+ if file.startswith(f"ProbeSetFreezeId_{target_file}_"):
return os.path.join(text_dir,file)
with conn.cursor() as cursor:
@@ -186,9 +186,9 @@ def fetch_text_file(dataset_name, conn, text_dir=TEXTDIR):
results = cursor.fetchone()
if results:
try:
- # addition check for matrix file in gn_matrix folder
+ # checks first for recently generated textfiles if not use gn1 datamatrix
- return __file_scanner__(text_dir,results) or __file_scanner__(TEXTDIR,results)
+ return __file_scanner__(text_dir,results[0]) or __file_scanner__(TEXTDIR,results[0])
except Exception:
pass