aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorLei Yan2014-02-12 21:50:53 -0600
committerLei Yan2014-02-12 21:50:53 -0600
commit30a77dd32c07d05a43ddbc34b88e59bc93f4d240 (patch)
tree4fd7e6a8de31155b08c537afe557a15b48881b93 /wqflask/maintenance
parentc40f365b9a5c42f0b58155525939652efaf6b9a2 (diff)
downloadgenenetwork2-30a77dd32c07d05a43ddbc34b88e59bc93f4d240.tar.gz
On branch master
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r--wqflask/maintenance/dataset/specials3.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/wqflask/maintenance/dataset/specials3.py b/wqflask/maintenance/dataset/specials3.py
index 8d878ed4..727e32f2 100644
--- a/wqflask/maintenance/dataset/specials3.py
+++ b/wqflask/maintenance/dataset/specials3.py
@@ -79,6 +79,7 @@ def generate_probesets(probesetfreezesfile, outputdir):
outputfile = open("%s/%d_%s.txt" % (outputdir, probesetfreezeid, probesetfreezename), "w+")
outputfile.write("%s\t" % "ProbeSet Id")
outputfile.write("%s\t" % "ProbeSet Name")
+ outputfile.write('\t'.join([strain[1].upper() for strain in strains]))
outputfile.write("\n")
outputfile.flush()
#
@@ -86,15 +87,24 @@ def generate_probesets(probesetfreezesfile, outputdir):
print probesetfreeze
print len(probesetxrefs)
for probesetxref in probesetxrefs:
- pass
- #
- probesetid = probesetxref[0]
- probesetdataid = probesetxref[1]
- probeset = probesets.get_probeset(probesetid)
- probesetname = probeset[1]
- probesetdata = probesets.get_probesetdata(probesetdataid)
- probesetdata = zip(*probesetdata)
- probesetdata = utilities.to_dic([strain.lower() for strain in probesetdata[1]], probesetdata[2])
+ probesetid = probesetxref[0]
+ probesetdataid = probesetxref[1]
+ probeset = probesets.get_probeset(probesetid)
+ probesetname = probeset[1]
+ probesetdata = probesets.get_probesetdata(probesetdataid)
+ probesetdata = zip(*probesetdata)
+ probesetdata = utilities.to_dic([strain.lower() for strain in probesetdata[1]], probesetdata[2])
+ #
+ for strain in strains:
+ strainname = strain[1]
+ strainname = strainname.lower()
+ if strainname in probesetdata:
+ value = probesetdata[strainname]
+ else:
+ value = 'x'
+ outputfile.write("%s\t" % value)
+ outputfile.write("\n")
+ outputfile.flush()
#
outputfile.close()
file.close()