diff options
author | acenteno | 2020-04-21 17:35:34 -0500 |
---|---|---|
committer | GitHub | 2020-04-21 17:35:34 -0500 |
commit | 660589b9c2a507529e8e51ca6ce66ca97ad982c5 (patch) | |
tree | 27f63957278581bc2fce2b88744bfe20c8a81558 /scripts/maintenance/Update_Case_Attributes_MySQL_tab.py | |
parent | d97fdc18359233f07c1a1c7b83fe7e88eb225043 (diff) | |
parent | f2a3ae13231a7d270a5bb6911c248aa713f1ef91 (diff) | |
download | genenetwork2-660589b9c2a507529e8e51ca6ce66ca97ad982c5.tar.gz |
Merge pull request #1 from genenetwork/testing
Updating my 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 |