aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance/dataset
diff options
context:
space:
mode:
authorLei Yan2014-01-24 23:42:56 -0600
committerLei Yan2014-01-24 23:42:56 -0600
commitb9acdec0979bedb05240bc4bf9284ff00e29387a (patch)
tree23fc319407570bd4d906d1bad55dccd23cb07ed7 /wqflask/maintenance/dataset
parentc631ea00b9592251977b2f44d3b003e04c665185 (diff)
downloadgenenetwork2-b9acdec0979bedb05240bc4bf9284ff00e29387a.tar.gz
On branch master
Diffstat (limited to 'wqflask/maintenance/dataset')
-rw-r--r--wqflask/maintenance/dataset/phenotypes/phenotypes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/maintenance/dataset/phenotypes/phenotypes.py b/wqflask/maintenance/dataset/phenotypes/phenotypes.py
index 28fd3398..843b2dfd 100644
--- a/wqflask/maintenance/dataset/phenotypes/phenotypes.py
+++ b/wqflask/maintenance/dataset/phenotypes/phenotypes.py
@@ -9,6 +9,9 @@ import MySQLdb
def fetch():
# parameters
inbredsetid = 1
+ phenotypesfile = open('bxdphenotypes.txt', 'w+')
+ #
+ phenotypesfile.write("id\tOriginal_description\tPre_publication_description\tPost_publication_description\t")
# open db
host = 'localhost'
user = 'webqtl'
@@ -32,6 +35,7 @@ def fetch():
strain = strain.lower()
strains.append(strain)
print "get %d strains: %s" % (len(strains), strains)
+ phenotypesfile.write('\t'.join([strain.upper() for strain in strains]))
#
sql = """
SELECT PublishXRef.`Id`, Phenotype.`Original_description`, Phenotype.`Pre_publication_description`, Phenotype.`Post_publication_description`
@@ -61,6 +65,8 @@ def fetch():
for strainvalue in results:
print strainvalue
break
+ # release
+ phenotypesfile.close()
# main
if __name__ == "__main__":