Skip to content

Commit

Permalink
Merge pull request #22 from TheJacksonLaboratory/G3-457-view-similar-…
Browse files Browse the repository at this point in the history
…genesets-button-broken

G3-457: Fixing get similar Genesets button
  • Loading branch information
bergsalex authored Sep 20, 2024
2 parents 213a33c + c17d0fa commit 1c12d28
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "geneweaver-legacy"
version = "1.4.4"
version = "1.4.5"
description = ""
authors = ["Alexander Berger <alexander.berger@jax.org>"]
readme = "README.md"
Expand Down
6 changes: 3 additions & 3 deletions src/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -3306,9 +3306,9 @@ def render_sim_genesets(gs_id, grp_by):
species = []
species_map = {}

for sp_id, sp_name in geneweaverdb.get_all_species().items():
species.append([sp_id, sp_name])
species_map[sp_id] = sp_name
for sp_id_, sp_name in geneweaverdb.get_all_species().items():
species.append([sp_id_, sp_name])
species_map[sp_id_] = sp_name

# OK, OK, This is nasty. Loop through all curation tiers, then,
# for each curation tier, Loop through all species. Then, Loop through
Expand Down
5 changes: 4 additions & 1 deletion src/geneweaverdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3926,10 +3926,13 @@ def get_genesets_by_hom_id(hom_ids):
:param hom_ids:
:return: list of genesets
"""
if not isinstance(hom_ids, list):
hom_ids = [hom_ids]

with PooledCursor() as cursor:
geneset_list = []
for h in hom_ids:
cursor.execute('SELECT geneset_array FROM extsrc.hom2geneset WHERE hom_id=%s', (h,))
cursor.execute('SELECT geneset_array FROM extsrc.hom2geneset WHERE hom_id=ANY(%s)', (h,))
geneset_list.append(cursor.fetchone()[0])
list(set(geneset_list[0]))
return geneset_list
Expand Down

0 comments on commit 1c12d28

Please sign in to comment.