Skip to main content

Moran_Imaging

License PyPI Python Version CI codecov

The Moran Imaging Python package was developed for the spatio-molecular analysis of multiplexed molecular imaging data, such as imaging mass spectrometry (IMS) data. It provides the statistical tools to identify, visualize, and quantify spatial patterns in molecular imaging data, such as Moran's I and the Moran quadrant map. It also provides user-friendly implementations of a novel tissue domain segmentation workflow, called Moran-Felsenszwalb segmentation, and of a novel colocalization-based image clustering workflow, called Moran-HOG clustering.

Installation

You can install Moran Imaging, with its mandatory dependencies, from PyPI. Our package supports Python version 3.8 and above.

pip install Moran_Imaging[demo]

Data download

Download the following three datasets from Zenodo: Demo_rat_brain_data.pickle, which is a subset of 100 ion images of IMS dataset no1, Zebra_fish_8_clusters_dataset.pickle, which is a subset of 174 ion images of IMS dataset no2, and Zebra_fish_UMAP_dataset.pickle, which is a UMAP embedding of IMS dataset no2. Dataset no1 is obtained from the coronal section of a Parkinson’s disease rat model. Dataset no2 is obtained from a whole-body adult male zebrafish section.

Zenodo link: https://zenodo.org/records/17399931

Tutorials

The paper corresponding to the Moran Imaging Python package is "Spatial Dependence and Heterogeneity in Molecular Imaging: Moran Quadrant Maps Enable Advanced Spatial-Statistical Analysis" by Léonore Tideman, Felipe Moser, Lukasz Migas, Jacquelyn Spathies, Katerina Djambazova, Cody Marshall, Matthew Schrag, Eric Skaar, Jeffrey Spraggins, Raf Van de Plas (2025). Download the tutorial notebooks from GitHub, open the JupyterLab interactive development environment, and run the following notebooks to reproduce our results.

Run the following notebook to reproduce Figures 1 and 2 of the main manuscipt, and Figures 9 and 10 of the supplementary material. We demonstrate how to quantify spatial dependence and spatial heterogeneity, and how to compute the Moran quadrant map of an image. Please note that automatic parallelization with the numba @jit decorator is only available on 64-bit platforms.

    jupyter lab Exploratory_spatial_data_analysis.ipynb 

Run the following notebook to reproduce Figure 4 of the main manuscript, and Figures 11 and 12 of the supplementary material. We propose a computationally efficient parallelized implementation of the Moran-Felsenszwalb segmentation workflow.

    jupyter lab Moran_Felsenszwalb_segmentation.ipynb
    jupyter lab Fast_Moran_Felsenszwalb_segmentation.ipynb

Run the following notebooks to reproduce the results of Table 1 of the main manuscript. Run the notebook about Moran-HOG clustering to reproduce Figures 14 to 21 of the supplementary material. We recommend running the DeepION and NRDC deep clustering workflows on a GPU.

    jupyter lab Moran_HOG_clustering.ipynb
    jupyter lab DeepION_clustering.ipynb
    jupyter lab NRDC_clustering.ipynb

Citation

If you reuse our code, please cite our work provide link to preprint.

Metadata

Release files for Moran-Imaging 0.1.2

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

Source distribution (sdist)

Source distribution for Moran-Imaging 0.1.2
File Size Uploaded
moran_imaging-0.1.2.tar.gz 14.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for Moran-Imaging 0.1.2
File Interpreter ABI Platform
moran_imaging-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 MB

Release files / moran_imaging-0.1.2.tar.gz

Download URL moran_imaging-0.1.2.tar.gz
Size 14.8 MB
Tags Source
SHA-256 checksum
How to use checksums
b18b62b59e88876f78288d96ba5ea8ab680d4c25d96faf076fd03be757e6146c
BLAKE2b-256 checksum
How to use checksums
a6d15068df7548085d139327539a9b3d5abde47f57ff857247896c0ba247f2e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / moran_imaging-0.1.2-py3-none-any.whl

Download URL moran_imaging-0.1.2-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb6ad0ff7b3d84c692fa977c7f6225872b0c7de57da4eff549a8cb00239c43b1
BLAKE2b-256 checksum
How to use checksums
55dc663ee2b044296f9d1500bc043510e09207b409e978fa1bec7c0247148fa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

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