aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorAlexander_Kabui2023-01-23 13:13:11 +0300
committerAlexander_Kabui2023-01-23 13:13:11 +0300
commitb83e41162918619c11c475602743a682b6abd4c3 (patch)
tree9b090fa37b064d803355f10c581ba6282aa4986f /wqflask
parentdd2a8a5e28d2544780e98639db8d9a8180d2a558 (diff)
downloadgenenetwork2-b83e41162918619c11c475602743a682b6abd4c3.tar.gz
fetch id for a given probeset
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/correlation/correlation_file_generator.py39
1 files changed, 26 insertions, 13 deletions
diff --git a/wqflask/wqflask/correlation/correlation_file_generator.py b/wqflask/wqflask/correlation/correlation_file_generator.py
index 97b8bde8..36959229 100644
--- a/wqflask/wqflask/correlation/correlation_file_generator.py
+++ b/wqflask/wqflask/correlation/correlation_file_generator.py
@@ -25,18 +25,31 @@ def get_strains(conn, inbredsetid=1):
return cursor.fetchall()
+
def fetch_datasets(conn):
- #fi parents included?????
- with conn.cursor() as cursor:
- cursor.execute(
- "SELECT ProbeSet.Name, Strain.Name, ProbeSetData.value "
- "FROM Strain LEFT JOIN ProbeSetData "
- "ON Strain.Id = ProbeSetData.StrainId "
- "LEFT JOIN ProbeSetXRef ON ProbeSetData.Id = ProbeSetXRef.DataId "
- "LEFT JOIN ProbeSet ON ProbeSetXRef.ProbeSetId = ProbeSet.Id "
- "WHERE ProbeSetXRef.ProbeSetFreezeId IN "
- "(SELECT Id FROM ProbeSetFreeze WHERE Name = %s) "
- "ORDER BY Strain.Name",
- (db_name,))
- return cursor.fetchall()
+ # fi parents included?????
+ with conn.cursor() as cursor:
+ cursor.execute(
+ "SELECT ProbeSet.Name, Strain.Name, ProbeSetData.value "
+ "FROM Strain LEFT JOIN ProbeSetData "
+ "ON Strain.Id = ProbeSetData.StrainId "
+ "LEFT JOIN ProbeSetXRef ON ProbeSetData.Id = ProbeSetXRef.DataId "
+ "LEFT JOIN ProbeSet ON ProbeSetXRef.ProbeSetId = ProbeSet.Id "
+ "WHERE ProbeSetXRef.ProbeSetFreezeId IN "
+ "(SELECT Id FROM ProbeSetFreeze WHERE Name = %s) "
+ "ORDER BY Strain.Name",
+ (db_name,))
+ return cursor.fetchall()
+
+
+def get_probesetfreeze(conn, probes):
+
+ with conn.cursor() as cursor:
+ cursor.execute(
+ "SELECT ProbeSetFreeze.Id, ProbeSetFreeze.Name, ProbeSetFreeze.FullName "
+ "FROM ProbeSetFreeze "
+ "WHERE ProbeSetFreeze.Id=%s",
+ (probes,)
+ )
+ return cursor.fetchone()