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.0
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.0.tar.gz | 200.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| massflow-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 405.4 kB
Release files / massflow-0.1.0.tar.gz
| Download URL | massflow-0.1.0.tar.gz |
|---|---|
| Size | 200.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e903e52aa736f17636f47dc72d59a1a1f36ce87f07c5f5ff8948f6bc5aa715d
|
|
BLAKE2b-256 checksum How to use checksums |
07c41bbbb138622ec31b148cb35a01b27481e77207542a22f34661db89899505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / massflow-0.1.0-py3-none-any.whl
| Download URL | massflow-0.1.0-py3-none-any.whl |
|---|---|
| Size | 205.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33bfb61b5f6919d14700d62d80dfd7418dd572266ae7a2ecc2445cee07949106
|
|
BLAKE2b-256 checksum How to use checksums |
ee168ae2ce94e6c2f80b711d79a5de375943707fd3ada655a685e8aee58ecc7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|