maldisuite 0.1.0__tar.gz
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.
- maldisuite-0.1.0/.gitignore +207 -0
- maldisuite-0.1.0/CHANGELOG.md +12 -0
- maldisuite-0.1.0/LICENSE +21 -0
- maldisuite-0.1.0/PKG-INFO +156 -0
- maldisuite-0.1.0/README.md +102 -0
- maldisuite-0.1.0/pyproject.toml +78 -0
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this meta-package will be documented here.
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [0.1.0] - 2026-04-28
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Initial release of the `maldisuite` meta-package.
|
|
11
|
+
- Pins compatible versions of `maldiamrkit[batch]>=0.14.0`, `maldibatchkit[viz]>=0.1.0`, and `maldideepkit>=0.1.0`.
|
|
12
|
+
- Landing page deployed at https://ettorerocchi.github.io/MaldiSuite/, with the suite logo and the three package logos.
|
maldisuite-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ettore Rocchi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: maldisuite
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MaldiSuite: a Python ecosystem for MALDI-TOF spectral processing and analysis in antimicrobial resistance research
|
|
5
|
+
Project-URL: Homepage, https://ettorerocchi.github.io/MaldiSuite/
|
|
6
|
+
Project-URL: Documentation, https://ettorerocchi.github.io/MaldiSuite/
|
|
7
|
+
Project-URL: Repository, https://github.com/EttoreRocchi/MaldiSuite
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/EttoreRocchi/MaldiSuite/issues
|
|
9
|
+
Project-URL: MaldiAMRKit, https://github.com/EttoreRocchi/MaldiAMRKit
|
|
10
|
+
Project-URL: MaldiBatchKit, https://github.com/EttoreRocchi/MaldiBatchKit
|
|
11
|
+
Project-URL: MaldiDeepKit, https://github.com/EttoreRocchi/MaldiDeepKit
|
|
12
|
+
Author: Ettore Rocchi
|
|
13
|
+
License: MIT License
|
|
14
|
+
|
|
15
|
+
Copyright (c) 2026 Ettore Rocchi
|
|
16
|
+
|
|
17
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
in the Software without restriction, including without limitation the rights
|
|
20
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
furnished to do so, subject to the following conditions:
|
|
23
|
+
|
|
24
|
+
The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
copies or substantial portions of the Software.
|
|
26
|
+
|
|
27
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
SOFTWARE.
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Keywords: AMR,MALDI-TOF,antimicrobial resistance,batch effect correction,clinical microbiology,deep learning,machine learning,mass spectrometry
|
|
36
|
+
Classifier: Development Status :: 4 - Beta
|
|
37
|
+
Classifier: Intended Audience :: Healthcare Industry
|
|
38
|
+
Classifier: Intended Audience :: Science/Research
|
|
39
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
40
|
+
Classifier: Operating System :: OS Independent
|
|
41
|
+
Classifier: Programming Language :: Python :: 3
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
46
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
47
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
48
|
+
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
49
|
+
Requires-Python: >=3.10
|
|
50
|
+
Requires-Dist: maldiamrkit[batch]>=0.14.0
|
|
51
|
+
Requires-Dist: maldibatchkit[viz]>=0.1.0
|
|
52
|
+
Requires-Dist: maldideepkit>=0.1.0
|
|
53
|
+
Description-Content-Type: text/markdown
|
|
54
|
+
|
|
55
|
+
# MaldiSuite
|
|
56
|
+
|
|
57
|
+
[](https://ettorerocchi.github.io/MaldiSuite/)
|
|
58
|
+
[](https://pypi.org/project/maldisuite/)
|
|
59
|
+
[](https://www.python.org/)
|
|
60
|
+
[](LICENSE)
|
|
61
|
+
|
|
62
|
+
<p align="center">
|
|
63
|
+
<img src="assets/maldi_suite_logo.png" alt="MaldiSuite" width="320"/>
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
<p align="center">
|
|
67
|
+
<strong>A Python ecosystem for MALDI-TOF spectral processing and analysis in antimicrobial resistance research</strong>
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
**MaldiSuite** combines preprocessing, batch effect correction, and deep learning classifiers in a single sklearn-compatible workflow for clinical microbiology and computational biology research.
|
|
71
|
+
|
|
72
|
+
> **Landing page:** [MaldiSuite](<https://ettorerocchi.github.io/MaldiSuite/>)
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## What this repository contains
|
|
77
|
+
|
|
78
|
+
This repository serves two purposes:
|
|
79
|
+
|
|
80
|
+
1. **Landing page** for the website.
|
|
81
|
+
2. **Meta-package**: a minimal PyPI package (`maldisuite`) that installs the three
|
|
82
|
+
packages of the suite with pinned compatible versions.
|
|
83
|
+
|
|
84
|
+
This repository **does not** contain the source code of the three packages.
|
|
85
|
+
Each package lives in its own repository, with its own issues, documentation,
|
|
86
|
+
and release cycle.
|
|
87
|
+
|
|
88
|
+
## The three packages
|
|
89
|
+
|
|
90
|
+
MaldiAMRKit owns the data model, preprocessing, evaluation, and biomarker / drift modules; MaldiBatchKit re-exports every corrector (ComBat variants, Limma, Harmony, MALDI-specific harmonisers) at the top level; MaldiDeepKit ships scikit-learn-compatible deep classifiers (`MaldiMLPClassifier`, `MaldiCNNClassifier`, `MaldiResNetClassifier`, `MaldiTransformerClassifier`).
|
|
91
|
+
|
|
92
|
+
| Logo | Package | Purpose | Repository |
|
|
93
|
+
|:---:|---|---|---|
|
|
94
|
+
| <img src="assets/maldiamrkit_logo.png" alt="MaldiAMRKit" width="80"> | **MaldiAMRKit** | Preprocessing, evaluation, biomarkers, drift monitoring | [MaldiAMRKit](https://github.com/EttoreRocchi/MaldiAMRKit) |
|
|
95
|
+
| <img src="assets/maldibatchkit_logo.png" alt="MaldiBatchKit" width="80"> | **MaldiBatchKit** | Batch effect correction for mass spectra | [MaldiBatchKit](https://github.com/EttoreRocchi/MaldiBatchKit) |
|
|
96
|
+
| <img src="assets/maldideepkit_logo.png" alt="MaldiDeepKit" width="80"> | **MaldiDeepKit** | Deep learning classifiers for MALDI-TOF spectra | [MaldiDeepKit](https://github.com/EttoreRocchi/MaldiDeepKit) |
|
|
97
|
+
|
|
98
|
+
## Installation
|
|
99
|
+
|
|
100
|
+
Install the full suite with a single command:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pip install maldisuite
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This installs `maldiamrkit`, `maldibatchkit`, and `maldideepkit` at compatible versions.
|
|
107
|
+
|
|
108
|
+
Alternatively, install individual packages separately:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install maldiamrkit # preprocessing, biomarkers, drift
|
|
112
|
+
pip install maldibatchkit # batch effect correction
|
|
113
|
+
pip install maldideepkit # deep learning classifiers
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Quick start
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from maldiamrkit import MaldiSet
|
|
120
|
+
from maldiamrkit.evaluation import CaseGroupedKFold, vme_scorer
|
|
121
|
+
from maldibatchkit import BatchAwareWarping, ComBat
|
|
122
|
+
from maldideepkit import MaldiMLPClassifier
|
|
123
|
+
from sklearn.pipeline import Pipeline
|
|
124
|
+
from sklearn.model_selection import cross_val_score
|
|
125
|
+
|
|
126
|
+
data = MaldiSet.from_directory("driams/", "meta.csv", bin_width=3)
|
|
127
|
+
batch = data.meta["batch"]
|
|
128
|
+
|
|
129
|
+
pipe = Pipeline([
|
|
130
|
+
("warp", BatchAwareWarping(batch=batch)),
|
|
131
|
+
("combat", ComBat(batch=batch, method="fortin")),
|
|
132
|
+
("clf", MaldiMLPClassifier(input_dim=data.X.shape[1], random_state=0)),
|
|
133
|
+
])
|
|
134
|
+
|
|
135
|
+
scores = cross_val_score(
|
|
136
|
+
pipe, data.X, data.get_y_single("Drug"),
|
|
137
|
+
scoring=vme_scorer,
|
|
138
|
+
cv=CaseGroupedKFold(n_splits=5),
|
|
139
|
+
groups=data.meta["patient_id"],
|
|
140
|
+
)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Citation
|
|
144
|
+
|
|
145
|
+
Citation will be available soon.
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
MIT License - see [`LICENSE`](LICENSE) for the full text.
|
|
150
|
+
|
|
151
|
+
## Acknowledgments
|
|
152
|
+
|
|
153
|
+
MaldiSuite builds on the work of the mass spectrometry and clinical microbiology communities. In particular, we acknowledge:
|
|
154
|
+
|
|
155
|
+
- MALDIquant (Gibb & Strimmer, 2012, *Bioinformatics*)
|
|
156
|
+
- The Borgwardt Lab and the DRIAMS benchmark (Weis et al., 2022, *Nature Medicine*), which established Python-based MALDI-TOF AMR prediction as a research area
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# MaldiSuite
|
|
2
|
+
|
|
3
|
+
[](https://ettorerocchi.github.io/MaldiSuite/)
|
|
4
|
+
[](https://pypi.org/project/maldisuite/)
|
|
5
|
+
[](https://www.python.org/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="assets/maldi_suite_logo.png" alt="MaldiSuite" width="320"/>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<strong>A Python ecosystem for MALDI-TOF spectral processing and analysis in antimicrobial resistance research</strong>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
**MaldiSuite** combines preprocessing, batch effect correction, and deep learning classifiers in a single sklearn-compatible workflow for clinical microbiology and computational biology research.
|
|
17
|
+
|
|
18
|
+
> **Landing page:** [MaldiSuite](<https://ettorerocchi.github.io/MaldiSuite/>)
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## What this repository contains
|
|
23
|
+
|
|
24
|
+
This repository serves two purposes:
|
|
25
|
+
|
|
26
|
+
1. **Landing page** for the website.
|
|
27
|
+
2. **Meta-package**: a minimal PyPI package (`maldisuite`) that installs the three
|
|
28
|
+
packages of the suite with pinned compatible versions.
|
|
29
|
+
|
|
30
|
+
This repository **does not** contain the source code of the three packages.
|
|
31
|
+
Each package lives in its own repository, with its own issues, documentation,
|
|
32
|
+
and release cycle.
|
|
33
|
+
|
|
34
|
+
## The three packages
|
|
35
|
+
|
|
36
|
+
MaldiAMRKit owns the data model, preprocessing, evaluation, and biomarker / drift modules; MaldiBatchKit re-exports every corrector (ComBat variants, Limma, Harmony, MALDI-specific harmonisers) at the top level; MaldiDeepKit ships scikit-learn-compatible deep classifiers (`MaldiMLPClassifier`, `MaldiCNNClassifier`, `MaldiResNetClassifier`, `MaldiTransformerClassifier`).
|
|
37
|
+
|
|
38
|
+
| Logo | Package | Purpose | Repository |
|
|
39
|
+
|:---:|---|---|---|
|
|
40
|
+
| <img src="assets/maldiamrkit_logo.png" alt="MaldiAMRKit" width="80"> | **MaldiAMRKit** | Preprocessing, evaluation, biomarkers, drift monitoring | [MaldiAMRKit](https://github.com/EttoreRocchi/MaldiAMRKit) |
|
|
41
|
+
| <img src="assets/maldibatchkit_logo.png" alt="MaldiBatchKit" width="80"> | **MaldiBatchKit** | Batch effect correction for mass spectra | [MaldiBatchKit](https://github.com/EttoreRocchi/MaldiBatchKit) |
|
|
42
|
+
| <img src="assets/maldideepkit_logo.png" alt="MaldiDeepKit" width="80"> | **MaldiDeepKit** | Deep learning classifiers for MALDI-TOF spectra | [MaldiDeepKit](https://github.com/EttoreRocchi/MaldiDeepKit) |
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
Install the full suite with a single command:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install maldisuite
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This installs `maldiamrkit`, `maldibatchkit`, and `maldideepkit` at compatible versions.
|
|
53
|
+
|
|
54
|
+
Alternatively, install individual packages separately:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install maldiamrkit # preprocessing, biomarkers, drift
|
|
58
|
+
pip install maldibatchkit # batch effect correction
|
|
59
|
+
pip install maldideepkit # deep learning classifiers
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Quick start
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from maldiamrkit import MaldiSet
|
|
66
|
+
from maldiamrkit.evaluation import CaseGroupedKFold, vme_scorer
|
|
67
|
+
from maldibatchkit import BatchAwareWarping, ComBat
|
|
68
|
+
from maldideepkit import MaldiMLPClassifier
|
|
69
|
+
from sklearn.pipeline import Pipeline
|
|
70
|
+
from sklearn.model_selection import cross_val_score
|
|
71
|
+
|
|
72
|
+
data = MaldiSet.from_directory("driams/", "meta.csv", bin_width=3)
|
|
73
|
+
batch = data.meta["batch"]
|
|
74
|
+
|
|
75
|
+
pipe = Pipeline([
|
|
76
|
+
("warp", BatchAwareWarping(batch=batch)),
|
|
77
|
+
("combat", ComBat(batch=batch, method="fortin")),
|
|
78
|
+
("clf", MaldiMLPClassifier(input_dim=data.X.shape[1], random_state=0)),
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
scores = cross_val_score(
|
|
82
|
+
pipe, data.X, data.get_y_single("Drug"),
|
|
83
|
+
scoring=vme_scorer,
|
|
84
|
+
cv=CaseGroupedKFold(n_splits=5),
|
|
85
|
+
groups=data.meta["patient_id"],
|
|
86
|
+
)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Citation
|
|
90
|
+
|
|
91
|
+
Citation will be available soon.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT License - see [`LICENSE`](LICENSE) for the full text.
|
|
96
|
+
|
|
97
|
+
## Acknowledgments
|
|
98
|
+
|
|
99
|
+
MaldiSuite builds on the work of the mass spectrometry and clinical microbiology communities. In particular, we acknowledge:
|
|
100
|
+
|
|
101
|
+
- MALDIquant (Gibb & Strimmer, 2012, *Bioinformatics*)
|
|
102
|
+
- The Borgwardt Lab and the DRIAMS benchmark (Weis et al., 2022, *Nature Medicine*), which established Python-based MALDI-TOF AMR prediction as a research area
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "maldisuite"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "MaldiSuite: a Python ecosystem for MALDI-TOF spectral processing and analysis in antimicrobial resistance research"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Ettore Rocchi" }
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"MALDI-TOF",
|
|
17
|
+
"antimicrobial resistance",
|
|
18
|
+
"AMR",
|
|
19
|
+
"clinical microbiology",
|
|
20
|
+
"mass spectrometry",
|
|
21
|
+
"machine learning",
|
|
22
|
+
"deep learning",
|
|
23
|
+
"batch effect correction",
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 4 - Beta",
|
|
27
|
+
"Intended Audience :: Science/Research",
|
|
28
|
+
"Intended Audience :: Healthcare Industry",
|
|
29
|
+
"License :: OSI Approved :: MIT License",
|
|
30
|
+
"Operating System :: OS Independent",
|
|
31
|
+
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Programming Language :: Python :: 3.13",
|
|
36
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
37
|
+
"Topic :: Scientific/Engineering :: Medical Science Apps.",
|
|
38
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
dependencies = [
|
|
42
|
+
"maldiamrkit[batch]>=0.14.0",
|
|
43
|
+
"maldibatchkit[viz]>=0.1.0",
|
|
44
|
+
"maldideepkit>=0.1.0",
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[project.urls]
|
|
48
|
+
Homepage = "https://ettorerocchi.github.io/MaldiSuite/"
|
|
49
|
+
Documentation = "https://ettorerocchi.github.io/MaldiSuite/"
|
|
50
|
+
Repository = "https://github.com/EttoreRocchi/MaldiSuite"
|
|
51
|
+
"Bug Tracker" = "https://github.com/EttoreRocchi/MaldiSuite/issues"
|
|
52
|
+
MaldiAMRKit = "https://github.com/EttoreRocchi/MaldiAMRKit"
|
|
53
|
+
MaldiBatchKit = "https://github.com/EttoreRocchi/MaldiBatchKit"
|
|
54
|
+
MaldiDeepKit = "https://github.com/EttoreRocchi/MaldiDeepKit"
|
|
55
|
+
|
|
56
|
+
# This is a meta-package with no Python code of its own.
|
|
57
|
+
# It exists solely to pin a compatible set of versions across the three
|
|
58
|
+
# packages of the MaldiSuite. Installing this package triggers installation
|
|
59
|
+
# of MaldiAMRKit, MaldiBatchKit, and MaldiDeepKit at compatible versions.
|
|
60
|
+
[tool.hatch.build.targets.wheel]
|
|
61
|
+
bypass-selection = true
|
|
62
|
+
|
|
63
|
+
[tool.hatch.build.targets.sdist]
|
|
64
|
+
include = [
|
|
65
|
+
"README.md",
|
|
66
|
+
"LICENSE",
|
|
67
|
+
"CHANGELOG.md",
|
|
68
|
+
"pyproject.toml",
|
|
69
|
+
]
|
|
70
|
+
exclude = [
|
|
71
|
+
"index.html",
|
|
72
|
+
"css/**",
|
|
73
|
+
"js/**",
|
|
74
|
+
"assets/**",
|
|
75
|
+
"data/**",
|
|
76
|
+
".github/**",
|
|
77
|
+
".nojekyll",
|
|
78
|
+
]
|