def DepositSampleInfo(self):
########################
# Sample_info database #
########################
# Insert into DB
db = MySQLdb.connect(host="mbitdb1.cwnerb5rh4qg.us-east-1.rds.amazonaws.com", # your host, usually localhost
user="cmitaws", # your username
passwd="microbiome", # your password
db="Sample_info") # name of the data base
insert_OTU = ("INSERT INTO turnbaugh_mouse_diet_2015 "
"(sample_ID, disease_labels, keywords)"
"VALUES (%(sample_ID)s, %(disease_labels)s, %(keywords)s)")
cursor = db.cursor()
# CREATE sample info table
mysql_cmd1 = "create table " + data_summary.datasetID + " (sampleID VARCHAR(20), disease_labels VARCHAR(30), keywords VARCHAR(200));"
# Deposit sample info
DepositDB.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录