aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorzsloan2023-08-02 19:06:57 +0000
committerzsloan2023-08-17 14:54:42 -0500
commit27ca533a565226c1e29613d1ec0b5dddac103920 (patch)
treee0bddf04774e1f113600407543b0dfe3770dc66d /gn3
parent516dd9bf9ab59110897985cc57b9bb8d9c7907d0 (diff)
downloadgenenetwork3-27ca533a565226c1e29613d1ec0b5dddac103920.tar.gz
Fix mrna group name query
Diffstat (limited to 'gn3')
-rw-r--r--gn3/db/datasets.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/gn3/db/datasets.py b/gn3/db/datasets.py
index 58bbcf5..38819db 100644
--- a/gn3/db/datasets.py
+++ b/gn3/db/datasets.py
@@ -44,10 +44,11 @@ def retrieve_mrna_group_name(connection: Any, probeset_id: int):
of the group the dataset belongs to.
"""
query = (
- "SELECT iset.Name "
- "FROM ProbeSet AS ps "
- "INNER JOIN ProbeSetXRef AS px ON ps.Id = px.ProbeSetId "
- "INNER JOIN InbredSet AS id ON px.InbredSetId = is.Id "
+ "SELECT is.Name "
+ "FROM ProbeSet ps LEFT JOIN ProbeSetXRef psx ON px.ProbeSetId = ps.Id "
+ "INNER JOIN ProbeSetFreeze psf ON psx.ProbeSetFreezeId = psf.Id "
+ "INNER JOIN ProbeFreeze pf ON psf.ProbeFreezeId = ProbeFreeze.Id "
+ "INNER JOIN InbredSet is ON pf.InbredSetId = is.Id "
"WHERE ps.Id = %(probeset_id)s")
with connection.cursor() as cursor:
cursor.execute(query, {"probeset_id": probeset_id})