Nathalie BERNARD

légère correction

...@@ -257,8 +257,8 @@ def get_list_structs_contacts(path_benchmark, estimator, function): ...@@ -257,8 +257,8 @@ def get_list_structs_contacts(path_benchmark, estimator, function):
257 myfile = open(path_benchmark, "r") 257 myfile = open(path_benchmark, "r")
258 list_name = [] 258 list_name = []
259 259
260 - complete_list_struct2d_F = [] 260 + complete_list_struct2d = []
261 - complete_list_contacts_F = [] 261 + complete_list_contacts = []
262 262
263 name = myfile.readline() 263 name = myfile.readline()
264 contacts = myfile.readline() 264 contacts = myfile.readline()
...@@ -268,11 +268,11 @@ def get_list_structs_contacts(path_benchmark, estimator, function): ...@@ -268,11 +268,11 @@ def get_list_structs_contacts(path_benchmark, estimator, function):
268 while seq: 268 while seq:
269 name = name[6:].strip() 269 name = name[6:].strip()
270 count = count + 1 270 count = count + 1
271 - file_path = "results/test_" + name + ".json_pm" + function +"_" + estimator 271 + file_path = "results/test_" + name + ".json_pm" + function + "_" + estimator
272 if os.path.isfile(file_path): 272 if os.path.isfile(file_path):
273 file_result = open(file_path, "r") 273 file_result = open(file_path, "r")
274 - list_struct2d_F = [] 274 + list_struct2d = []
275 - list_contacts_F = [] 275 + list_contacts = []
276 list_name.append(name) 276 list_name.append(name)
277 title_prd = file_result.readline() 277 title_prd = file_result.readline()
278 structure_prd = file_result.readline() 278 structure_prd = file_result.readline()
...@@ -282,20 +282,20 @@ def get_list_structs_contacts(path_benchmark, estimator, function): ...@@ -282,20 +282,20 @@ def get_list_structs_contacts(path_benchmark, estimator, function):
282 if (len(structure_prd) != 0): 282 if (len(structure_prd) != 0):
283 mcc_tab = compare_two_structures(structure2d, structure_prd[:len(sequence)]) 283 mcc_tab = compare_two_structures(structure2d, structure_prd[:len(sequence)])
284 mcc_str = mattews_corr_coeff(mcc_tab[0], mcc_tab[1], mcc_tab[2], mcc_tab[3]) 284 mcc_str = mattews_corr_coeff(mcc_tab[0], mcc_tab[1], mcc_tab[2], mcc_tab[3])
285 - list_struct2d_F.append(mcc_str) 285 + list_struct2d.append(mcc_str)
286 286
287 contacts_prd = file_result.readline() 287 contacts_prd = file_result.readline()
288 if (len(contacts_prd) == len(contacts)): 288 if (len(contacts_prd) == len(contacts)):
289 mcc_tab = compare_two_contacts(contacts, contacts_prd) 289 mcc_tab = compare_two_contacts(contacts, contacts_prd)
290 mcc_ctc = mattews_corr_coeff(mcc_tab[0], mcc_tab[1], mcc_tab[2], mcc_tab[3]) 290 mcc_ctc = mattews_corr_coeff(mcc_tab[0], mcc_tab[1], mcc_tab[2], mcc_tab[3])
291 - list_contacts_F.append(mcc_ctc) 291 + list_contacts.append(mcc_ctc)
292 - complete_list_struct2d_F.append(list_struct2d_F) 292 + complete_list_struct2d.append(list_struct2d)
293 - complete_list_contacts_F.append(list_contacts_F) 293 + complete_list_contacts.append(list_contacts)
294 name = myfile.readline() 294 name = myfile.readline()
295 contacts = myfile.readline() 295 contacts = myfile.readline()
296 seq = myfile.readline() 296 seq = myfile.readline()
297 structure2d = myfile.readline() 297 structure2d = myfile.readline()
298 - return [list_name, complete_list_struct2d_F, complete_list_contacts_F] 298 + return [list_name, complete_list_struct2d, complete_list_contacts]
299 myfile.close() 299 myfile.close()
300 300
301 def get_half(list): 301 def get_half(list):
...@@ -469,25 +469,30 @@ while seq: ...@@ -469,25 +469,30 @@ while seq:
469 cmd2 = ("cppsrc/Scripts/deletePdb " + name) 469 cmd2 = ("cppsrc/Scripts/deletePdb " + name)
470 os.system(cmd2) 470 os.system(cmd2)
471 471
472 - execute_command(path2, 'A', 'MEA', list_contacts_A_MEA, list_struct2d_A_MEA, 'desc') 472 + """execute_command(path2, 'A', 'MEA', list_contacts_A_MEA, list_struct2d_A_MEA, 'desc')
473 execute_command(path2, 'A', 'MFE', list_contacts_A_MFE, list_struct2d_A_MFE, 'desc') 473 execute_command(path2, 'A', 'MFE', list_contacts_A_MFE, list_struct2d_A_MFE, 'desc')
474 execute_command(path2, 'B', 'MEA', list_contacts_B_MEA, list_struct2d_B_MEA, 'desc') 474 execute_command(path2, 'B', 'MEA', list_contacts_B_MEA, list_struct2d_B_MEA, 'desc')
475 - execute_command(path2, 'B', 'MFE', list_contacts_B_MFE, list_struct2d_B_MFE, 'desc') 475 + execute_command(path2, 'B', 'MFE', list_contacts_B_MFE, list_struct2d_B_MFE, 'desc')"""
476 +
477 + execute_command(path2, 'A', 'MEA', list_contacts_A_MEA, list_struct2d_A_MEA, 'rin')
478 + execute_command(path2, 'A', 'MFE', list_contacts_A_MFE, list_struct2d_A_MFE, 'rin')
479 + execute_command(path2, 'B', 'MEA', list_contacts_B_MEA, list_struct2d_B_MEA, 'rin')
480 + execute_command(path2, 'B', 'MFE', list_contacts_B_MFE, list_struct2d_B_MFE, 'rin')
476 481
477 name = myfile.readline() 482 name = myfile.readline()
478 contacts = myfile.readline() 483 contacts = myfile.readline()
479 seq = myfile.readline() 484 seq = myfile.readline()
480 structure2d = myfile.readline() 485 structure2d = myfile.readline()
481 486
482 -visualization_best_mcc(list_struct2d_A_MFE, list_contacts_A_MFE, 'MFE', 'A', 'desc', 'red', '#900C3F') 487 +visualization_best_mcc(list_struct2d_A_MFE, list_contacts_A_MFE, 'MFE', 'A', 'rin', 'red', '#900C3F')
483 -visualization_best_mcc(list_struct2d_B_MFE, list_contacts_B_MFE, 'MFE', 'B', 'desc', 'blue', '#0900FF') 488 +visualization_best_mcc(list_struct2d_B_MFE, list_contacts_B_MFE, 'MFE', 'B', 'rin', 'blue', '#0900FF')
484 -visualization_best_mcc(list_struct2d_A_MEA, list_contacts_A_MEA, 'MEA', 'A', 'desc', 'red', '#900C3F') 489 +visualization_best_mcc(list_struct2d_A_MEA, list_contacts_A_MEA, 'MEA', 'A', 'rin', 'red', '#900C3F')
485 -visualization_best_mcc(list_struct2d_B_MEA, list_contacts_B_MEA, 'MEA', 'B', 'desc', 'blue', '#0900FF') 490 +visualization_best_mcc(list_struct2d_B_MEA, list_contacts_B_MEA, 'MEA', 'B', 'rin', 'blue', '#0900FF')
486 491
487 myfile.close() 492 myfile.close()
488 493
489 path_benchmark = "data/modules/ISAURE/Motifs_version_initiale/benchmark.txt" 494 path_benchmark = "data/modules/ISAURE/Motifs_version_initiale/benchmark.txt"
490 -visualization_all_mcc(path_benchmark,'MEA', 'B', 'desc')
491 -visualization_all_mcc(path_benchmark,'MEA', 'A', 'desc')
492 -visualization_all_mcc(path_benchmark,'MFE', 'A', 'desc')
493 -visualization_all_mcc(path_benchmark,'MFE', 'B', 'desc')
...\ No newline at end of file ...\ No newline at end of file
495 +visualization_all_mcc(path_benchmark,'MEA', 'B', 'rin')
496 +visualization_all_mcc(path_benchmark,'MEA', 'A', 'rin')
497 +visualization_all_mcc(path_benchmark,'MFE', 'A', 'rin')
498 +visualization_all_mcc(path_benchmark,'MFE', 'B', 'rin')
...\ No newline at end of file ...\ No newline at end of file
......