chromaquant 0.3.1__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.
@@ -0,0 +1,189 @@
1
+ Metadata-Version: 2.3
2
+ Name: chromaquant
3
+ Version: 0.3.1
4
+ Summary: Analytical platform for gas chromatography
5
+ Project-URL: Repository, https://github.com/JnliaH/ChromaQuant
6
+ Author: Julia Hancock
7
+ License:
8
+ ChromaQuant – A quantification software for complex gas chromatographic data
9
+
10
+ Copyright (c) 2024, by Julia Hancock
11
+ Affiliation: Dr. Julie Elaine Rorrer
12
+ URL: https://www.rorrerlab.com/
13
+
14
+ License: BSD 3-Clause License
15
+
16
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
17
+
18
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
21
+
22
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
23
+
24
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+ License-File: LICENSE.txt
26
+ License-File: LICENSES_bundled.txt
27
+ Keywords: Analysis,Analytical Chemistry,Chromatography,Complex Hydrocarbon Analysis,Mass Spectrometry
28
+ Classifier: Development Status :: 2 - Pre-Alpha
29
+ Classifier: Environment :: MacOS X
30
+ Classifier: License :: OSI Approved :: BSD License
31
+ Classifier: Natural Language :: English
32
+ Classifier: Programming Language :: Python
33
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
34
+ Requires-Python: >=3.12
35
+ Requires-Dist: chemformula~=1.3.1
36
+ Requires-Dist: molmass~=2024.5.24
37
+ Requires-Dist: numpy~=1.26.4
38
+ Requires-Dist: openpyxl~=3.1.5
39
+ Requires-Dist: pandas~=2.2.2
40
+ Requires-Dist: pillow~=10.3.0
41
+ Requires-Dist: plotly~=5.22.0
42
+ Requires-Dist: pubchempy~=1.0.4
43
+ Requires-Dist: rdkit~=2024.3.5
44
+ Requires-Dist: scipy~=1.13.1
45
+ Requires-Dist: ttkthemes~=3.2.2
46
+ Requires-Dist: xlsxwriter~=3.2.0
47
+ Description-Content-Type: text/markdown
48
+
49
+ <h1>ChromaQuant</h1>
50
+ <i>A solution for automated gas chromatographic peak assignment and quantification</i>
51
+
52
+ <h4>Introduction</h4>
53
+ <img style="float: right;" align="right" width="256" alt="ChromaQuant Logo" src="https://github.com/JnliaH/ChromaQuant/blob/rebrand/images/ChromaQuantIcon.png">
54
+ This project aims to simplify the workflow for combining gas chromatography (GC) data collected from multiple sources. More
55
+ specifically, it is designed to accommodate the case where GCs with flame ionization and thermal conductivity detectors are
56
+ used to collect quantitative data that must be labelled using data from mass spectroscopic results. This project assumes the
57
+ following setup:
58
+ <ul>
59
+ <li>A GC equipped with FID/TCD is used to quantify gaseous products from a reaction</li>
60
+ <li>A GC equipped with FID/MS is used to quantify liquid products from a reaction</li>
61
+ <li>A GC equipped with FID/MS is used to label both gas and liquid reaction products</li>
62
+ </ul>
63
+ The GCs mentioned in the second and third bullets are assumed to be the same GC. This project also assumes that external software can be used to obtain spectra and integration/identification results.<br><br>
64
+
65
+ Relative response factors (or simply "response factors" or RFs from now on) are used to get quantitative data from liquid FID results. These are defined as:
66
+
67
+ $$RF = \frac{(A_i/A_s)}{m_i/m_s}$$
68
+
69
+ Where $A_i$ is the Area for the species of interest, $A_s$ is the area of the internal standard, $m_i$ is the mass of the species of interest, and $m_s$ is the mass of the internal standard. In the Rorrer Lab, we use 1,3,5-tri-tert-butylbenzene as an internal standard. Response factors are determined by making solutions (~6) of known concentration across a given concentration range and applying a linear fit. Interpolation/extrapolation is used for cases where response factors are not known using fits determined in the liquid FID RFs Excel sheet. Gas TCD integration values are quantified by using (non-relative) response factors defined as:
70
+
71
+ $$RF = \frac{Area}{Volume Percent}$$
72
+
73
+ Quantitative data is then determined by getting a total volume of gas collected by dividing the amount of CO2 (the internal standard) injected by the vol.% CO2. This total volume is then used alongside volume percents for each species of interest and the ideal gas law to determine the quantity of each product. Again, RFs are determined using external calibration gas injections. Gas FID integration is quantified similarly, except the total volume of gas determined in the TCD step is used since CO2 does not show up separately in the FID chromatogram.
74
+
75
+ <h4>Installation</h4>
76
+ Install ChromaQuant by running the following command in the terminal/command prompt:<br>
77
+
78
+ > pip install chromaquant
79
+
80
+ This should install ChromaQuant along with its dependencies. There are several subpackage files used in both manual and automatic analysis that can be imported directly. To start the GUI for automated quantification, run the following command:<br>
81
+ > chroma-ui
82
+
83
+ or
84
+
85
+ > python -m chromaquant
86
+
87
+ <h4>The workflow</h4>
88
+ <p align="center">
89
+ <img width="498" alt="Analytical workflow diagram demonstrating which files are necessary and which processes they are used in." src="images/workflow.png"><br>
90
+ <b>Figure 1</b>: ChromaQuant's analytical workflow
91
+ </p>
92
+
93
+ <h4>Prerequisites</h4>
94
+ As mentioned previously, this workflow assumes you have access to software that can take raw acquisition data files and produce spectra, integration values, and peak labels. Also, since there are duplicate FID signals for gas injections it is assumed you use the signal from the GC-FID/TCD. The files required to fully process analyzed samples are given in <b>Table 1</b>.<br><br>
95
+
96
+ <div align="center">
97
+ <b>Table 1</b>: Files required for ChromaQuant<br><br>
98
+
99
+ | File Name | Description |
100
+ | :-----------------------------: | :-------------------------------------------------------------------: |
101
+ |[Sample]_[Injection]_LQ1_FID_SPEC| Sample's FID spectra acquired from liquid sample injection |
102
+ |[Sample]_[Injection]_LQ1_MS_SPEC | Sample's MS spectra acquired from liquid sample injection |
103
+ |[Sample]_[Injection]_LQ1_FID_CSO | Sample's FID integration values acquired from liquid sample injection |
104
+ |[Sample]_[Injection]_LQ1_UA_UPP | Sample's FID spectra acquired from liquid sample injection |
105
+ |[Sample]_[Injection]_GS1_MS_SPEC | Sample's MS spectra acquired from gas sample injection |
106
+ |[Sample]_[Injection]_GS2_FID_SPEC| Sample's FID spectra acquired from gas sample injection |
107
+ |[Sample]_[Injection]_GS2_TCD_SPEC| Sample's TCD spectra acquired from gas sample injection |
108
+ |[Sample]_[Injection]_GS2_TCD_CSO | Sample's FID spectra acquired from liquid sample injection |
109
+ |[Sample]_[Injection]_GS1_UA_UPP | Sample's FID spectra acquired from liquid sample injection |
110
+ |[Sample]_INFO.json | JSON containing necessary information about the sample |
111
+ </div>
112
+
113
+ The FID, MS, and TCD spectra must all be .csv files with no headers and two columns. The first column (again, unlabeled) must represent retention times (in minutes) and the second column must represent the signal at each row's retention time.
114
+
115
+ The UA_UPP files must be .csv files that contain the columns "Component RT", "Compound Name", "Formula", and "Match Factor", in no particular order. These files should contain a list of all compounds identified in the MS spectra alongside their MS retention time (min), formula (standard molecular formula format, numbers not expressed as subscripts), and the match factor assigned by the MS interpretation software library search (0-100).
116
+
117
+ The CSO files must be .csv files that contain the columns "Signal Name", "RT", "Area", and "Height", in no particular order. The LQ1_FID_CSO file should contain a list of all integrated peaks in the FID spectra from liquids analysis, including these peaks retention times, area, and height. The GS2_TCD_CSO file should contain a list of all integrated peaks in the FID and TCD spectra from gas analysis. In the case of LQ1, the signal name should be FID1A for every peak; for GS2, the signal name should be FID1A for the FID peaks and TCD2B for the TCD peaks. This program uses the signal name to distinguish between FID and TCD results for the gas phase analysis – there aren't separate files for these two lists of integration values.
118
+
119
+ The INFO file must be a .json file containing the following information in the following format. A file version of this .json data is found under the root directory as "empty_INFO.json".
120
+
121
+ ```json
122
+ {
123
+ "Sample Name": "[Sample]_[Injection]",
124
+ "Reactor Name": "[Reactor name]",
125
+ "Catalyst Type": "[Catalyst name, be as descriptive as possible]",
126
+ "Catalyst Amount (mg)": "[Catalyst added to reactor, sum masses if more than one catalyst]",
127
+ "Plastic Type": "[Name of substrate added, be as descriptive as possible]",
128
+ "Plastic Amount (mg)": "[Mass of substrate added]",
129
+ "Reaction Temperature (C)": "[Temperature of reactor before quenching]",
130
+ "Quench Temperature (C)": "[Temperature of reactor after quenching]",
131
+ "Reaction Pressure (psi)": "[Pressure of reactor before quenching]",
132
+ "Initial Pressure (psi)": "[Initial charge pressure of reactor]",
133
+ "Quench Pressure (psi)": "[Pressure of reactor after quenching",
134
+ "Start Time": "[Start time in format yyyy-mm-dd hh:mm:ss.000]",
135
+ "End Time": "[End time in format yyyy-mm-dd hh:mm:ss.000]",
136
+ "Heat Time": "[Time taken to reach reaction temperature from room temperature]",
137
+ "Internal Standard Name": "[Name of external/internal standard]",
138
+ "Internal Standard Mass (mg)": "[Mass of external/internal standard]",
139
+ "Reactor Volume (mL)": "[Reactor total volume]",
140
+ "Remaining solids (mg)": "[Weight of dry residual solids]",
141
+ "Injected CO2 (mL)": "[Volume of CO2 injected into gas bag containing gas sample]"
142
+ }
143
+ ```
144
+
145
+ <h4>Data Structure</h4>
146
+ Inside of the ChromaQuant documents folder are a few folders: data, resources, response-factors, and images. The data folder contains directories representing individual samples or reaction products to be analyzed. This is the most frequently used folder in ChromaQuant The resources folder contains a .csv file with known gas FID compounds used in third order assignment alongside some legacy files describing compound structure. This folder also contains the theme used in the ChromaQuant UI. The response-factors folder contains several files with response factors listed by compound type and carbon number split by detector. These response factors are highly dependant on the conditions and methods used in GC analysis and therefore it is critical these are kept updated with lab-specific values for the most accurate results. Finally, the images folder contains the logo in several formats and the workflow image. <br><br>
147
+
148
+ ```bash
149
+ .
150
+ ├── data
151
+ │   └── example2
152
+ │   ├── breakdowns
153
+ │   │   ├── example2_Breakdown_20240729 (1).xlsx
154
+ │   │   └── example2_Breakdown_20240729.xlsx
155
+ │   ├── example2_INFO.json
156
+ │   ├── log
157
+ │   │   └── quantlog_20240729.log
158
+ │   ├── manual
159
+ │   │   └── MBPR053_02_ManualBreakdown.xlsx
160
+ │   └── raw data
161
+ │   ├── example2_GS1_MS_SPEC.csv
162
+ │   ├── example2_GS1_UA_Comp_UPP.csv
163
+ │   ├── example2_GS2_FID_SPEC.CSV
164
+ │   ├── example2_GS2_FIDpMS.csv
165
+ │   ├── example2_GS2_TCD_CSO.csv
166
+ │   ├── example2_GS2_TCD_SPEC.CSV
167
+ │   ├── example2_LQ1_FID_CSO.csv
168
+ │   ├── example2_LQ1_FID_SPEC.CSV
169
+ │   ├── example2_LQ1_FIDpMS.csv
170
+ │   ├── example2_LQ1_MS_SPEC.csv
171
+ │   └── example2_LQ1_UA_Comp_UPP.csv
172
+ ├── images
173
+ │   ├── ChromaQuantIcon.icns
174
+ │   ├── ChromaQuantIcon.png
175
+ │   ├── ChromaQuantIcon.svg
176
+ │   └── workflow.png
177
+ ├── resources
178
+ │   ├── KnownCompoundsAuto.xlsx
179
+ │   ├── gasPairs_FIDpMS.csv
180
+ │   ├── known_compounds.csv
181
+ │   └── smilePairs.csv
182
+ └── response-factors
183
+ ├── FIDRF_7-24-24.csv
184
+ ├── LRF_7-24-24.xlsx
185
+ ├── TCDRF_7-24-24.csv
186
+ └── liquidRFFits.csv
187
+ ```
188
+
189
+ For a given sample, all data files listed in **Table 1** should be placed in the "data/[Sample]/raw data" directory except for the INFO.json, which should be placed in the "data/[Sample]" directory.
@@ -0,0 +1,22 @@
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,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.25.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [gui_scripts]
2
+ chroma-ui = chromaquant.__main__:runUI
@@ -0,0 +1,18 @@
1
+
2
+ ChromaQuant – A quantification software for complex gas chromatographic data
3
+
4
+ Copyright (c) 2024, by Julia Hancock
5
+ Affiliation: Dr. Julie Elaine Rorrer
6
+ URL: https://www.rorrerlab.com/
7
+
8
+ License: BSD 3-Clause License
9
+
10
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
11
+
12
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
13
+
14
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.