Skip to content

Commit

Permalink
update DB
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdeep330 committed Apr 19, 2023
1 parent 5834632 commit ea4eaed
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions DB/make_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,13 @@ def create_homology_table(mycursor) -> None:
T_score FLOAT, V_score FLOAT, W_score FLOAT, Y_score FLOAT, \
info TEXT) \
")
dic = {}
data = []
num = 0
for row in tqdm(accs):
for acc_tuple in tqdm(accs):
dic = {}
num += 1
# if num == 10: break
acc = row[0]
acc = acc_tuple[0]
if os.path.isfile(path + acc[:4] + '/' + acc + fileEnd) is False:
print (path + acc[:4] + '/' + acc + fileEnd, 'does not exist')
continue
Expand All @@ -353,8 +353,8 @@ def create_homology_table(mycursor) -> None:
wtscore = float(line.split()[2])
mutscore = float(line.split()[3])
diffscore = float(line.split()[4])
info = line.split()[5].rstrip()
# info = '-'
# info = line.split()[5].rstrip()
info = '-'
if position not in dic: dic[position] = {'wtaa': wtaa, 'info': info}
dic[position][mutaa+'_score'] = mutscore
for position in range(1, len(dic)+1):
Expand Down Expand Up @@ -479,12 +479,12 @@ def create_kinases_table(mycursor)->None:
'''

# Create tables
# create_hmm_table(mycursor)
create_hmm_table(mycursor)
create_kinases_table(mycursor)
# create_mutations_table(mycursor)
create_mutations_table(mycursor)
create_homology_table(mycursor)
# create_ptm_table(mycursor)
# create_alignment_table(mycursor)
create_ptm_table(mycursor)
create_alignment_table(mycursor)
mydb.commit()

# Use mysqldump to create backup file
Expand Down

0 comments on commit ea4eaed

Please sign in to comment.