From 109b233f698a2ce41bb5634f12e966ad02798819 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 26 Nov 2021 11:54:17 +0300 Subject: Fix bugs in data Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * Process the db_name and db_type values. * Return data correctly --- gn3/db/correlations.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gn3/db') diff --git a/gn3/db/correlations.py b/gn3/db/correlations.py index ab4dc2c..401fd91 100644 --- a/gn3/db/correlations.py +++ b/gn3/db/correlations.py @@ -467,6 +467,8 @@ def fetch_all_database_data(# pylint: disable=[R0913, R0914] `web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function in GeneNetwork1. """ + db_type = dataset["dataset_type"] + db_name = dataset["dataset_name"] def __build_query__(sample_ids, temp_table): sample_id_columns = ", ".join(f"T{smpl}.value" for smpl in sample_ids) if db_type == "Publish": @@ -551,4 +553,4 @@ def fetch_all_database_data(# pylint: disable=[R0913, R0914] with conn.cursor() as cursor: cursor.execute(f"DROP TEMPORARY TABLE {temp_table}") - return (tuple(item[0] for item in trait_database), trait_database[0][1]) + return (trait_database[0], trait_database[1]) -- cgit v1.2.3