From b9acdec0979bedb05240bc4bf9284ff00e29387a Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Fri, 24 Jan 2014 23:42:56 -0600 Subject: On branch master --- wqflask/maintenance/dataset/phenotypes/phenotypes.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'wqflask') 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__": -- cgit v1.2.3