From 27ca533a565226c1e29613d1ec0b5dddac103920 Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 2 Aug 2023 19:06:57 +0000 Subject: Fix mrna group name query --- gn3/db/datasets.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gn3') 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}) -- cgit v1.2.3