Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G3-457: Fixing get similar Genesets button #22

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>"]
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
Loading