From d5c8a84636b7fdb5934a67853287632253454416 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 12 Sep 2022 07:12:08 +0300 Subject: Fix query: Remove extraneous bracket --- wqflask/wqflask/correlation/rust_correlation.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wqflask/wqflask/correlation/rust_correlation.py b/wqflask/wqflask/correlation/rust_correlation.py index debc4930..8e8cd463 100644 --- a/wqflask/wqflask/correlation/rust_correlation.py +++ b/wqflask/wqflask/correlation/rust_correlation.py @@ -139,15 +139,15 @@ def compute_top_n_sample(start_vars, dataset, trait_list): # fetching strain data in bulk query = ( "SELECT * from ProbeSetData " - f"WHERE StrainID IN ({', '.join(['%s'] * len(sample_ids))})" - "AND id IN (" + f"WHERE StrainID IN ({', '.join(['%s'] * len(sample_ids))}) " + "AND Id IN (" " SELECT ProbeSetXRef.DataId " " FROM (ProbeSet, ProbeSetXRef, ProbeSetFreeze) " " WHERE ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id " " AND ProbeSetFreeze.Name = %s " " AND ProbeSet.Name " - f" IN ({', '.join(['%s'] * len(trait_list))})" - " ProbeSet.Id = ProbeSetXRef.ProbeSetId)" + f" IN ({', '.join(['%s'] * len(trait_list))}) " + " AND ProbeSet.Id = ProbeSetXRef.ProbeSetId" ")") curr.execute( query, -- cgit v1.2.3