aboutsummaryrefslogtreecommitdiff
path: root/gn3/db/correlations.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-11-26 11:54:17 +0300
committerFrederick Muriuki Muriithi2021-11-29 12:05:16 +0300
commit109b233f698a2ce41bb5634f12e966ad02798819 (patch)
treeaf56d973efeb3a864c13b2105f1e8978478410a7 /gn3/db/correlations.py
parent0f9247fffc7127bdb3c35492a37706a2db01a26c (diff)
downloadgenenetwork3-109b233f698a2ce41bb5634f12e966ad02798819.tar.gz
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
Diffstat (limited to 'gn3/db/correlations.py')
-rw-r--r--gn3/db/correlations.py4
1 files changed, 3 insertions, 1 deletions
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])