From e19ad95d90c9a56935731fb3f4cb371b9a262ab7 Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 28 Nov 2022 21:03:46 +0000 Subject: Fix bug where single chromosome mapping view wouldn't work for the X chromosome --- wqflask/wqflask/interval_analyst/GeneUtil.py | 2 +- wqflask/wqflask/marker_regression/display_mapping_results.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wqflask/wqflask/interval_analyst/GeneUtil.py b/wqflask/wqflask/interval_analyst/GeneUtil.py index 1f9f329b..7a69126c 100644 --- a/wqflask/wqflask/interval_analyst/GeneUtil.py +++ b/wqflask/wqflask/interval_analyst/GeneUtil.py @@ -67,7 +67,7 @@ def loadGenes(chrName, diffCol, startMb, endMb, species='mouse'): if diffCol and species == 'mouse': cursor.execute( "SELECT count(*) FROM BXDSnpPosition " - "WHERE Chr = '%s' AND " + "WHERE Chr = %s AND " "Mb >= %s AND Mb < %s " "AND StrainId1 = %s AND StrainId2 = %s", (chrName, f"{newdict['TxStart']:2.6f}", diff --git a/wqflask/wqflask/marker_regression/display_mapping_results.py b/wqflask/wqflask/marker_regression/display_mapping_results.py index dfd4bd87..eeff807c 100644 --- a/wqflask/wqflask/marker_regression/display_mapping_results.py +++ b/wqflask/wqflask/marker_regression/display_mapping_results.py @@ -560,14 +560,14 @@ class DisplayMappingResults: else: chrName = self.selectedChr self.geneCol = GeneUtil.loadGenes( - chrName, self.diffCol, self.startMb, self.endMb, "mouse") + str(chrName), self.diffCol, self.startMb, self.endMb, "mouse") elif self.dataset.group.species == "rat": if self.selectedChr == 21: chrName = "X" else: chrName = self.selectedChr self.geneCol = GeneUtil.loadGenes( - chrName, self.diffCol, self.startMb, self.endMb, "rat") + str(chrName), self.diffCol, self.startMb, self.endMb, "rat") if self.geneCol and self.intervalAnalystChecked: ####################################################################### -- cgit v1.2.3