aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/correlation/correlation_file_generator.py33
1 files changed, 23 insertions, 10 deletions
diff --git a/wqflask/wqflask/correlation/correlation_file_generator.py b/wqflask/wqflask/correlation/correlation_file_generator.py
index f9421a65..28e12bf7 100644
--- a/wqflask/wqflask/correlation/correlation_file_generator.py
+++ b/wqflask/wqflask/correlation/correlation_file_generator.py
@@ -1,13 +1,26 @@
-def get_probesetfreezes(conn,inbredsetid=1):
+def get_probesetfreezes(conn, inbredsetid=1):
+ with conn.cursor() as cursor:
+ cursor.execute(
+ "SELECT ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName "
+ "FROM ProbeSetFreeze, ProbeFreeze "
+ "WHERE ProbeSetFreeze.ProbeFreezeId=ProbeFreeze.Id "
+ "AND ProbeFreeze.InbredSetId=%s",
+ (inbredsetid,)
+ )
+ return cursor.fetchall()
- with conn.cursor() as cursor:
- cursor.execute(
- "SELECT ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName "
- "FROM ProbeSetFreeze, ProbeFreeze "
- "WHERE ProbeSetFreeze.ProbeFreezeId=ProbeFreeze.Id "
- "AND ProbeFreeze.InbredSetId=%s",
- (inbredsetid,)
- )
- return cursor.fetchall()
+def get_strains(conn, inbredsetid=1):
+
+ with conn.cursor() as cursor:
+ cursor.execute(
+ "SELECT Strain.Id, Strain.Name "
+ "FROM StrainXRef, Strain "
+ "WHERE StrainXRef.InbredSetId=%s "
+ "AND StrainXRef.StrainId=Strain.Id "
+ "ORDER BY StrainXRef.OrderId",
+ (inbredsetid)
+ )
+
+ return cursor.fetchall()