peak-performance 0.6.3__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.
- peak_performance/__init__.py +13 -0
- peak_performance/models.py +711 -0
- peak_performance/pipeline.py +1596 -0
- peak_performance/plots.py +289 -0
- peak_performance/test_main.py +4 -0
- peak_performance/test_models.py +196 -0
- peak_performance/test_pipeline.py +662 -0
- peak_performance/test_plots.py +122 -0
- peak_performance-0.6.3.dist-info/LICENSE.md +619 -0
- peak_performance-0.6.3.dist-info/METADATA +63 -0
- peak_performance-0.6.3.dist-info/RECORD +13 -0
- peak_performance-0.6.3.dist-info/WHEEL +5 -0
- peak_performance-0.6.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: peak-performance
|
|
3
|
+
Version: 0.6.3
|
|
4
|
+
Summary: A Python toolbox to fit chromatography peaks with uncertainty.
|
|
5
|
+
Author-email: Jochen Nießer <j.niesser@fz-juelich.de>, Michael Osthege <m.osthege@fz-juelich.de>
|
|
6
|
+
License: AGPLv3
|
|
7
|
+
Project-URL: homepage, https://jugit.fz-juelich.de/IBG-1/micropro/peak-performance
|
|
8
|
+
Project-URL: documentation, https://jugit.fz-juelich.de/IBG-1/micropro/peak-performance
|
|
9
|
+
Project-URL: repository, https://jugit.fz-juelich.de/IBG-1/micropro/peak-performance
|
|
10
|
+
Keywords: hplc,mass-spectrometry,uncertainty quantification
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE.md
|
|
18
|
+
Requires-Dist: arviz
|
|
19
|
+
Requires-Dist: matplotlib
|
|
20
|
+
Requires-Dist: numpy
|
|
21
|
+
Requires-Dist: pandas
|
|
22
|
+
Requires-Dist: pymc >=5.9.1
|
|
23
|
+
Requires-Dist: pytensor
|
|
24
|
+
Requires-Dist: scipy
|
|
25
|
+
Requires-Dist: openpyxl
|
|
26
|
+
Requires-Dist: numpy <1.26.0
|
|
27
|
+
Provides-Extra: test
|
|
28
|
+
Requires-Dist: pytest ; extra == 'test'
|
|
29
|
+
Requires-Dist: pytest-cov ; extra == 'test'
|
|
30
|
+
Requires-Dist: twine ; extra == 'test'
|
|
31
|
+
|
|
32
|
+
# How to use PeakPerformance
|
|
33
|
+
For installation instructions, see `Installation.md`.
|
|
34
|
+
For instructions regarding the use of PeakPerformance, check out the example notebook(s) under `notebooks`, the complementary example data under `example`, and the following introductory explanations.
|
|
35
|
+
|
|
36
|
+
## Preparing raw data
|
|
37
|
+
This step is crucial when using PeakPerformance. Raw data has to be supplied as time series meaning for each signal you want to analyze, save a NumPy array consisting of time in the first dimension and intensity in the second dimension (compare example data). Both time and intensity should also be NumPy arrays. If you e.g. have time and intensity of a singal as lists, you can use the following code to convert, format, and save them in the correct manner:
|
|
38
|
+
```
|
|
39
|
+
import numpy as np
|
|
40
|
+
from pathlib import Path
|
|
41
|
+
|
|
42
|
+
time_series = np.array([np.array(time), np.array(intensity)])
|
|
43
|
+
np.save(Path(r"example_path/time_series.npy"), time_series)
|
|
44
|
+
```
|
|
45
|
+
The naming convention of raw data files is "<acquisition name>_<precursor ion m/z or experiment number>_<product ion m/z start>_<product ion m/z end>.npy". There should be no underscores within the named sections such as `acquisition name`. Essentially, the raw data names include the acquisition and mass trace, thus yielding a recognizable and unique name for each isotopomer/fragment/metabolite/sample.
|
|
46
|
+
|
|
47
|
+
## Model selection
|
|
48
|
+
When it comes to selecting models, PeakPerformance has a function performing an automated selection process by analyzing one acquisiton per mass trace with all implemented models. Subsequently, all models are ranked based on an information criterion (either pareto-smoothed importance sampling leave-one-out cross-validation or widely applicable information criterion). For this process to work as intended, you need to specify acquisitions with representative peaks for each mass trace (see example notebook 1). If e.g. most peaks of an analyte show a skewed shape, then select an acquisition where this is the case. For double peaks, select an acquision where the peaks are as distinct and comparable in height as possible.
|
|
49
|
+
Since model selection is a computationally demanding and time consuming process, it is suggested to state the model type as the user (see example notebook 1) if possible.
|
|
50
|
+
|
|
51
|
+
## Troubleshooting
|
|
52
|
+
### A batch run broke and I want to restart it.
|
|
53
|
+
If an error occured in the middle of a batch run, then you can use the `pipeline_restart` function in the `pipeline` module to create a new batch which will analyze only those samples, which have not been analyzed previously.
|
|
54
|
+
|
|
55
|
+
### The model parameters don't converge and/or the fit does not describe the raw data well.
|
|
56
|
+
Due to the vast number of LC-MS methods out there, it is probably not possible to formulate befitting prior probability distributions (priors) for all of them. Therefore, one of the first things should be to check in `models.py` whether the model priors make sense for your application and change them according to your data in case they don't. Also, make sure the time series containing the signal to be analyzed contains the peak or double peak (preferrably in the center) and a) no other peaks as well as b) an area around the peak for estimating the baseline (a window size of roughly 5 times the peak width should be fine).
|
|
57
|
+
|
|
58
|
+
# How to contribute
|
|
59
|
+
If you encounter bugs while using PeakPerformance, please bring them to our attention by opening an issue. When doing so, describe the problem in detail and add screenshots/code snippets and whatever other helpful material you can provide.
|
|
60
|
+
When contributing code, create a local clone of PeakPerformance, create a new branch, and open a pull request (PR).
|
|
61
|
+
|
|
62
|
+
# How to cite
|
|
63
|
+
Will be updated once the paper has been released and a zenodo DOI has been created.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
peak_performance/__init__.py,sha256=yTq4THYewbWRnrs2Qkv4nCd-7MyvDlu_t0fPeWeKxQc,261
|
|
2
|
+
peak_performance/models.py,sha256=L47mNU1HItYv5cB-cs2H0ooswhdcLfBdg8X1MHeiTUY,25130
|
|
3
|
+
peak_performance/pipeline.py,sha256=A-eIwhbn9hCIvWgrG5ksfQLn--ISBKVBjq09nVDwFO8,64311
|
|
4
|
+
peak_performance/plots.py,sha256=OO5rSC-kTCzH8-Fh0diz0Cq86fyrZ_FSOiDjcboZRAU,9280
|
|
5
|
+
peak_performance/test_main.py,sha256=xQiLDjhldxZzY5sp3RyIJUTtXxX46auWY9Qy7nuifxw,97
|
|
6
|
+
peak_performance/test_models.py,sha256=X3fy-kNih7TNrr4jKzgcx8qRnmh6cA27hSr2b6Tmf18,9334
|
|
7
|
+
peak_performance/test_pipeline.py,sha256=wyzVgVYT0pK_Lnh5VZEgL8Rxn8sjiCa1dRp1tF79foM,22652
|
|
8
|
+
peak_performance/test_plots.py,sha256=lGwPWzezAhzEnyu_NMx2lFtyzzb1wxy-jnRMtOaaniY,4100
|
|
9
|
+
peak_performance-0.6.3.dist-info/LICENSE.md,sha256=zj-4LZ7oChyw5Uj5sFYOrVI3juK06Cb9lFm0rPcHXYk,32387
|
|
10
|
+
peak_performance-0.6.3.dist-info/METADATA,sha256=DfPLLA0qUpimmesc8NCuawBL9uDrfUG0FnQ5oPXxoL0,4988
|
|
11
|
+
peak_performance-0.6.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
12
|
+
peak_performance-0.6.3.dist-info/top_level.txt,sha256=-lZSmgn2fZA-xPVmddLwaRt2hQeeWj7TYVefOk7_T58,17
|
|
13
|
+
peak_performance-0.6.3.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
peak_performance
|