From d1f1c5c88a2a5c986c7099ddd91ca7a0fbf5dffc Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Fri, 9 Sep 2022 15:55:35 +0300 Subject: tissue:fetch for query formatting --- wqflask/base/mrna_assay_tissue_data.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wqflask/base/mrna_assay_tissue_data.py b/wqflask/base/mrna_assay_tissue_data.py index 9a86134e..a78182e3 100644 --- a/wqflask/base/mrna_assay_tissue_data.py +++ b/wqflask/base/mrna_assay_tissue_data.py @@ -83,14 +83,14 @@ class MrnaAssayTissueData: if len(id_list) > 0: results = [] with self.conn.cursor() as cursor: + cursor.execute( - "SELECT TissueProbeSetXRef.Symbol, " - "TissueProbeSetData.value FROM " - "TissueProbeSetXRef, TissueProbeSetData " - "WHERE TissueProbeSetData.Id IN (" - f"{', '.join(['%s' * len(id_list)])}) " - "AND TissueProbeSetXRef.DataId = TissueProbeSetData.Id", - tuple(id_list)) + "SELECT TissueProbeSetXRef.Symbol, TissueProbeSetData.value " + "FROM TissueProbeSetXRef, TissueProbeSetData" + f" WHERE TissueProbeSetData.Id IN ({', '.join(['%s'] * len(id_list))})" + " AND TissueProbeSetXRef.DataId = TissueProbeSetData.Id" + ,tuple(id_list)) + results = cursor.fetchall() for result in results: (symbol, value) = result -- cgit v1.2.3