From 168de99b265d11509e67b8bc32bf26643b108d5b Mon Sep 17 00:00:00 2001 From: zsloan Date: Mon, 10 Oct 2022 18:27:40 +0000 Subject: Replace GeneList table name with new table Once this is confirmed to be working as expected, it will be changed back to GeneList (and the old table's name will be changed) --- wqflask/wqflask/interval_analyst/GeneUtil.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wqflask/wqflask/interval_analyst/GeneUtil.py b/wqflask/wqflask/interval_analyst/GeneUtil.py index 1da93b42..b1cfd0ee 100644 --- a/wqflask/wqflask/interval_analyst/GeneUtil.py +++ b/wqflask/wqflask/interval_analyst/GeneUtil.py @@ -13,10 +13,10 @@ def loadGenes(chrName, diffCol, startMb, endMb, species='mouse'): speciesDict = {} results = [] with database_connection() as conn, conn.cursor() as cursor: - cursor.execute("SELECT Species.Name, GeneList.SpeciesId " - "FROM Species, GeneList WHERE " - "GeneList.SpeciesId = Species.Id " - "GROUP BY GeneList.SpeciesId") + cursor.execute("SELECT Species.Name, GeneList081722.SpeciesId " + "FROM Species, GeneList081722 WHERE " + "GeneList081722.SpeciesId = Species.Id " + "GROUP BY GeneList081722.SpeciesId") results = cursor.fetchall() for item in results: speciesDict[item[0]] = item[1] @@ -25,7 +25,7 @@ def loadGenes(chrName, diffCol, startMb, endMb, species='mouse'): speciesId = speciesDict[species] otherSpecies = [[X, speciesDict[X]] for X in list(speciesDict.keys())] otherSpecies.remove([species, speciesId]) - cursor.execute(f"SELECT {', '.join(fetchFields)} FROM GeneList " + cursor.execute(f"SELECT {', '.join(fetchFields)} FROM GeneList081722 " "WHERE SpeciesId = %s AND " "Chromosome = %s AND " "((TxStart > %s and TxStart <= %s) " @@ -68,7 +68,7 @@ def loadGenes(chrName, diffCol, startMb, endMb, species='mouse'): othSpec, othSpecId = item newdict2 = {} cursor.execute( - f"SELECT {', '.join(fetchFields)} FROM GeneList WHERE " + f"SELECT {', '.join(fetchFields)} FROM GeneList081722 WHERE " "SpeciesId = %s AND " "geneSymbol= %s LIMIT 1", (othSpecId, -- cgit v1.2.3