diff options
author | Frederick Muriuki Muriithi | 2021-12-23 05:09:14 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-01-10 08:15:19 +0300 |
commit | bebf05c5975c706be05053d362ababd2419250be (patch) | |
tree | b66a37697c48e315cc5e29ba002e2946acf15f50 /gn3/computations | |
parent | eda15b5ea1bf773d69ea750a946d1cb61f5d3509 (diff) | |
download | genenetwork3-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.py | 2 |
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"], |