diff options
author | zsloan | 2018-04-13 15:47:42 +0000 |
---|---|---|
committer | zsloan | 2018-04-13 15:47:42 +0000 |
commit | eb24f53d7f5210ead3748772bb4126f78520f32c (patch) | |
tree | e58268dc13fb494818095021bf5e8510da6f7684 /scripts/maintenance/Update_Case_Attributes_MySQL_tab.py | |
parent | 9276e5eee9be7ed37fda5ea88aec2f1a238864ad (diff) | |
parent | 270f86c41f7c90cc4ca51bca0aec789a09a36a0e (diff) | |
download | genenetwork2-eb24f53d7f5210ead3748772bb4126f78520f32c.tar.gz |
Resolved conflicts for pulling from testing branch
Diffstat (limited to 'scripts/maintenance/Update_Case_Attributes_MySQL_tab.py')
-rw-r--r-- | scripts/maintenance/Update_Case_Attributes_MySQL_tab.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/maintenance/Update_Case_Attributes_MySQL_tab.py b/scripts/maintenance/Update_Case_Attributes_MySQL_tab.py new file mode 100644 index 00000000..0f8602c9 --- /dev/null +++ b/scripts/maintenance/Update_Case_Attributes_MySQL_tab.py @@ -0,0 +1,27 @@ +#!/usr/bin/python2 +######################################################################## +# Last Updated Apr 11, 2016 By Arthur and Zach +######################################################################## +import string +import sys +import MySQLdb +import getpass +import time +import csv +######################################################################## + +mydb = MySQLdb.connect(host='localhost', + user='username', + passwd='', + db='db_webqtl') +cursor = mydb.cursor() + +csv_data = csv.reader(file('GN711_pvalues.txt'), delimiter ="\t") +for row in csv_data: + + cursor.execute("""UPDATE ProbeSetXRef SET pValue = %s WHERE ProbeSetFreezeId = %s AND ProbeSetId = %s """, + (row)) +#close the connection to the database. +mydb.commit() +cursor.close() +print "Done"
\ No newline at end of file |