Skip to main content

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 group r and make sure R is installed and available in PATH (or set R_HOME).

  • please read Contribution Guide: docs/en/contribution.md and docs/zh/contribution.md first

  • Naming Conventions: docs/en/naming-conventions.md and docs/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

Feedback

For support or to report issues, please open an issue on the GitHub repository.

Metadata

Release files for massflow 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for massflow 0.1.1
File Size Uploaded
massflow-0.1.1.tar.gz 199.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for massflow 0.1.1
File Interpreter ABI Platform
massflow-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 405.3 kB

Release files / massflow-0.1.1.tar.gz

Download URL massflow-0.1.1.tar.gz
Size 199.9 kB
Tags Source
SHA-256 checksum
How to use checksums
87478883075521c610d08bb1537cad5b1a9370ac55ba20f04a1943d8d48a0a54
BLAKE2b-256 checksum
How to use checksums
08f0e75abcd11182dca25caabee513bacd64ccfb8387998c5cdd8de3c6d768d9
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 3, 2026.

Transparency log

Release files / massflow-0.1.1-py3-none-any.whl

Download URL massflow-0.1.1-py3-none-any.whl
Size 205.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfaeea136525bc3b8978deeaa623ca09a6a0556ccc5a935d624b58f8c71dd131
BLAKE2b-256 checksum
How to use checksums
a01bbc2f13b0036497cf7608bf29447452fb0c55eccf2f67c1a0c73284054898
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 3, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page