ECLIPSE
ECLIPSE embeds MS/MS spectra with a conditional transformer autoencoder and clusters the latent space to discover candidate novel ("dark proteome") peptides. Spectra are conditioned on precursor m/z, charge, and ion mobility, so same-peptide spectra land close together in latent space.
The trained model is large (~650 MB), so it is not shipped on PyPI. The pip package contains the code; the weights are hosted externally and downloaded + cached on first use. Because embedding only needs the encoder, the default download is encoder-only — roughly half the full model.
Installation
pip install eclipse-ms # core: load model, embed, cluster
pip install "eclipse-ms[hdbscan]" # add HDBSCAN clustering
pip install "eclipse-ms[viz]" # add plotting (matplotlib, umap)
pip install "eclipse-ms[mzml]" # add pyteomics for mzML
pip install "eclipse-ms[train]" # everything needed to retrain
TensorFlow is a core dependency (the encoder needs it) but is imported lazily —
import eclipse_ms does not load TensorFlow until you actually build or load a
model.
Getting the weights
load_encoder() resolves the model files in this order:
ECLIPSE_MODEL_DIR— set this to a folder holding the weights (handy on an HPC node where you already have them):
export ECLIPSE_MODEL_DIR=/path/to/weights
- the local cache (downloaded once, then reused);
- download from the GitHub release (the URLs are configured in
eclipse_ms.modelhub.REGISTRY).
With no setup, option 3 runs automatically on first use. You can also bypass the registry with explicit local paths:
from eclipse_ms import load_encoder
encoder = load_encoder(weights="encoder.weights.h5", config="encoder_config.json")
Quick start
import numpy as np
from eclipse_ms import load_encoder, embed_raw_spectra, cluster_latents, score_clusters
encoder = load_encoder() # downloads/caches the encoder on first call
# raw peak lists + precursor info (lists aligned by index)
latents = embed_raw_spectra(
encoder,
mz_list, intensity_list,
precursor_mz, charge, ion_mobility,
)
labels, info = cluster_latents(latents, method="hdbscan", min_cluster_size=5)
scores = score_clusters(latents, labels)
print(info["n_clusters"], "clusters")
Command line:
eclipse embed -i parquet_dir/ -o latents.npy
eclipse cluster -i latents.npy -o clusters/ --method hdbscan
Repository layout
src/eclipse_ms/ installable package (model, embed, cluster, consensus, CLI)
training/ NOT installed: HPC data-prep, training, and export scripts
export_encoder.py run once to create the slim encoder assets to publish
reference/ the original monolithic scripts, kept verbatim
tests/ run without TensorFlow or weights (model tests auto-skip)
Citation
Publication Pending!
Vilenne, Frédérique & Valkenborg Dirk. Clustering the Dark Proteome: A Deep Learning Approach to Novel Peptide Discovery in Immunopeptidomics (2026)
License
MIT © 2026 Frédérique Vilenne, Dirk Valkenborg
Metadata
Release files for eclipse-ms 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eclipse_ms-0.1.2.tar.gz | 51.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eclipse_ms-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 72.2 kB
Release files / eclipse_ms-0.1.2.tar.gz
| Download URL | eclipse_ms-0.1.2.tar.gz |
|---|---|
| Size | 51.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
444f65f59311edf6cd7e6ba79690dbf5e496a1d2205fc1408ab2a7e922d1c574
|
|
BLAKE2b-256 checksum How to use checksums |
c808c90046133f95705f03b30d48d79814bf0e868ab6dafb705702aebdcff540
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency logRelease files / eclipse_ms-0.1.2-py3-none-any.whl
| Download URL | eclipse_ms-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba3ec620697e361137b4b9251ff4fb66709b3764f2044551132ec1bf7eab3848
|
|
BLAKE2b-256 checksum How to use checksums |
7ecd3547bf2e36cd555bff1f8b393b2b0984cfd1bac0dde115a0280436972519
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 19, 2026.
Transparency log