From 2c6abd47b78bea42423aa45f417897525f63f8a2 Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Tue, 4 Feb 2014 11:00:38 -0600 Subject: On branch master --- wqflask/maintenance/dataset/probesets.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/maintenance/dataset/probesets.py b/wqflask/maintenance/dataset/probesets.py index fbe54108..2c755203 100644 --- a/wqflask/maintenance/dataset/probesets.py +++ b/wqflask/maintenance/dataset/probesets.py @@ -15,7 +15,7 @@ def get_probesetxref(probesetfreezeid): def get_probeset(probesetid): cursor = utilities.get_cursor() sql = """ - SELECT * + SELECT ProbeSet.`Id`, ProbeSet.`Name`, ProbeSet.`Symbol`, ProbeSet.`description`, ProbeSet.`Probe_Target_Description`, ProbeSet.`Chr`, ProbeSet.`Mb` FROM ProbeSet WHERE ProbeSet.`Id`=%s """ @@ -57,4 +57,15 @@ def get_probesetxref_inbredsetid(locus, inbredsetid): cursor.execute(sql, (inbredsetid, locus)) return cursor.fetchall() -print get_probesetxref_inbredsetid(locus="rs3663871", inbredsetid=1) \ No newline at end of file +def get_normalized_probeset(locus, inbredsetid): + normalized_probesets = [] + probesetxrefs = get_probesetxref_inbredsetid(locus, inbredsetid) + for probesetxref in probesetxrefs: + normalized_probeset = [] + probesetid = probesetxref[0] + probeset = get_probeset(probesetid) + normalized_probeset.append(probeset) + normalized_probesets.append(normalized_probeset) + print normalized_probesets + +get_normalized_probeset(locus="rs3663871", inbredsetid=1) -- cgit v1.2.3