aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorAlexander_Kabui2023-01-23 13:10:46 +0300
committerAlexander_Kabui2023-01-23 13:10:46 +0300
commit1e4eafe104fd55d4ffe7b2391d542260db714f31 (patch)
tree43fd61de627de026d2b0d26e44512a4d689a0e5a /wqflask
parent6bb9f94ea49a6c098744fe2d710a781263f8c5af (diff)
downloadgenenetwork2-1e4eafe104fd55d4ffe7b2391d542260db714f31.tar.gz
fetch all strain names
Diffstat (limited to 'wqflask')
-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()