MassFlow
English | 简体中文
MassFlow is a modular preprocessing and data management framework for Mass Spectrometry Imaging (MSI) and Mass Spectrometry (MS) data.
Get the code
# Clone the repository
git clone https://github.com/NeoNexusX/MassFlow.git
cd MassFlow
Online Documentation
Online Documentation: https://neonexusx.github.io/MassFlow/
Project Structure
MassFlow/
├── .github/ # GitHub configuration (Issue templates, Workflows)
├── .vscode/ # VSCode configuration
├── data/ # Example data
├── docs/ # Documentation (VitePress)
│ ├── en/
│ └── zh/
├── logs/ # Runtime logs
├── src/
│ └── massflow/ # Core source code
│ ├── data_manager/ # imzML / spectra Zarr and Binary / H5 / Zarr ion-image managers
│ ├── module/ # Core data models
│ │ ├── spectrum.py # Spectrum base type
│ │ ├── spectrum_imzml.py # ImzML spectrum with lazy loading (SpectrumImzML)
│ │ ├── mass_spectrum_set.py # Collection of spectra (MassSpectrumSet)
│ │ ├── ms_meta_data.py # Shared metadata (MetaDataBase)
│ │ └── ...
│ ├── preprocess/ # Preprocessing entry points and helper functions
│ │ ├── api.py # Chainable task registration API (PreprocessorAPI)
│ │ ├── preprocessor.py # Pipeline executor (Preprocessor)
│ │ ├── flat_pre_fun.py # Batch processing utilities (FlatPreprocess)
│ │ └── ...
│ ├── r_preprocess/ # R/Cardinal adapter
│ ├── msi_zarr/ # MSI Zarr schema, reader, and writer
│ └── tools/ # Utility functions
├── tests/ # Test cases
├── LICENSE
├── main.py
├── package.json
├── pyproject.toml # Project configuration and dependencies
└── README.md
Development & Contribution
Quick Dev Start
It is recommended to run the following code (main.py) directly to verify data loading:
# First, close conda:
conda deactivate
# Install uv:
# Please refer to: https://docs.astral.sh/uv/getting-started/installation/
# For example:
# Linux && macOS:
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Install dependencies:
uv sync
# Install optional R backend dependencies (requires local R):
uv sync --extra r
# Run the code
uv run python main.py
-
uv syncinstalls the project itself by default, in editable mode (equivalent topip install -e .); use--no-editableto disable editable installation. -
The default installation (
uv sync) does not include R/Cardinal backend dependencies. -
Development dependencies are declared in the
dependency-groups.devsection ofpyproject.toml; install them withuv sync --group dev. -
To use the Cardinal backend (
backend="cardinal"), install theroptional dependency and make sure R can be found on the system (onPATH, or viaR_HOME). -
Please read the Contribution Guide first:
docs/en/contribution.mdanddocs/zh/contribution.md -
Naming Conventions:
docs/en/naming-conventions.mdanddocs/zh/naming-conventions.md -
Commit Convention: Conventional Commits (e.g.,
feat:,fix:,docs:,refactor:,test:) -
Recommended Extensions: Python, Pylance, Pylint, H5Web
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
References
- MATLAB Mass Spectrometry Preprocessing: https://www.mathworks.com/help/bioinfo/ug/preprocessing-raw-mass-spectrometry-data.html
- Cardinal MSI: https://cardinalmsi.org/
- Cardinal Guide: https://bioconductor.org/packages/devel/bioc/vignettes/Cardinal/inst/doc/Cardinal3-guide.html
- Cardinal Github: https://github.com/kuwisdelu/Cardinal
- Matter Github: https://github.com/kuwisdelu/matter
- PyOpenMS: https://pyopenms.readthedocs.io/
- Github: https://github.com/OpenMS/OpenMS
- Docs: https://github.com/OpenMS/OpenMS-docs
- Contributed libraries: https://github.com/OpenMS/contrib
- Flash APP: https://github.com/OpenMS/FLASHApp
Feedback
For support or to report issues, please open an issue on the GitHub repository.
Metadata
Release files for massflow 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| massflow-0.1.3.tar.gz | 243.4 kB | With provenance | Details for massflow-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| massflow-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for massflow-0.1.3-py3-none-any.whl |
Total release size: 475.8 kB
Release files / massflow-0.1.3.tar.gz
| Download URL | massflow-0.1.3.tar.gz |
|---|---|
| Size | 243.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9a59f3cabdd44909bbe494adbcd16083f552e295b20243b46e2a950e1a9a0cf
|
|
BLAKE2b-256 checksum How to use checksums |
31695971c188163dcd39cf2b37a8e5052903ae1918a3a3e3765711081ea40d6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logRelease files / massflow-0.1.3-py3-none-any.whl
| Download URL | massflow-0.1.3-py3-none-any.whl |
|---|---|
| Size | 232.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3804345e247ea85d119f31871d976bac6f608d517376ddc8e959d5c99bf31db7
|
|
BLAKE2b-256 checksum How to use checksums |
a7298e0726caed445b48a43a6d204e93bfd4f47047d0736f240b953b25a51b3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 30, 2026.
Transparency logSecurity for massflow 0.1.3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for massflow-0.1.3.tar.gz
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 Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.