From 839c94df3c68ae4d1895abf5f45cb7e27ad5af81 Mon Sep 17 00:00:00 2001 From: Alexander Berger Date: Tue, 6 Aug 2024 13:36:20 -0400 Subject: [PATCH] Changing array_accum to array_agg --- pyproject.toml | 2 +- src/geneweaverdb.py | 4 ++-- src/uploadfiles.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 947ea896..4abc33b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "geneweaver-legacy" -version = "1.3.4" +version = "1.3.5" description = "" authors = ["Alexander Berger "] readme = "README.md" diff --git a/src/geneweaverdb.py b/src/geneweaverdb.py index b5c4bce1..9dc55926 100644 --- a/src/geneweaverdb.py +++ b/src/geneweaverdb.py @@ -4188,8 +4188,8 @@ def get_temp_geneset_values(geneset_id): """ with PooledCursor() as cursor: cursor.execute('''SELECT gs_id, ode_gene_id, avg(src_value) as gsv_value, - count(ode_gene_id) as gsv_hits, array_accum(src_id) as gsv_source_list, - array_accum(src_value) as gsv_value_list,'t' as gsv_in_threshold, now() as gsv_date + count(ode_gene_id) as gsv_hits, array_agg(src_id) as gsv_source_list, + array_agg(src_value) as gsv_value_list,'t' as gsv_in_threshold, now() as gsv_date FROM production.temp_geneset_value WHERE gs_id=%s GROUP BY gs_id, ode_gene_id ORDER BY ode_gene_id;''' % ( geneset_id,)) diff --git a/src/uploadfiles.py b/src/uploadfiles.py index 63302400..ff956a2d 100644 --- a/src/uploadfiles.py +++ b/src/uploadfiles.py @@ -780,8 +780,8 @@ def insert_into_geneset_value_by_gsid(gsid): cursor.execute('''INSERT INTO extsrc.geneset_value (gs_id, ode_gene_id, gsv_value, gsv_hits, gsv_source_list, gsv_value_list, gsv_in_threshold, gsv_date) SELECT gs_id, ode_gene_id, avg(src_value) as gsv_value, - count(ode_gene_id) as gsv_hits, array_accum(src_id) as gsv_source_list, - array_accum(src_value) as gsv_value_list,'t' as gsv_in_threshold, now() as gsv_date + count(ode_gene_id) as gsv_hits, array_agg(src_id) as gsv_source_list, + array_agg(src_value) as gsv_value_list,'t' as gsv_in_threshold, now() as gsv_date FROM production.temp_geneset_value WHERE gs_id=%s GROUP BY gs_id,ode_gene_id ORDER BY ode_gene_id;''' % (gsid,)) ## Update geneset sp_id and identifier