diff options
author | Alexander_Kabui | 2023-01-23 13:12:11 +0300 |
---|---|---|
committer | Alexander_Kabui | 2023-01-23 13:12:11 +0300 |
commit | dd2a8a5e28d2544780e98639db8d9a8180d2a558 (patch) | |
tree | fc553325d9498562968f20e606ce0b2e6869505f | |
parent | 1e4eafe104fd55d4ffe7b2391d542260db714f31 (diff) | |
download | genenetwork2-dd2a8a5e28d2544780e98639db8d9a8180d2a558.tar.gz |
fetch all strains for a given dataset
-rw-r--r-- | wqflask/wqflask/correlation/correlation_file_generator.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/wqflask/wqflask/correlation/correlation_file_generator.py b/wqflask/wqflask/correlation/correlation_file_generator.py index 28e12bf7..97b8bde8 100644 --- a/wqflask/wqflask/correlation/correlation_file_generator.py +++ b/wqflask/wqflask/correlation/correlation_file_generator.py @@ -24,3 +24,19 @@ 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() |