eclipse-ms 0.1.2__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.
- eclipse_ms/__init__.py +45 -0
- eclipse_ms/cli.py +107 -0
- eclipse_ms/cluster.py +105 -0
- eclipse_ms/config.py +53 -0
- eclipse_ms/consensus.py +148 -0
- eclipse_ms/embed.py +96 -0
- eclipse_ms/layers.py +84 -0
- eclipse_ms/modelhub.py +173 -0
- eclipse_ms/models.py +451 -0
- eclipse_ms/preprocessing.py +85 -0
- eclipse_ms-0.1.2.dist-info/METADATA +152 -0
- eclipse_ms-0.1.2.dist-info/RECORD +15 -0
- eclipse_ms-0.1.2.dist-info/WHEEL +4 -0
- eclipse_ms-0.1.2.dist-info/entry_points.txt +2 -0
- eclipse_ms-0.1.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: eclipse-ms
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Conditional spectrum autoencoder and clustering for MS/MS dark-proteome discovery
|
|
5
|
+
Project-URL: Homepage, https://github.com/VilenneFrederique/ECLIPSE
|
|
6
|
+
Project-URL: Repository, https://github.com/VilenneFrederique/ECLIPSE
|
|
7
|
+
Project-URL: Issues, https://github.com/VilenneFrederique/ECLIPSE/issues
|
|
8
|
+
Author-email: Frederique Vilenne <frederique.vilenne@uhasselt.be>
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2026 Frederique Vilenne, Piotr Prostko, Dirk Valkenborg
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Keywords: autoencoder,clustering,deep learning,mass spectrometry,proteomics
|
|
32
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
33
|
+
Classifier: Operating System :: OS Independent
|
|
34
|
+
Classifier: Programming Language :: Python :: 3
|
|
35
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
36
|
+
Requires-Python: >=3.10
|
|
37
|
+
Requires-Dist: numpy>=1.23
|
|
38
|
+
Requires-Dist: pandas>=1.5
|
|
39
|
+
Requires-Dist: platformdirs>=3.0
|
|
40
|
+
Requires-Dist: scikit-learn>=1.2
|
|
41
|
+
Requires-Dist: tensorflow>=2.13
|
|
42
|
+
Requires-Dist: tqdm>=4.64
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: build>=1.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: ruff>=0.1; extra == 'dev'
|
|
47
|
+
Provides-Extra: hdbscan
|
|
48
|
+
Requires-Dist: hdbscan>=0.8.33; extra == 'hdbscan'
|
|
49
|
+
Provides-Extra: mzml
|
|
50
|
+
Requires-Dist: pyteomics>=4.6; extra == 'mzml'
|
|
51
|
+
Provides-Extra: train
|
|
52
|
+
Requires-Dist: joblib>=1.2; extra == 'train'
|
|
53
|
+
Requires-Dist: pyteomics>=4.6; extra == 'train'
|
|
54
|
+
Requires-Dist: regex>=2023.0; extra == 'train'
|
|
55
|
+
Requires-Dist: tqdm>=4.64; extra == 'train'
|
|
56
|
+
Provides-Extra: viz
|
|
57
|
+
Requires-Dist: matplotlib>=3.6; extra == 'viz'
|
|
58
|
+
Requires-Dist: umap-learn>=0.5; extra == 'viz'
|
|
59
|
+
Description-Content-Type: text/markdown
|
|
60
|
+
|
|
61
|
+
# ECLIPSE
|
|
62
|
+
|
|
63
|
+
**ECLIPSE** embeds MS/MS spectra with a conditional transformer autoencoder
|
|
64
|
+
and clusters the latent space to discover candidate novel ("dark proteome")
|
|
65
|
+
peptides. Spectra are conditioned on precursor *m/z*, charge, and ion mobility,
|
|
66
|
+
so same-peptide spectra land close together in latent space.
|
|
67
|
+
|
|
68
|
+
The trained model is large (~650 MB), so it is **not** shipped on PyPI. The pip
|
|
69
|
+
package contains the code; the weights are hosted externally and downloaded +
|
|
70
|
+
cached on first use. Because embedding only needs the **encoder**, the default
|
|
71
|
+
download is encoder-only — roughly half the full model.
|
|
72
|
+
|
|
73
|
+
## Installation
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install eclipse-ms # core: load model, embed, cluster
|
|
77
|
+
pip install "eclipse-ms[hdbscan]" # add HDBSCAN clustering
|
|
78
|
+
pip install "eclipse-ms[viz]" # add plotting (matplotlib, umap)
|
|
79
|
+
pip install "eclipse-ms[mzml]" # add pyteomics for mzML
|
|
80
|
+
pip install "eclipse-ms[train]" # everything needed to retrain
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
TensorFlow is a core dependency (the encoder needs it) but is imported lazily —
|
|
84
|
+
`import eclipse_ms` does not load TensorFlow until you actually build or load a
|
|
85
|
+
model.
|
|
86
|
+
|
|
87
|
+
## Getting the weights
|
|
88
|
+
|
|
89
|
+
`load_encoder()` resolves the model files in this order:
|
|
90
|
+
|
|
91
|
+
1. `ECLIPSE_MODEL_DIR` — set this to a folder holding the weights (handy on
|
|
92
|
+
an HPC node where you already have them):
|
|
93
|
+
```bash
|
|
94
|
+
export ECLIPSE_MODEL_DIR=/path/to/weights
|
|
95
|
+
```
|
|
96
|
+
2. the local cache (downloaded once, then reused);
|
|
97
|
+
3. download from the GitHub release (the URLs are configured in
|
|
98
|
+
`eclipse_ms.modelhub.REGISTRY`).
|
|
99
|
+
|
|
100
|
+
With no setup, option 3 runs automatically on first use. You can also bypass
|
|
101
|
+
the registry with explicit local paths:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from eclipse_ms import load_encoder
|
|
105
|
+
encoder = load_encoder(weights="encoder.weights.h5", config="encoder_config.json")
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Quick start
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
import numpy as np
|
|
112
|
+
from eclipse_ms import load_encoder, embed_raw_spectra, cluster_latents, score_clusters
|
|
113
|
+
|
|
114
|
+
encoder = load_encoder() # downloads/caches the encoder on first call
|
|
115
|
+
|
|
116
|
+
# raw peak lists + precursor info (lists aligned by index)
|
|
117
|
+
latents = embed_raw_spectra(
|
|
118
|
+
encoder,
|
|
119
|
+
mz_list, intensity_list,
|
|
120
|
+
precursor_mz, charge, ion_mobility,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
labels, info = cluster_latents(latents, method="hdbscan", min_cluster_size=5)
|
|
124
|
+
scores = score_clusters(latents, labels)
|
|
125
|
+
print(info["n_clusters"], "clusters")
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Command line:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
eclipse embed -i parquet_dir/ -o latents.npy
|
|
132
|
+
eclipse cluster -i latents.npy -o clusters/ --method hdbscan
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Repository layout
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
src/eclipse_ms/ installable package (model, embed, cluster, consensus, CLI)
|
|
139
|
+
training/ NOT installed: HPC data-prep, training, and export scripts
|
|
140
|
+
export_encoder.py run once to create the slim encoder assets to publish
|
|
141
|
+
reference/ the original monolithic scripts, kept verbatim
|
|
142
|
+
tests/ run without TensorFlow or weights (model tests auto-skip)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Citation
|
|
146
|
+
Publication Pending!
|
|
147
|
+
|
|
148
|
+
Vilenne, Frédérique & Valkenborg Dirk. Clustering the Dark Proteome: A Deep Learning Approach to Novel Peptide Discovery in Immunopeptidomics (2026)
|
|
149
|
+
|
|
150
|
+
## License
|
|
151
|
+
|
|
152
|
+
MIT © 2026 Frédérique Vilenne, Dirk Valkenborg
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
eclipse_ms/__init__.py,sha256=Iep1nnnVfeg2q7Z0kUskPiDc-t0WkeNL4udDUlqzsIc,1243
|
|
2
|
+
eclipse_ms/cli.py,sha256=61ptVLcTvsP4umzNo5vAExAzaHhi7EJuoGeE5sfS1vY,3918
|
|
3
|
+
eclipse_ms/cluster.py,sha256=JayOIHicfJl-4395Zro60WaNKCv9IrmrTV0goNIm2Cg,3290
|
|
4
|
+
eclipse_ms/config.py,sha256=h17cBSiFwmss4UMZs7i5ee7J9AA089ea378gnGG512U,1304
|
|
5
|
+
eclipse_ms/consensus.py,sha256=TzbmtChneQoNblE6gYEixFFavcAmEaOMjrSA9CrGtOw,5901
|
|
6
|
+
eclipse_ms/embed.py,sha256=mst2Ukl5mujGR8FXv9w6qT7hA4QZpS0lEJHCByTQTcs,3219
|
|
7
|
+
eclipse_ms/layers.py,sha256=ozZeqyExJlr95l0nuhR7PuaXicmdNTZTHDH7pV4pZVo,2544
|
|
8
|
+
eclipse_ms/modelhub.py,sha256=goyXlN8430lMbTkbMkzA9Dfdh7_h2p_SYTO6kQxN_hI,6560
|
|
9
|
+
eclipse_ms/models.py,sha256=UYMRG1LR-Yk5HAd7gvoTWJzrVb2XfG6yJUGC7oLgx1k,14974
|
|
10
|
+
eclipse_ms/preprocessing.py,sha256=G3zU9haY18rRdL_pqy-ugkjL92mnGA-5B_prRy2LW4o,2790
|
|
11
|
+
eclipse_ms-0.1.2.dist-info/METADATA,sha256=uuQoFiWo7VCK1iseLlB5cYgKYz98Bq5sPa7Q399buVM,6008
|
|
12
|
+
eclipse_ms-0.1.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
13
|
+
eclipse_ms-0.1.2.dist-info/entry_points.txt,sha256=QiOsGeM4UHvZ4P9rf0X8oHVb_mLKgqM84WGqgGdqEYc,48
|
|
14
|
+
eclipse_ms-0.1.2.dist-info/licenses/LICENSE,sha256=dSRTn0VVvtb7FNXXEbhbcxUnh9Dr2_eJ9veiUHWw5ow,1107
|
|
15
|
+
eclipse_ms-0.1.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Frederique Vilenne, Piotr Prostko, Dirk Valkenborg
|
|
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.
|