chromaquant 0.3.1__py3-none-any.whl → 0.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chromaquant/Handle/__init__.py +2 -1
- chromaquant/Handle/fileChecks.py +172 -0
- chromaquant/Handle/handleDirectories.py +1 -1
- chromaquant/Hydro/__init__.py +12 -0
- chromaquant/Hydro/hydroMain.py +496 -0
- chromaquant/Match/AutoFpmMatch.py +48 -48
- chromaquant/Match/MatchSub/__init__.py +13 -0
- chromaquant/Match/MatchSub/matchTools.py +282 -0
- chromaquant/Match/MatchSub/peakTools.py +259 -0
- chromaquant/Match/__init__.py +2 -1
- chromaquant/Match/matchMain.py +233 -0
- chromaquant/Quant/QuantSub/__init__.py +15 -0
- chromaquant/Quant/QuantSub/gasFID.py +241 -0
- chromaquant/Quant/QuantSub/gasTCD.py +425 -0
- chromaquant/Quant/QuantSub/liquidFID.py +310 -0
- chromaquant/Quant/QuantSub/parseTools.py +162 -0
- chromaquant/Quant/__init__.py +1 -1
- chromaquant/Quant/quantMain.py +417 -0
- chromaquant/UAPP/__init__.py +12 -0
- chromaquant/UAPP/uappMain.py +427 -0
- chromaquant/__main__.py +426 -393
- chromaquant/oldui.py +492 -0
- chromaquant/properties.json +1 -1
- {chromaquant-0.3.1.dist-info → chromaquant-0.4.0.dist-info}/METADATA +3 -3
- chromaquant-0.4.0.dist-info/RECORD +38 -0
- {chromaquant-0.3.1.dist-info → chromaquant-0.4.0.dist-info}/WHEEL +1 -1
- chromaquant-0.3.1.dist-info/RECORD +0 -22
- {chromaquant-0.3.1.dist-info → chromaquant-0.4.0.dist-info}/entry_points.txt +0 -0
- {chromaquant-0.3.1.dist-info → chromaquant-0.4.0.dist-info}/licenses/LICENSE.txt +0 -0
- {chromaquant-0.3.1.dist-info → chromaquant-0.4.0.dist-info}/licenses/LICENSES_bundled.txt +0 -0
chromaquant/oldui.py
ADDED
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
COPYRIGHT STATEMENT:
|
|
5
|
+
|
|
6
|
+
ChromaQuant – A quantification software for complex gas chromatographic data
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2024, by Julia Hancock
|
|
9
|
+
Affiliation: Dr. Julie Elaine Rorrer
|
|
10
|
+
URL: https://www.rorrerlab.com/
|
|
11
|
+
|
|
12
|
+
License: BSD 3-Clause License
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
SCRIPT FOR SIMPLIFYING ANALYSIS WORKFLOW
|
|
17
|
+
|
|
18
|
+
Julia Hancock
|
|
19
|
+
Started 01-04-2024
|
|
20
|
+
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
""" PACKAGES """
|
|
24
|
+
print("[__main__] Loading packages...")
|
|
25
|
+
import tkinter as tk
|
|
26
|
+
from tkinter import ttk
|
|
27
|
+
from ttkthemes import ThemedTk
|
|
28
|
+
import tkinter.font as tkFont
|
|
29
|
+
import os
|
|
30
|
+
import subprocess
|
|
31
|
+
import sys
|
|
32
|
+
from PIL import Image, ImageTk
|
|
33
|
+
from datetime import datetime
|
|
34
|
+
import importlib.util
|
|
35
|
+
|
|
36
|
+
""" LOCAL PACKAGES """
|
|
37
|
+
print("[__main__] Importing local packages...")
|
|
38
|
+
#Get current file absolute directory
|
|
39
|
+
file_dir = os.path.dirname(os.path.abspath(__file__))
|
|
40
|
+
#Get absolute directories for subpackages
|
|
41
|
+
subpack_dir = {'Handle':os.path.join(file_dir,'Handle','__init__.py'),
|
|
42
|
+
'Manual':os.path.join(file_dir,'Manual','__init__.py'),
|
|
43
|
+
'Match':os.path.join(file_dir,'Match','__init__.py'),
|
|
44
|
+
'Quant':os.path.join(file_dir,'Quant','__init__.py')}
|
|
45
|
+
|
|
46
|
+
#Define function to import from path
|
|
47
|
+
def import_from_path(module_name,path):
|
|
48
|
+
#Define spec
|
|
49
|
+
spec = importlib.util.spec_from_file_location(module_name,path)
|
|
50
|
+
#Define module
|
|
51
|
+
module = importlib.util.module_from_spec(spec)
|
|
52
|
+
#Expand sys.modules dict
|
|
53
|
+
sys.modules[module_name] = module
|
|
54
|
+
#Load module
|
|
55
|
+
spec.loader.exec_module(module)
|
|
56
|
+
return module
|
|
57
|
+
|
|
58
|
+
#Import all local packages
|
|
59
|
+
hd = import_from_path("hd",subpack_dir['Handle'])
|
|
60
|
+
mn = import_from_path("mn",subpack_dir['Manual'])
|
|
61
|
+
qt = import_from_path("qt",subpack_dir['Quant'])
|
|
62
|
+
mt = import_from_path("mt",subpack_dir['Match'])
|
|
63
|
+
|
|
64
|
+
""" PARAMETERS """
|
|
65
|
+
print("[__main__] Defining parameters...")
|
|
66
|
+
version = "0.3.1"
|
|
67
|
+
__version__ = "0.3.1"
|
|
68
|
+
|
|
69
|
+
""" UI FUNCTION """
|
|
70
|
+
def runUI():
|
|
71
|
+
|
|
72
|
+
""" DIRECTORIES """
|
|
73
|
+
print("[__main__] Defining directories...")
|
|
74
|
+
print("[__main__] Using Handle package...")
|
|
75
|
+
#Get directories from handling script
|
|
76
|
+
directories = hd.handle(os.path.dirname(os.path.abspath(__file__)))
|
|
77
|
+
#Unpack directories
|
|
78
|
+
#Primary files directory
|
|
79
|
+
files = directories['files']
|
|
80
|
+
#Resources directory
|
|
81
|
+
RE_Dir = directories['resources']
|
|
82
|
+
#Theme directory
|
|
83
|
+
theme_Dir = directories['theme']
|
|
84
|
+
#Response factor directory
|
|
85
|
+
RF_Dir = directories['rf']
|
|
86
|
+
#Data directory
|
|
87
|
+
DF_Dir = directories['data']
|
|
88
|
+
#Images directory
|
|
89
|
+
img_Dir = directories['images']
|
|
90
|
+
#AutoFpmMatch directory + file
|
|
91
|
+
afm_Dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),'AutoFpmMatch.py')
|
|
92
|
+
#AutoQuantification directory + file
|
|
93
|
+
aq_Dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),'AutoQuantification.py')
|
|
94
|
+
|
|
95
|
+
""" DATA SEARCH """
|
|
96
|
+
print("[__main__] Searching for valid data files...")
|
|
97
|
+
#Get a list of all available sample data directories (excluding "old") in the data files directory
|
|
98
|
+
sampleList = [f.name for f in os.scandir(DF_Dir) if f.is_dir() if f.name != "old"]
|
|
99
|
+
|
|
100
|
+
""" FUNCTIONS """
|
|
101
|
+
print("[__main__] Defining functions...")
|
|
102
|
+
#Function for setting up the UI
|
|
103
|
+
def uiSetup(theme_Dir):
|
|
104
|
+
|
|
105
|
+
#Initialize UI window
|
|
106
|
+
root = ThemedTk(theme='adapta')
|
|
107
|
+
|
|
108
|
+
# Import the tcl file with the tk.call method
|
|
109
|
+
root.tk.call('source', theme_Dir)
|
|
110
|
+
|
|
111
|
+
# Set the theme with the theme_use method
|
|
112
|
+
style = ttk.Style(root)
|
|
113
|
+
style.theme_use('forest-light')
|
|
114
|
+
#Set up style button font
|
|
115
|
+
style.configure('QuantButton.TButton',font=('TKDefaultFont',16))
|
|
116
|
+
#Set up style accent button font
|
|
117
|
+
style.configure('Accent.TButton',font=('TKDefaultFont',16))
|
|
118
|
+
#Set up labelframe font
|
|
119
|
+
style.configure('QuantLabelframe.TLabelframe.Label',font=('TKDefaultFont',16))
|
|
120
|
+
|
|
121
|
+
root.geometry("1090x560")
|
|
122
|
+
root.title("ChromaQuant – Quantification Made Easy")
|
|
123
|
+
root.resizable(0,0)
|
|
124
|
+
|
|
125
|
+
#style.theme_use('forest')
|
|
126
|
+
#Configure the grid
|
|
127
|
+
root.columnconfigure(0,weight=2)
|
|
128
|
+
root.columnconfigure(1,weight=2)
|
|
129
|
+
root.columnconfigure(2,weight=2)
|
|
130
|
+
root.columnconfigure(3,weight=2)
|
|
131
|
+
|
|
132
|
+
#Create a main frame
|
|
133
|
+
mainframe = ttk.Frame(root)
|
|
134
|
+
mainframe.grid(column=0,row=0)
|
|
135
|
+
|
|
136
|
+
return root, mainframe
|
|
137
|
+
#Function for sample selection combobox
|
|
138
|
+
def on_select(event):
|
|
139
|
+
|
|
140
|
+
sname = sampleBox.get()
|
|
141
|
+
print("User selected "+sampleBox.get())
|
|
142
|
+
return sname
|
|
143
|
+
|
|
144
|
+
#Function for fidpms phase selection combobox
|
|
145
|
+
def fidpms_select():
|
|
146
|
+
|
|
147
|
+
sphase = fpmVar.get()
|
|
148
|
+
print("User selected " + sphase)
|
|
149
|
+
|
|
150
|
+
if sphase == "Liquid":
|
|
151
|
+
#Set variable to first order
|
|
152
|
+
fpmMVar.set('First order (linear)')
|
|
153
|
+
#Disable third order
|
|
154
|
+
third.config(state=tk.DISABLED)
|
|
155
|
+
else:
|
|
156
|
+
third.config(state=tk.NORMAL)
|
|
157
|
+
|
|
158
|
+
return sphase
|
|
159
|
+
|
|
160
|
+
#Function for model selection combobox
|
|
161
|
+
def fidpms_select_model():
|
|
162
|
+
|
|
163
|
+
model = fpmMVar.get()
|
|
164
|
+
print("User selected " + model)
|
|
165
|
+
|
|
166
|
+
return model
|
|
167
|
+
|
|
168
|
+
#Function for fidpms speculative labeling combobox
|
|
169
|
+
def fidpms_select2():
|
|
170
|
+
|
|
171
|
+
specLabTF = fpm2Var.get()
|
|
172
|
+
print("User selected " + specLabTF)
|
|
173
|
+
|
|
174
|
+
return specLabTF
|
|
175
|
+
|
|
176
|
+
#Function for quant phase selection combobox
|
|
177
|
+
def quant_select(event):
|
|
178
|
+
|
|
179
|
+
global quantphases
|
|
180
|
+
quantphases = logBox.get
|
|
181
|
+
|
|
182
|
+
#Function for running method functions
|
|
183
|
+
def runProcess(sname,pythonFun,varList):
|
|
184
|
+
"""
|
|
185
|
+
Function that runs an external main function
|
|
186
|
+
Parameters
|
|
187
|
+
----------
|
|
188
|
+
sname : String
|
|
189
|
+
Name of sample to be analyzed.
|
|
190
|
+
pythonFun : Function
|
|
191
|
+
Function to be run.
|
|
192
|
+
varList : List
|
|
193
|
+
List of reformatted variables to be passed to the function.
|
|
194
|
+
|
|
195
|
+
Returns
|
|
196
|
+
-------
|
|
197
|
+
None.
|
|
198
|
+
|
|
199
|
+
"""
|
|
200
|
+
#Start time for execution time
|
|
201
|
+
exec_start = datetime.now()
|
|
202
|
+
#Insert sname at the beginning of the variables list
|
|
203
|
+
varList.insert(0,sname)
|
|
204
|
+
#Run the method function
|
|
205
|
+
pythonFun(*varList)
|
|
206
|
+
#End time for execution time
|
|
207
|
+
exec_end = datetime.now()
|
|
208
|
+
#Execution time
|
|
209
|
+
exec_time = (exec_end-exec_start).total_seconds()*10**3
|
|
210
|
+
print("Time to execute: {:.03f}ms".format(exec_time))
|
|
211
|
+
print("Program complete")
|
|
212
|
+
|
|
213
|
+
return None
|
|
214
|
+
|
|
215
|
+
#Function for running FIDpMS script
|
|
216
|
+
def runFIDpMS(sname,specLabTF,sphase,model):
|
|
217
|
+
"""
|
|
218
|
+
Parameters
|
|
219
|
+
----------
|
|
220
|
+
sname : STRING
|
|
221
|
+
Name of sample to be analyzed.
|
|
222
|
+
specLabTF : STRING
|
|
223
|
+
True/false string describing whether speculative labeling is to be performed.
|
|
224
|
+
sphase : TYPE
|
|
225
|
+
String describing whether liquid or gas is to be performed.
|
|
226
|
+
model : TYPE
|
|
227
|
+
String describing which model is to be performed.
|
|
228
|
+
|
|
229
|
+
Returns
|
|
230
|
+
-------
|
|
231
|
+
NONE
|
|
232
|
+
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
#Function for reformatting provided variables
|
|
236
|
+
def reformatVar(var_initial,ifTF_list):
|
|
237
|
+
"""
|
|
238
|
+
Parameters
|
|
239
|
+
----------
|
|
240
|
+
var_initial : STRING, BOOLEAN
|
|
241
|
+
The initial variable to be reformatted.
|
|
242
|
+
ifTF_list : LIST
|
|
243
|
+
A list containing two lists, the first containing the variable options and the second containing reformatted values.
|
|
244
|
+
|
|
245
|
+
Returns
|
|
246
|
+
-------
|
|
247
|
+
var_final : STRING
|
|
248
|
+
The final, reformatted variable.
|
|
249
|
+
|
|
250
|
+
"""
|
|
251
|
+
|
|
252
|
+
#Set default value of reformatted value
|
|
253
|
+
var_final = "N/A"
|
|
254
|
+
|
|
255
|
+
#Get the length of the variable option list
|
|
256
|
+
listLength = len(ifTF_list[0])
|
|
257
|
+
|
|
258
|
+
#For every entry in the variable option list...
|
|
259
|
+
for i in range(listLength):
|
|
260
|
+
|
|
261
|
+
#If the variable is equal to the ith variable option...
|
|
262
|
+
if var_initial == ifTF_list[0][i]:
|
|
263
|
+
#Assign the variable to the first reformatted value
|
|
264
|
+
var_final = ifTF_list[1][i]
|
|
265
|
+
#Otherwise, pass
|
|
266
|
+
else:
|
|
267
|
+
pass
|
|
268
|
+
|
|
269
|
+
return var_final
|
|
270
|
+
|
|
271
|
+
#A dictionary containing the ifTF_lists for every passed variable
|
|
272
|
+
ifTF_Dict = {'specLabTF':[[1,0],['True','False']],'sphase':[['Gas','Liquid'],['G','L']],'model':[['First order (linear)','Third order','Retention time'],['F','T','R']]}
|
|
273
|
+
|
|
274
|
+
#A dictionary of all passed variables excluding sname
|
|
275
|
+
passed_dict = {'sphase':sphase,'specLabTF':specLabTF,'model':model}
|
|
276
|
+
|
|
277
|
+
print("User selected sample name {0} with phase {2} and entered {1} for running speculative labeling. Modeling is {3}".format(sname,specLabTF,sphase,model))
|
|
278
|
+
|
|
279
|
+
#A dictionary for all reformatted variables
|
|
280
|
+
reformatVar_dict = {}
|
|
281
|
+
|
|
282
|
+
#A dictionary of booleans describing whether or not values in reformatVar_dict are "N/A"
|
|
283
|
+
reformatBool_dict = {}
|
|
284
|
+
|
|
285
|
+
#Reformat all variables
|
|
286
|
+
for i in passed_dict.keys():
|
|
287
|
+
|
|
288
|
+
#Print reformatted variable name
|
|
289
|
+
print("Reformatting " + i + "...")
|
|
290
|
+
#Reformat variable, append to dictionary
|
|
291
|
+
reformatVar_dict[i] = reformatVar(passed_dict[i],ifTF_Dict[i])
|
|
292
|
+
#Print resulting reformatted value
|
|
293
|
+
print("Variable has been reformatted to {0}".format(reformatVar_dict[i]))
|
|
294
|
+
|
|
295
|
+
#Check if reformatted variable is equal to "N/A". If it is, assign False
|
|
296
|
+
if reformatVar_dict[i] == "N/A":
|
|
297
|
+
reformatBool_dict[i] = False
|
|
298
|
+
#Otherwise, assign True
|
|
299
|
+
else:
|
|
300
|
+
reformatBool_dict[i] = True
|
|
301
|
+
|
|
302
|
+
#If any of the required fields are empty, pass
|
|
303
|
+
if False in list(reformatBool_dict.values()) or sname == "":
|
|
304
|
+
print("Cannot run FIDpMS script, one or more variables are not defined")
|
|
305
|
+
pass
|
|
306
|
+
|
|
307
|
+
#Otherwise, run the FIDpMS script
|
|
308
|
+
else:
|
|
309
|
+
print("Running FIDpMS script...")
|
|
310
|
+
|
|
311
|
+
try:
|
|
312
|
+
#Get list of reformatVar_dict values
|
|
313
|
+
reformatVar_list = list(reformatVar_dict.values())
|
|
314
|
+
print(reformatVar_list)
|
|
315
|
+
#Append list with directories list
|
|
316
|
+
reformatVar_list.append(directories)
|
|
317
|
+
print(reformatVar_list)
|
|
318
|
+
#Run subprocess
|
|
319
|
+
runProcess(sname,mt.main_AutoFpmMatch,reformatVar_list)
|
|
320
|
+
|
|
321
|
+
except subprocess.CalledProcessError as e:
|
|
322
|
+
print(f'Command {e.cmd} failed with error {e.returncode}')
|
|
323
|
+
|
|
324
|
+
return None
|
|
325
|
+
|
|
326
|
+
#Function for running quant script
|
|
327
|
+
def runQuant(sname,quantphases):
|
|
328
|
+
|
|
329
|
+
print("User selected sample name {0} with phase(s) {1}".format(sname,quantphases))
|
|
330
|
+
#If any of the required fields are empty, pass
|
|
331
|
+
if sname == "" or quantphases == "":
|
|
332
|
+
print("User did not enter a value for at least one required argument, canceling script run")
|
|
333
|
+
pass
|
|
334
|
+
#Otherwise, run the FIDpMS script
|
|
335
|
+
else:
|
|
336
|
+
print("Running Quantification script...")
|
|
337
|
+
|
|
338
|
+
try:
|
|
339
|
+
#Run subprocess
|
|
340
|
+
runProcess(sname,qt.main_AutoQuantification,[quantphases,directories])
|
|
341
|
+
|
|
342
|
+
except subprocess.CalledProcessError as e:
|
|
343
|
+
print(f'Command {e.cmd} failed with error {e.returncode}')
|
|
344
|
+
|
|
345
|
+
return None
|
|
346
|
+
|
|
347
|
+
""" CODE """
|
|
348
|
+
print("[__main__] Initializing UI mainframe...")
|
|
349
|
+
#Run the UI setup
|
|
350
|
+
root, mainframe = uiSetup(theme_Dir)
|
|
351
|
+
|
|
352
|
+
#Create font objects
|
|
353
|
+
title_font = tkFont.Font(size=18) #Title font
|
|
354
|
+
|
|
355
|
+
#IMAGE AND TITLE
|
|
356
|
+
#Add a frame for the logo and title/sample info
|
|
357
|
+
topFrame = ttk.Frame(mainframe)
|
|
358
|
+
topFrame.grid(column=0,row=0,sticky='w',padx=(350,0))
|
|
359
|
+
|
|
360
|
+
#Add a frame for the ChromaQuant logo
|
|
361
|
+
logoFrame = ttk.Frame(topFrame)
|
|
362
|
+
logoFrame.grid(column=0,row=0)
|
|
363
|
+
|
|
364
|
+
#Add a frame for the title text and sample selection
|
|
365
|
+
tsFrame = ttk.Frame(topFrame)
|
|
366
|
+
tsFrame.grid(column=1,row=0)
|
|
367
|
+
|
|
368
|
+
#Add title text
|
|
369
|
+
tk.Label(tsFrame,text="ChromaQuant v"+version,font=title_font).grid(column=0,row=0,pady=10,padx=10)
|
|
370
|
+
|
|
371
|
+
#Add an image for the ChromaQuant logo
|
|
372
|
+
#Load the image
|
|
373
|
+
#image = tk.PhotoImage(file=img_Dir+'ChromaQuantIcon.png')
|
|
374
|
+
image_i = Image.open(os.path.join(img_Dir,'ChromaQuantIcon.png'))
|
|
375
|
+
#Resize the image
|
|
376
|
+
resize_image = image_i.resize((100,100))
|
|
377
|
+
#Redefine the image
|
|
378
|
+
image = ImageTk.PhotoImage(resize_image)
|
|
379
|
+
#Add the image to a label
|
|
380
|
+
image_label = tk.Label(logoFrame, image=image)
|
|
381
|
+
image_label.grid(column=0,row=0,pady=10,padx=10)
|
|
382
|
+
|
|
383
|
+
#SAMPLE SELECTION
|
|
384
|
+
#Add a frame for selecting the sample
|
|
385
|
+
sampleFrame = ttk.Frame(tsFrame)
|
|
386
|
+
sampleFrame.grid(column=0,row=1,pady=10,padx=10)
|
|
387
|
+
|
|
388
|
+
#Add text to the top of the sample frame
|
|
389
|
+
tk.Label(sampleFrame,text='Select a sample to analyze:').grid(column=0,row=0)
|
|
390
|
+
sampleVar = tk.StringVar()
|
|
391
|
+
sampleBox = ttk.Combobox(sampleFrame,textvariable=sampleVar)
|
|
392
|
+
sampleBox['values'] = sampleList
|
|
393
|
+
sampleBox.state(["readonly"])
|
|
394
|
+
sampleBox.grid(column=0,row=1)
|
|
395
|
+
|
|
396
|
+
#Bind the sampleBox to a function
|
|
397
|
+
sampleBox.bind("<<ComboboxSelected>>",on_select)
|
|
398
|
+
|
|
399
|
+
#WIDGET FRAME
|
|
400
|
+
#Add a frame for the fidpms and quantification widgets
|
|
401
|
+
widgetFrame = ttk.Frame(mainframe)
|
|
402
|
+
widgetFrame.grid(column=0,row=1)
|
|
403
|
+
|
|
404
|
+
#FIDPMS WIDGET
|
|
405
|
+
#Add a frame
|
|
406
|
+
fidpms_content = ttk.LabelFrame(widgetFrame,text='Peak Matching',style='QuantLabelframe.TLabelframe')
|
|
407
|
+
fidpms_content.grid(column=0,row=0,pady=10,padx=10)
|
|
408
|
+
|
|
409
|
+
#Add text to the top of the frame
|
|
410
|
+
tk.Label(fidpms_content,text='Please enter all information').grid(column=0,row=0,columnspan=4,padx=20)
|
|
411
|
+
|
|
412
|
+
#Set up a radiobutton for selecting liquid or gas
|
|
413
|
+
tk.Label(fidpms_content,text='Please select the sample type:').grid(column=0,row=1,padx=10,pady=20,sticky='e')
|
|
414
|
+
fpmVar = tk.StringVar()
|
|
415
|
+
Liquid = ttk.Radiobutton(fidpms_content,text='Liquid',variable=fpmVar,value="Liquid",command=fidpms_select)
|
|
416
|
+
Gas = ttk.Radiobutton(fidpms_content,text='Gas',variable=fpmVar,value="Gas",command=fidpms_select)
|
|
417
|
+
Liquid.grid(column=1,row=1,padx=1,sticky='w')
|
|
418
|
+
Gas.grid(column=2,row=1,padx=1,sticky='w')
|
|
419
|
+
|
|
420
|
+
#Initially start with liquid selected
|
|
421
|
+
fpmVar.set('Liquid')
|
|
422
|
+
|
|
423
|
+
#Set up a radiobutton for selecting the model type
|
|
424
|
+
tk.Label(fidpms_content,text='Please select the desired matching fit model:').grid(column=0,row=2,padx=10,pady=20,sticky='e')
|
|
425
|
+
fpmMVar = tk.StringVar()
|
|
426
|
+
third = ttk.Radiobutton(fidpms_content,text='Third order',variable=fpmMVar,value='Third order',command=fidpms_select_model)
|
|
427
|
+
first = ttk.Radiobutton(fidpms_content,text='First order (linear)',variable=fpmMVar,value='First order (linear)',command=fidpms_select_model)
|
|
428
|
+
rt = ttk.Radiobutton(fidpms_content,text='Retention time',variable=fpmMVar,value='Retention time',command=fidpms_select_model)
|
|
429
|
+
third.grid(column=1,row=2,padx=1,sticky='w')
|
|
430
|
+
first.grid(column=2,row=2,padx=1,sticky='w')
|
|
431
|
+
rt.grid(column=3,row=2,padx=1,sticky='w')
|
|
432
|
+
|
|
433
|
+
#Initially start with first order selected and third order disabled
|
|
434
|
+
fpmMVar.set('First order (linear')
|
|
435
|
+
third.config(state=tk.DISABLED)
|
|
436
|
+
|
|
437
|
+
#Set up a checkbox for selecting whether or not to perform speculative labeling
|
|
438
|
+
tk.Label(fidpms_content,text='Perform speculative labeling?').grid(column=0,row=3,padx=10,pady=20,sticky='e')
|
|
439
|
+
fpm2Var = tk.IntVar()
|
|
440
|
+
fpm2Box = tk.Checkbutton(fidpms_content,text='',variable=fpm2Var,onvalue=1,offvalue=0,command=fidpms_select2)
|
|
441
|
+
fpm2Box.grid(column=1,row=3,padx=1,sticky='w')
|
|
442
|
+
|
|
443
|
+
#Add a start button
|
|
444
|
+
fidpms_sbutton = ttk.Button(fidpms_content,text="\n\n\nRun Script\n\n\n",width=20,style='Accent.TButton',command=lambda: runFIDpMS(sampleVar.get(),fpm2Var.get(),fpmVar.get(),fpmMVar.get()))
|
|
445
|
+
fidpms_sbutton.grid(column=0,row=4,pady=20,padx=20,columnspan=2)
|
|
446
|
+
|
|
447
|
+
#DISABLING SPECULATIVE LABELING
|
|
448
|
+
fpm2Box.config(state=tk.DISABLED)
|
|
449
|
+
|
|
450
|
+
#Bind the button to a function to run the appropriate script
|
|
451
|
+
#fidpms_sbutton.bind("<Button-1>",runFIDpMS)
|
|
452
|
+
|
|
453
|
+
#QUANT WIDGET
|
|
454
|
+
#Add a frame
|
|
455
|
+
quant_content = ttk.LabelFrame(widgetFrame,text='Quantification',style='QuantLabelframe.TLabelframe')
|
|
456
|
+
quant_content.grid(column=1,row=0,pady=10,padx=10,sticky="n")
|
|
457
|
+
|
|
458
|
+
#Add text to the top of the frame
|
|
459
|
+
tk.Label(quant_content,text='Please enter all information').grid(column=0,row=0,columnspan=2,padx=20)
|
|
460
|
+
#Set up a combobox for selecting liquid or gas
|
|
461
|
+
tk.Label(quant_content,text='Does the sample have liquid and/or gas components?').grid(column=0,row=1,padx=10,pady=20)
|
|
462
|
+
logVar = tk.StringVar()
|
|
463
|
+
logBox = ttk.Combobox(quant_content,textvariable=logVar)
|
|
464
|
+
logBox['values'] = ['Liquid','Gas','Liquid and Gas']
|
|
465
|
+
logBox.state(["readonly"])
|
|
466
|
+
logBox.grid(column=1,row=1,padx=10)
|
|
467
|
+
|
|
468
|
+
#Bind the combobox to a function
|
|
469
|
+
logBox.bind("<<ComboboxSelected>>",quant_select)
|
|
470
|
+
|
|
471
|
+
#Add a start button
|
|
472
|
+
quant_sbutton = ttk.Button(quant_content,text="\n\n\nRun Script\n\n\n",width=20,style='Accent.TButton',command=lambda: runQuant(sampleVar.get(),logVar.get()))
|
|
473
|
+
quant_sbutton.grid(column=0,row=2,pady=20,padx=20,columnspan=2)
|
|
474
|
+
|
|
475
|
+
#Bind the start button to a function
|
|
476
|
+
#quant_sbutton.bind("<Button-1>",runQuant)
|
|
477
|
+
|
|
478
|
+
#var = ""
|
|
479
|
+
#togglebutton = ttk.Checkbutton(root, text='Switch', style='Switch',variable=var)
|
|
480
|
+
#togglebutton.grid(row=3,column=0)
|
|
481
|
+
|
|
482
|
+
#Main loop
|
|
483
|
+
root.mainloop()
|
|
484
|
+
|
|
485
|
+
#End of runUI function
|
|
486
|
+
return None
|
|
487
|
+
|
|
488
|
+
""" RUN MAIN FUNCTION """
|
|
489
|
+
print("[__main__] Starting UI...")
|
|
490
|
+
if __name__ == "__main__":
|
|
491
|
+
runUI()
|
|
492
|
+
|
chromaquant/properties.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: chromaquant
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Analytical platform for gas chromatography
|
|
5
5
|
Project-URL: Repository, https://github.com/JnliaH/ChromaQuant
|
|
6
6
|
Author: Julia Hancock
|
|
@@ -29,7 +29,7 @@ Classifier: Development Status :: 2 - Pre-Alpha
|
|
|
29
29
|
Classifier: Environment :: MacOS X
|
|
30
30
|
Classifier: License :: OSI Approved :: BSD License
|
|
31
31
|
Classifier: Natural Language :: English
|
|
32
|
-
Classifier: Programming Language :: Python
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
33
|
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
34
34
|
Requires-Python: >=3.12
|
|
35
35
|
Requires-Dist: chemformula~=1.3.1
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
chromaquant/__init__.py,sha256=YaYoGMnzPZriraM5uOtqwkjUpgmglRu1OZC3Y068WqE,125
|
|
2
|
+
chromaquant/__main__.py,sha256=f0vuSKja1DJTzLcaX3HTWPWYFhwxQXorFR7Sb2KijTI,23268
|
|
3
|
+
chromaquant/oldui.py,sha256=G5JeuHRYgn6FBDlPjSQwc4YyUSf6lEsDI1cO2LMm9FU,17963
|
|
4
|
+
chromaquant/properties.json,sha256=PFr0a3V39wrZTvraXw3A8f-If0zW_5POk0Q2GlIMWQY,137
|
|
5
|
+
chromaquant/Handle/__init__.py,sha256=eYbh72XTtMc0fnC8EhcGRwNA-wcaWtYIwmPjQNniIHw,192
|
|
6
|
+
chromaquant/Handle/fileChecks.py,sha256=AYTmyrGeyeuMUw_8cw7qt4kdvcDC3et6CV2VomKvywI,5502
|
|
7
|
+
chromaquant/Handle/handleDirectories.py,sha256=KzUU_PZ6aFDuorz8pVviOZP0ZLyVVRpZJA6-QiZJTS4,2322
|
|
8
|
+
chromaquant/Hydro/__init__.py,sha256=zFYsyYrGWeu6HREWFu9jCqos0ezczde9ffasei8JRWE,159
|
|
9
|
+
chromaquant/Hydro/hydroMain.py,sha256=igMpJtUNOVRyiuh4UBFsTODHfCByVrExrksbkxEp8JI,21904
|
|
10
|
+
chromaquant/Manual/HydroUI.py,sha256=R1W6n8i48sKfQOLEkihvJrKjsl8n7FUpugX-vGNehDc,17909
|
|
11
|
+
chromaquant/Manual/QuantUPP.py,sha256=r_HOxjkP5rR8htYmqtW7uEM9-fRdeRfA7wx9T-D6JtM,16524
|
|
12
|
+
chromaquant/Manual/Quantification.py,sha256=4UD5qZALnMaqv2TZLLi_ws_ob8HSnu5pVJpYDwHcpJs,61239
|
|
13
|
+
chromaquant/Manual/__init__.py,sha256=NqutHWd40NvTa2jxXn5lkLSEo3QGBGjFUAwIQq0ldYs,132
|
|
14
|
+
chromaquant/Manual/duplicateMatch.py,sha256=pYr1opZXtVOzKDFVlqb6TqahKHG7lJjdEq6NoPFKtxM,6634
|
|
15
|
+
chromaquant/Manual/fpm_match.py,sha256=4enAIU7rUjptRrZDHlpkqwXw8jWwbaHOIv111oVxoi8,33026
|
|
16
|
+
chromaquant/Manual/label-type.py,sha256=XKJqE5HH2haU5b8PtsTnKpQpTM_A50Wg97M6bC1RcSE,6785
|
|
17
|
+
chromaquant/Match/AutoFpmMatch.py,sha256=YD6mdcicxpRGM9GtNRgqB2R1__0iTdBzZETJQQuYCvI,49798
|
|
18
|
+
chromaquant/Match/__init__.py,sha256=glEMM7JNxipiWOPGdTirmPYrwwICC7JMlk5W1Un8Zx0,209
|
|
19
|
+
chromaquant/Match/matchMain.py,sha256=zQJteGl1KoskGdHTxFoZ8sqPhZ8CKCw0mtu8bwLqQKc,8254
|
|
20
|
+
chromaquant/Match/MatchSub/__init__.py,sha256=7xYF-cFJ_xtCpzZYW6pBwM5A84mGsOp1cLjSKa0RMA8,192
|
|
21
|
+
chromaquant/Match/MatchSub/matchTools.py,sha256=Jz4pheO6p3vUD8ClZFUZah8mnxh41otflXbyVP4a_wU,10428
|
|
22
|
+
chromaquant/Match/MatchSub/peakTools.py,sha256=Xf40kfK-j8bigya8WD7-iWjG9dUNutFTQyuKdJ3tERE,8904
|
|
23
|
+
chromaquant/Quant/AutoQuantification.py,sha256=532q9p_U5eS1yKMioIz-2QwZlfohMkLuKt-hwcGM2Lk,68286
|
|
24
|
+
chromaquant/Quant/__init__.py,sha256=OYlG-8iBRDxFuyJ8HtbvyaZaGMqCQ-4sUfl_Xu5u72Q,165
|
|
25
|
+
chromaquant/Quant/quantMain.py,sha256=7WZLAsaVZPIt1ju42pVEwtzfc6QfjDuq6fOE2jsJJfo,17748
|
|
26
|
+
chromaquant/Quant/QuantSub/__init__.py,sha256=jLwgsr-r7RPVtHuTDF5MffsdgBi66A-_QyhF-p1EFc8,236
|
|
27
|
+
chromaquant/Quant/QuantSub/gasFID.py,sha256=hcnMrdoLhM4Me--9gBdXM7Bm7Gfxuu9-GN2zyobrPiw,12118
|
|
28
|
+
chromaquant/Quant/QuantSub/gasTCD.py,sha256=kMCikHlyIbhLvpoHgmdOcNos6LZDsYfC8McVyfxXL4s,15910
|
|
29
|
+
chromaquant/Quant/QuantSub/liquidFID.py,sha256=nWHe2LLJoqH4HuHwEk5QtT7XWcGAktZL9pNaB0dYEJk,15769
|
|
30
|
+
chromaquant/Quant/QuantSub/parseTools.py,sha256=U7E0__za0RHXh0xCJW8UxF6M9_RtlB7hD0CX5HCy9Pc,4639
|
|
31
|
+
chromaquant/UAPP/__init__.py,sha256=ehqji3CJiNqMfs6gGhc1035IVcZu2c3yoMYzVp9X5Ec,157
|
|
32
|
+
chromaquant/UAPP/uappMain.py,sha256=g4ea63j6omkHdlyDQOjK5jWtgXtONE_f4XNYsmj04F8,19168
|
|
33
|
+
chromaquant-0.4.0.dist-info/METADATA,sha256=xGjDkwbvuTFucqwGcgQ76oUlOJLMSV2Y9FxrueMAJhk,13803
|
|
34
|
+
chromaquant-0.4.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
35
|
+
chromaquant-0.4.0.dist-info/entry_points.txt,sha256=ndYFHkaQbo8HqFrqgcTFR0DUf2uaaIDCKoUXq4a7fZ8,53
|
|
36
|
+
chromaquant-0.4.0.dist-info/licenses/LICENSE.txt,sha256=HsSWL8nKIHN152h0IMZ333SF77CBxXVubxVfCqh1tVs,1672
|
|
37
|
+
chromaquant-0.4.0.dist-info/licenses/LICENSES_bundled.txt,sha256=K856We6Y4uORXKYZfhzxxO2WH-H7X9aHYkDi4suIj5c,51623
|
|
38
|
+
chromaquant-0.4.0.dist-info/RECORD,,
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
chromaquant/__init__.py,sha256=YaYoGMnzPZriraM5uOtqwkjUpgmglRu1OZC3Y068WqE,125
|
|
2
|
-
chromaquant/__main__.py,sha256=zGIurUK7plMMtjM90ciHZ4RahCI8AW71uj42lvqE98A,17964
|
|
3
|
-
chromaquant/properties.json,sha256=TPGCjF6kfrkBfvNukkgtNEMC5RHXw8jpSgXANIZYi8I,167
|
|
4
|
-
chromaquant/Handle/__init__.py,sha256=_NTyu9nk9G9nHB9Ky0Zy0JLmRN_E9qvVnqYyqBjeXpw,166
|
|
5
|
-
chromaquant/Handle/handleDirectories.py,sha256=Tb_Eh3cL8t_MvEk9UQmGJ_I-20r0_vRbntWfWT3xU10,2324
|
|
6
|
-
chromaquant/Manual/HydroUI.py,sha256=R1W6n8i48sKfQOLEkihvJrKjsl8n7FUpugX-vGNehDc,17909
|
|
7
|
-
chromaquant/Manual/QuantUPP.py,sha256=r_HOxjkP5rR8htYmqtW7uEM9-fRdeRfA7wx9T-D6JtM,16524
|
|
8
|
-
chromaquant/Manual/Quantification.py,sha256=4UD5qZALnMaqv2TZLLi_ws_ob8HSnu5pVJpYDwHcpJs,61239
|
|
9
|
-
chromaquant/Manual/__init__.py,sha256=NqutHWd40NvTa2jxXn5lkLSEo3QGBGjFUAwIQq0ldYs,132
|
|
10
|
-
chromaquant/Manual/duplicateMatch.py,sha256=pYr1opZXtVOzKDFVlqb6TqahKHG7lJjdEq6NoPFKtxM,6634
|
|
11
|
-
chromaquant/Manual/fpm_match.py,sha256=4enAIU7rUjptRrZDHlpkqwXw8jWwbaHOIv111oVxoi8,33026
|
|
12
|
-
chromaquant/Manual/label-type.py,sha256=XKJqE5HH2haU5b8PtsTnKpQpTM_A50Wg97M6bC1RcSE,6785
|
|
13
|
-
chromaquant/Match/AutoFpmMatch.py,sha256=pdrQoX8p_gXevsxVyrMN7bMgDKESoMbTAJ5gsXZesEI,49758
|
|
14
|
-
chromaquant/Match/__init__.py,sha256=VSe6E42w-fxY5YndzX8e4nG_1CGuk7rGWx3C8O3DwuY,176
|
|
15
|
-
chromaquant/Quant/AutoQuantification.py,sha256=532q9p_U5eS1yKMioIz-2QwZlfohMkLuKt-hwcGM2Lk,68286
|
|
16
|
-
chromaquant/Quant/__init__.py,sha256=XaO0aNBHzFSJ85-CZjf7Na1Q_viINhwi_5E4tftPX4M,188
|
|
17
|
-
chromaquant-0.3.1.dist-info/METADATA,sha256=mV1yf5tLVA_c2leq468fPbqk-to8Ll6tnmbG1LNT_U8,13798
|
|
18
|
-
chromaquant-0.3.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
19
|
-
chromaquant-0.3.1.dist-info/entry_points.txt,sha256=ndYFHkaQbo8HqFrqgcTFR0DUf2uaaIDCKoUXq4a7fZ8,53
|
|
20
|
-
chromaquant-0.3.1.dist-info/licenses/LICENSE.txt,sha256=HsSWL8nKIHN152h0IMZ333SF77CBxXVubxVfCqh1tVs,1672
|
|
21
|
-
chromaquant-0.3.1.dist-info/licenses/LICENSES_bundled.txt,sha256=K856We6Y4uORXKYZfhzxxO2WH-H7X9aHYkDi4suIj5c,51623
|
|
22
|
-
chromaquant-0.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|