-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModellerGUI.py
584 lines (473 loc) · 27.3 KB
/
ModellerGUI.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
import threading
import tkFileDialog, shutil # For Copying file from one folder to another
from datetime import datetime
from Tkinter import *
import os
import random
from Tkinter import *
from modeller import *
from modeller.automodel import *
from modeller.scripts import complete_pdb
import glob,os
import wget
import sys
selected_PDB=" "
maxE = 0.0
count = 0
intvar =""
pdb_var = ""
pdb=""
chain = ""
intvar2 = 0.0
intvar3 = []
evalueList = []
e_value = 0.0
coverage=0.0
seq_len=0
i=""
j=""
new_text =""
list1=""
count=0
iterationCount = 0
# Creating mandatory folders
mydir = datetime.now().strftime("%Y-%m-%d __ [%I-%M-%S-%p]")
# To check the current selected alignment file from /alignments folder
def after_loop_lab1_2(selected_PDB):
new_text = selected_PDB
lab1_2 = Label(win,text=new_text, font="Times 16", bg="white",fg='black',cursor='arrow',).grid(row=1 , column=1)
# modellerF()
# call again after 500 ms
# win.after(100, after_loop_lab1_3)
#-----
def after_loop_lab2_2(pdb_name):
new_text = pdb_name
lab2_2 = Label(win, text='pdb_95.pir',font="Times 16 ", bg="white" ,anchor='w',padx=100,pady=5, fg='black',relief=SUNKEN).grid(row=3,column=1)
#-----
# def changeValue():
# new_text = random.randint(1,101)
# lab1_2 = Label(win,text=new_text, font="Times 16 bold", bg="white").grid(row=0, column=1)
# win.after(500,changeValue)
#-----
def modellerF():
# Gerenating Logs
log.verbose()
env = environ()
function0()
function1()
os.makedirs(os.path.join(os.getcwd()+"\\Data\\",mydir))
os.makedirs(os.path.join(os.getcwd()+"\\Data\\",mydir+"\\Inputs"))
os.makedirs(os.path.join(os.getcwd()+"\\Data\\",mydir+"\\PRF"))
os.makedirs(os.path.join(os.getcwd()+"\\Data\\",mydir+"\\PDB"))
os.makedirs(os.path.join(os.getcwd()+"\\Data\\",mydir+"\\Output ALI"))
os.makedirs(os.path.join(os.getcwd()+"\\Data\\",mydir+"\\PAP"))
os.makedirs(os.path.join(os.getcwd()+"\\Data\\",mydir+"\\Logs"))
# shutil.copy(os.getcwd()+"\\Data\\Inputs\\*.*", os.getcwd()+"\\Data\\"+mydir+"\\Inputs\\*.*")
# Using Glob Module. Now we can find the files having specific format i.e. .py
files1 = os.listdir(os.getcwd()+"\\Inputs")
for f in files1:
full_file_name = os.path.join(os.getcwd()+"\\Inputs", f)
if (os.path.isfile(full_file_name)):
shutil.copy(full_file_name, os.getcwd()+"\\Data\\"+mydir+"\\Inputs")
# # Using Glob Module. Now we can find the files having specific format i.e. .py
# files1 = os.listdir(os.getcwd()+"\\Alignments")
# for f in files1:
# full_file_name = os.path.join(os.getcwd()+"\\Data\\Alignments", f)
# if (os.path.isfile(full_file_name)):
# shutil.copy(full_file_name, os.getcwd()+"\\Data\\"+mydir+"\\Inputs")
list1 = os.listdir(os.getcwd()+"\\Data\\"+mydir+"\\Inputs")
# Updating list of alignments to the ListBox
label2 = Label(win, text="Found Alignment files in folder : ",font="Verdana 16 ",bg="#90A4AE").grid(row=8,column=0)
listBox1 = Listbox(win,font="Times 16",selectmode=EXTENDED,highlightthickness=5,bg="#90CAF9") #.grid(row=8,column=0)
count=0
for x in list1:
listBox1.insert(count,'['+str(count)+'] '+x)
count=count+1
listBox1.grid(row=8,column=1)
iterationCount = 0
for i in list1:
selected_PDB = i[:-4]
iterationCount = iterationCount + 1
# This file have all the modeller python file, Which will run one by one.
# [1] Build_profile.py
# [2] Compare.py
# [3] Align2d.py
# [4] Modelssingle.py
# [5] Evaluate_model.py
###################################################################################################
# Build_Profile.py
print "# This file have all the modeller python file, Which will run one by one"
print "# [1] Build_profile.py"
print "# [2] Compare.py"
print "# [3] Align2d.py"
print "# [4] Modelssingle.py"
print "# [5] Evaluate_model.py"
print "###################################################################################################"
print "# Build_Profile.py"
print "###################################################################################################"
#-- Name of Selected ALI file from \\alignments folder
print "\n**** Name of \"Selected_PDB\" is = "+selected_PDB
print "\n**** File name is = "+i
print "\n**** Iteration count = ",iterationCount
print " "
# Calling this function to update(on runtime) the Current ALI file label in GUI
after_loop_lab1_2(selected_PDB)
#-- Read in the sequence database
sdb = sequence_db(env)
sdb.read(seq_database_file='pdb_95.pir', seq_database_format='PIR',
chains_list='ALL', minmax_db_seq_len=(30, 4000), clean_sequences=True)
print "###################################################################################################"
print "# Build_Profile.py > Sequence,read()"
print "###################################################################################################"
#-- Write the sequence database in binary form
sdb.write(seq_database_file='pdb_95.bin', seq_database_format='BINARY', chains_list='ALL')
print "###################################################################################################"
print "# Build_Profile.py > Sequence,write()"
print "###################################################################################################"
#-- Now, read in the binary database
sdb.read(seq_database_file='pdb_95.bin', seq_database_format='BINARY', chains_list='ALL')
print "###################################################################################################"
print "# Build_Profile.py > Sequence,read_Binary()"
print "###################################################################################################"
#-- Read in the target sequence\\alignment
aln = alignment(env)
aln.append(file=os.getcwd()+"\\Data\\"+mydir+"\\Inputs\\"+selected_PDB+'.ali', alignment_format='PIR', align_codes='ALL')
function2()
print "###################################################################################################"
print "# Build_Profile.py > Appending, writing files in .ali()"
print "###################################################################################################"
#-- Convert the input sequence\\alignment into
# profile format
prf = aln.to_profile()
print "###################################################################################################"
print "# Build_Profile.py > Alignment_To_Profile(converstion)"
print "###################################################################################################"
#-- Scan sequence database to pick up homologous sequences
prf.build(sdb, matrix_offset=-450, rr_file='${LIB}\\blosum62.sim.mat',
gap_penalties_1d=(-500, -50), n_prof_iterations=1,
check_profile=False, max_aln_evalue=0.01)
print "###################################################################################################"
print "# Build_Profile.py > Profile.Build()"
print "###################################################################################################"
#-- Write out the profile in text format
prf.write(file=os.getcwd()+"\\Data\\"+mydir+"\\PRF\\"+selected_PDB+"_build_profile.prf", profile_format='TEXT')
print "###################################################################################################"
print "# Build_Profile.py > Writing, Profile in .prf"
print "###################################################################################################"
#-- Convert the profile back to alignment format
aln = prf.to_alignment()
print "###################################################################################################"
print "# Build_Profile.py > Profile To Alignment"
print "###################################################################################################"
#-- Write out the alignment file
aln.write(file=os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+"_build_profile.ali", alignment_format='PIR')
print "###################################################################################################"
print "# Build_Profile.py > Writing ALignment from Profile"
print "###################################################################################################"
# Updating the Process status Presenter. It is showing that Profile file has been build successfuly
###################################################################################################
# Compare.py
print "###################################################################################################"
print "# Compare.py"
print "###################################################################################################"
#env = environ()
aln = alignment(env)
# This script will find the best protein based on the below crieterias:
# [1] LOWEST E-VALUE
# [2] COVERAGE
# [3] SEQUENCE LENGTH BASED ON PROCESSING ENZYMES
# [A] Preparing the data for the Compare.py, and to get the (pdb, chain) from the Build_profile.prf
# Opening Build_Profile PROFILE file
file1 = open(os.getcwd()+"\\Data\\"+mydir+"\\PRF\\"+selected_PDB+'_build_profile.prf','r')
# Updating Process status presentator, showing Optimum PDB file found. AND IT HAVE TO BE REPLACE AFTER THE intvar3 CODE. THIS IS HERE JUST TO CHECK ITS WORKING
function3()
# Going through the file 1 line at a time.
count = 0
intvar=""
for i in file1:
count = count + 1
#print("&&&& AM I in For-LOOP ? &&&&")
if(count > 7):
#print("&&&& AM I in IF-Condition ? &&&&")
for j in (i[99:107]):
if(j != " "):
#print("&&&& AM J in IF-Condition ? Fetching Evalue")
# fetching the Evalue(string value) of each protein
intvar = intvar+j
# Converting a string E-value into Floating point E-Value
e_value = float(intvar)
intvar = ""
for j in (i[93:95]):
if(j != " " and j != "."):
#print("&&&& AM J in IF-Condition ? Removing anamoly in data")
# Removing any anamoly in the data
intvar = intvar+j
# Converting a string Coverage value into Floating point Coverage value
coverage = float(intvar)
intvar = ""
# fetching the Coverage(percentage value) of each protein
for j in (i[87:93]):
if(j != " " ):
#print("&&&& AM J in IF-Condition ? Fetching Coverage")
intvar = intvar+j
# Coverting a string Sequence value in to Floating point Sequence value
seq_len = float(intvar)
intvar = ""
# fetching the PDB name (srting value) of each protein
for j in (i[6:12]):
if(j != " " ):
#print("&&&& AM J in IF-Condition ? Fetching PDB name")
intvar = intvar+j
# Storing the pdb name in to variable
pdb_var = intvar
print "\n\n\n This is the pdb_var: "+pdb_var
intvar = ""
# Storing a list of values
tempList = [e_value,coverage,seq_len,pdb_var]
# Creating a list of list [e-value, coverage, sequence, pdb]
intvar3.append(tempList)
# Printing the List of List[3 crietereas]
print "\n\n\n This is the Profile File: "
print intvar3
print "\n\n\n"
maxE = 0
# Now Getting the best protein based on the 3 critereas
for x in intvar3:
if x[0] <= maxE:
maxE = x[3]
break
# Allocatin the values to the variables
print "**** MaxE Name = "+str(maxE)
pdb = maxE
chain = 'A'
# Validatin of the PDB name, whether it is having an extra 'A' at the last of the PDB name or not
print "**** PDB Name = "+str(pdb)
if pdb[-1] == 'A':
pdb = pdb[:-1]
print "**** PDb, Chains are: "+pdb+chain
# To update PDB Database name on GUI
after_loop_lab2_2('pdb_95.pir')
# Downloading selected PDB file from Wget, Runtime
url = "https://files.rcsb.org/download/"+pdb+".pdb" # Actual Code, The following one will not be valid code.
# url = "https://files.rcsb.org/download/1bdm.pdb" # Just for Try
file1 = wget.download(url, os.getcwd()+"\\Data\\"+mydir+"\\PDB\\")
# [B] Actual Compare.py starts here
# All codes above were for the preparing the data only
# Now we have best (pdb, chain)
#print("\n\n==============Env : ",env)
#print("\n\n==============PDB : "+pdb)
#file=os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb+".pdb"
m = model(env,file=os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb+".pdb", model_segment=('FIRST:'+chain, 'LAST:'+chain))
aln.append_model(m, atom_files = os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb+".pdb", align_codes=pdb+chain)
print "**** Model is Made"
# atom_files=os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb
aln.malign()
aln.malign()
aln.malign3d()
aln.compare_structures()
aln.id_table(matrix_file='family.mat')
###################################################################################################
# Align2D.py
print("###################################################################################################")
print("# Align2D.py")
print("###################################################################################################")
# Align2D starts from here
#import Compare as tryPy1
#env = environ()
aln = alignment(env)
#mdl = model(env, file=pdb, model_segment=('FIRST:A','LAST:A'))
mdl = model(env, file=os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb, model_segment=('FIRST:A','LAST:A'))
aln.append_model(mdl, align_codes=pdb+chain, atom_files=os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb+'.pdb')
aln.append(file=os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+'_build_profile.ali', align_codes=selected_PDB)
aln.align2d()
aln.write(file=os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+'-'+pdb+chain+'.ali', alignment_format='PIR')
aln.write(file=os.getcwd()+"\\Data\\"+mydir+"\\PAP\\"+selected_PDB+'-'+pdb+chain+'.pap', alignment_format='PAP')
#selected = "B0FGV7"
dash = "-"
#pdb = "5a2g"
#chain = "A"
file = open(os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+dash+pdb+chain+".ali","r")
fileTemp = open(os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+dash+pdb+chain+".ali.tmp","w+")
i = 0
k=0
for x in file:
i=i+1 # Line count
if i == 3:
k=0
singleLine = x[0:11]
#print("Printing singleLine in IF: ",singleLine)
for j in x:
#print("\n\n\n\n::working::")
#print("Value of Kkkkkkk: ",k)
k = k+1 # index count
if x[k] == "P" and x[k+1] == "D" and x[k+2] == "B" and x[k+3] == "\\":
#print("::IF statement IS working::")
singleLine = singleLine+x[k+4:]
#print("Printing singleLineeeeeeeeeee: ", singleLine)
fileTemp.write(singleLine)
break
#print("::IF statement not working::")
#print("Printing singleLineeeeeeeeeee: ", singleLine)
else:
#k = k+1 # index count
singleLine = x
#print("Printing singleLine in ELSE: ",singleLine)
print(singleLine)
fileTemp.write(singleLine)
file.close()
fileTemp.close()
os.remove(os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+dash+pdb+chain+".ali")
os.rename(os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+dash+pdb+chain+".ali.tmp",os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+dash+pdb+chain+".ali")
###################################################################################################
# Model-Single.py
print("###################################################################################################")
print("# Model-Single.py")
print("###################################################################################################")
a = automodel(env, alnfile=os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\"+selected_PDB+'-'+pdb+chain+'.ali',
knowns=pdb+chain, sequence=selected_PDB,
assess_methods=(assess.DOPE,
#soap_protein_od.Scorer(),
assess.GA341))
shutil.copy(os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb+".pdb" ,os.getcwd()+"\\Data\\"+mydir+"\\Output ALI\\")
shutil.copy(os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb+".pdb" ,os.getcwd())
a.starting_model = 1
a.ending_model = 5
# abc = raw_input("I am in Evaluate_Model.py and this is the [ZERO]: ")
a.make()
#a.make(os.getcwd()+"\\Data\\"+mydir+"\\PDB\\"+pdb+".pdb")
# Updating the Process status Presenter. It will tell us that the Model is created for the current ALI file
function4()
###################################################################################################
# Evaluate_Model.py
print("###################################################################################################")
print("# Evaluate_Model.py")
print("###################################################################################################")
#log.verbose() # request verbose output
#env = environ()
# abc = raw_input("I am in Evaluate_Model.py and this is the [FIRST]: ")
env.libs.topology.read(file='$(LIB)\\top_heav.lib') # read topology
# abc = raw_input("I am in Evaluate_Model.py and this is the [SECOND]: ")
env.libs.parameters.read(file='$(LIB)\\par.lib') # read parameters
# read model file
# abc = raw_input("I am in Evaluate_Model.py and this is the [THIRD]: ")
mdl = complete_pdb(env, selected_PDB+'.B99990002.pdb')
# Assess with DOPE:
s = selection(mdl) # all atom selection
# abc = raw_input("I am in Evaluate_Model.py and this is the [FOURTH]: ")
# os.getcwd()+"\\Data\\PAP\\"+
s.assess_dope(output='ENERGY_PROFILE NO_REPORT', file=selected_PDB+'.profile',
normalize_profile=True, smoothing_window=15)
# abc = raw_input("I am in Evaluate_Model.py and this is the [FIFTH]: ")
# Using Glob Module. Now we can find the files having specific format i.e. .py
files1 = os.listdir(os.getcwd())
for f in files1:
if f.startswith(selected_PDB):
print (f)
full_file_name = os.path.join(os.getcwd(), f)
if (os.path.isfile(full_file_name)):
shutil.move(full_file_name, os.getcwd()+"\\Data\\"+mydir)
os.unlink(os.getcwd()+"\\"+pdb+".pdb")
#----------
#----------
def logPrint():
# Gerenating Logs
sys.stdout = open(os.getcwd()+"\\Data\\"+mydir+"\\Logs\\ModellerGUI Log.txt", "w") # Printing Logs
#----------
#----------
def modellerFCall():
b1 = Button(win,text="Running..",cursor='watch', font="Helvetica 14",anchor='w',padx=70,pady=10,relief=SUNKEN,activebackground='lightgrey',activeforeground="blue",fg="#90A4AE").grid(row=0,column=2)
# b2 = Button(win, text="Open FASTA Files",cursor='watch', font="Helvetica 14", anchor='w',padx=10,pady=10,relief=SUNKEN,activebackground='lightgrey',activeforeground="blue",fg="#90A4AE").grid(row=0,column=1) #,command=
b3 = Button(win, text="Open ALI/Fasta Files",cursor='watch', font="Helvetica 14",anchor='w',padx=25,pady=10,relief=SUNKEN,activebackground='lightgrey',activeforeground="blue",fg="#90A4AE").grid(row=0,column=1) #,command=
threadSys.start()
threadLog.start()
#----------
#----------
def fastaFileOpener():
files1 = os.listdir(os.getcwd()+"\\Alignments")
for f in files1:
full_file_name = os.path.join(os.getcwd()+"\\Data", f)
if (os.path.isfile(full_file_name)):
shutil.copy(full_file_name, os.getcwd()+"\\Data\\Inputs")
# filez = os.path.basename(tkFileDialog.askopenfilenames(parent=win,title='Choose a file'))
# print filez
# # abc = read()
# for x in filez:
# print x
# shutil.copy(x,os.getcwd()+"\\Data\\"+mydir+"\\FASTA\\")
# Using Glob Module. Now we can find the files having specific format i.e. .py
#----------
def aliFileOpener():
# Using Glob Module. Now we can find the files having specific format i.e. .py
files1 = os.listdir(os.getcwd()+"\\Inputs")
for f in files1:
full_file_name = os.path.join(os.getcwd()+"\\Inputs\\", f)
if (os.path.isfile(full_file_name)):
shutil.copy(full_file_name, os.getcwd()+"\\Data\\Inputs")
#----------
#----------
def function0():
processOne = Label(win, text="Environment Created",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=0)
processTwo = Label(win, text="Profile File Build",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=1)
ProcessThree = Label(win, text="Optimum PDB Found",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=2)
ProcessFour = Label(win, text="Model Created",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=3)
#----------
def function1():
lab1 = Label(win, text="Environment Created",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="#90CAF9").grid(row=11,column=0)
#----------
def function2():
lab2 = Label(win, text="Profile File Build",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="#90CAF9").grid(row=11,column=1)
#----------
def function3():
lab3 = Label(win, text="Optimum PDB Found",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="#90CAF9").grid(row=11,column=2)
#----------
def function4():
lab4 = Label(win, text="Model Created",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="#90CAF9").grid(row=11,column=3)
#----------
def ModellerGUIF():
#Declaring Text
lab1Text = Label(win, text="Open files",font="Verdana 16 bold" ,anchor='w',padx=70,pady=5, fg='black',bg='#90A4AE').grid(row=0, column=0)
# b1 = Button(win, text="Open FASTA Files", font="Helvetica 14", command=fastaFileOpener,anchor='w',padx=10,pady=10,relief=GROOVE,bg='#80CBC4',activebackground='lightgrey',activeforeground="blue").grid(row=0,column=1) #,command=
b1 = Button(win, text="Open ALI/fasta Files", font="Helvetica 14", command=aliFileOpener,anchor='w',padx=25,pady=10,relief=GROOVE,bg='#80CBC4',activebackground='lightgrey',activeforeground="blue").grid(row=0,column=1) #,command=
# Label: Current Alignment File
lab1 = Label(win, text='Current Alignment File',font="Verdana 16 " ,anchor='w',padx=100,pady=5, fg='black',bg="#90A4AE" ).grid(row=1)
lab1_2 = Label(win,text='Loading..', font="Times 16 ",padx=100,pady=5,bg='white',fg='black',anchor='w',relief=SUNKEN,cursor='arrow').grid(row=1, column=1)
# updatedText.set(after_loop())
# changeValue()
# after_loop_lab1_2()
# label : PDB Database
lab2 = Label(win, text='PDB Database',font="Verdana 16",anchor='w',padx=100,pady=5, fg='black',bg="#90A4AE").grid(row=3)
lab2_2 = Label(win, text='Loading..',font="Times 16 ", bg="white" ,anchor='w',padx=100,pady=5, fg='black',relief=SUNKEN).grid(row=3,column=1)
# Label : PDB from Profile-file
lab3 = Label(win, text='PDB from Profile-File',font="Verdana 16",anchor='w',padx=100,pady=5, fg='black',bg="#90A4AE").grid(row=4)
lab3_3 = Label(win, text='Loading..',font="Times 16 ", bg="white" ,anchor='w',padx=100,pady=5, fg='black',relief=SUNKEN).grid(row=4,column=1)
# label : Complete-PDB
lab4 = Label(win, text='Complete-PDB',font="Verdana 16",anchor='w',padx=100,pady=5, fg='black',bg="#90A4AE").grid(row=5)
lab4_4 = Label(win, text='Loading..',font="Times 16", bg="white" ,anchor='w',padx=100,pady=5, fg='black',relief=SUNKEN).grid(row=5,column=1)
# This one is for making a better Identation in GUI (Jugaad)
extraLabel12 = Label(win, bg="#90A4AE").grid(row=6)
# This is to show the List of all alignment files in the source /alignment folder
label2 = Label(win, text="Found Alignment files in folder : ",font="Verdana 16",bg="#90A4AE").grid(row=8,column=0)
listBox1 = Listbox(win,font="Times 16",selectmode=EXTENDED,highlightthickness=5).grid(row=8,column=1)
# Button to start the Modeller
b1 = Button(win, text="Start", font="Helvetica 14", command=modellerFCall,anchor='w',padx=70,pady=10,relief=GROOVE,bg='#80CBC4',activebackground='lightgrey',activeforeground="blue").grid(row=0,column=2) #,command=modellerF
# Button to quit
b2 = Button(win, text='Quit', font="Helvetica 14", command=win.quit,anchor='w',padx=70,pady=10,activebackground='lightgrey',bg="#80CBC4",activeforeground="red",relief=GROOVE).grid(row=0,column=3)
# This one is for making a better Identation in GUI (Jugaad)
extraLabel1 = Label(win,bg="#90A4AE").grid(row=10)
# Process Status presenter
processOne = Label(win, text="Environment Created",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=0)
processTwo = Label(win, text="Profile File Build",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=1)
ProcessThree = Label(win, text="Optimum PDB Found",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=2)
ProcessFour = Label(win, text="Model Created",font="Verdana 16",anchor='w',padx=10,pady=10,relief=GROOVE, fg='black',bg="white").grid(row=11,column=3)
# This one is for making a better Identation in GUI (Jugaad)
extraLabel1 = Label(win,bg="#90A4AE").grid(row=12)
#GUI configurations
win.geometry("1400x700")
win.configure(bg="#90A4AE")
win.mainloop()
if __name__ == '__main__':
win = Tk()
threadGUI = threading.Thread(target = ModellerGUIF)
threadLog = threading.Thread(target = logPrint)
threadSys = threading.Thread(target = modellerF)
threadGUI.start()