aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2022-10-10 18:27:40 +0000
committerzsloan2022-10-10 18:27:40 +0000
commit168de99b265d11509e67b8bc32bf26643b108d5b (patch)
treebe643c44dc6517c8a2f84fde8748bed16659f7b6
parent3243599530102c8053868c060872f6dfa28a7f1c (diff)
downloadgenenetwork2-168de99b265d11509e67b8bc32bf26643b108d5b.tar.gz
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)
-rw-r--r--wqflask/wqflask/interval_analyst/GeneUtil.py12
1 files 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,