MassFlow
English | 简体中文
MassFlow is a modular preprocessing and data management framework for Mass Spectrometry Imaging (MSI) 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/ # Data managers (MSDataManager, MSDataManagerImzML)
│ ├── module/ # Core data models
│ │ ├── spectrum.py # Spectrum base type
│ │ ├── spectrum_imzml.py # ImzML spectrum with lazy loading
│ │ ├── mass_spectrum_set.py # Collection of spectra
│ │ ├── ms_meta_data.py # Metadata structures (ImzMlMetaData, etc.)
│ │ └── ...
│ ├── preprocess/ # Preprocessing pipeline
│ │ ├── api.py # Chainable task registration API (PreprocessorAPI)
│ │ ├── preprocessor.py # Pipeline executor (Preprocessor)
│ │ ├── flat_pre_fun.py # Flat-array preprocessing (FlatPreprocess)
│ │ └── ...
│ ├── r_preprocess/ # R/Cardinal adapter
│ └── 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:
# Close conda first:
conda deactivate
# Install uv:
please follow :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
uv pip install -e .
# Install optional R backend dependencies (requires local R):
uv sync --extra r
#run the code
uv run python main.py
-
Default installation (
uv sync) does not include R/Cardinal backend dependencies. -
If you need Cardinal backend (
backend="cardinal"), install extra dependency grouprand make sure R is installed and available in PATH (or setR_HOME). -
please read Contribution Guide:
docs/en/contribution.mdanddocs/zh/contribution.mdfirst -
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 Book;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
- contributing 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.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 | |
|---|---|---|---|
| massflow-0.1.2.tar.gz | 204.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| massflow-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 413.6 kB
Release files / massflow-0.1.2.tar.gz
| Download URL | massflow-0.1.2.tar.gz |
|---|---|
| Size | 204.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86a6efd2a1c810124bb1cff530c292f51c48ff9d4a993877434cccd002fced93
|
|
BLAKE2b-256 checksum How to use checksums |
c0921f14631776a9b7993bbccce4602fdfbea4a199fe5c78a5ce89bc103c5f6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / massflow-0.1.2-py3-none-any.whl
| Download URL | massflow-0.1.2-py3-none-any.whl |
|---|---|
| Size | 209.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
594a618b35f24a97cd7c73dff64a7a16614dd8ec95eb86353c52135540f2895a
|
|
BLAKE2b-256 checksum How to use checksums |
b2e71587d6bdbdbc99c34629679ef2f56af8927968e32bdb2f0003852144a4ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency log