aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2021-12-23 05:09:14 +0300
committerFrederick Muriuki Muriithi2022-01-10 08:15:19 +0300
commitbebf05c5975c706be05053d362ababd2419250be (patch)
treeb66a37697c48e315cc5e29ba002e2946acf15f50 /gn3/computations
parenteda15b5ea1bf773d69ea750a946d1cb61f5d3509 (diff)
downloadgenenetwork3-bebf05c5975c706be05053d362ababd2419250be.tar.gz
Rework database functions to fetch multiple items
Issue: https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi * In an attempt to optimise the performance of the partial correlations feature, this commit reworks some database access functions to fetch multiple items from the database, per query, unlike their original forms which would fetch a single item per query. This reduces queries to the database, and should hopefully improve the responsiveness of the partial correlations feature.
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/partial_correlations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py
index 984c15a..0d4394b 100644
--- a/gn3/computations/partial_correlations.py
+++ b/gn3/computations/partial_correlations.py
@@ -539,7 +539,7 @@ def trait_for_output(trait):
pair just to indicate it does not exist.
"""
trait = {
- "trait_type": trait["trait_type"],
+ "trait_type": trait["db"]["dataset_type"],
"dataset_name": trait["db"]["dataset_name"],
"dataset_type": trait["db"]["dataset_type"],
"group": trait["db"]["group"],