Segmentation and Manifold Unrolling Framework (SMURF)
Welcome to the SMURF repository!
SMURF (Segmentation and Manifold Unrolling Framework) is a framework for high-resolution spatial transcriptomics that supports both soft segmentation / transcript assignment and tissue unrolling / flattening. In Visium HD examples, SMURF uses high-resolution histology images for nuclei segmentation and assigns transcripts from each capture spot to nearby cells, enabling reconstruction of a cell-by-gene AnnData object. SMURF can also map complex tissue architectures into Cartesian coordinates for downstream spatial analysis. See the tutorial and preprint for further details.
Contents
Installation
We recommend creating a fresh Conda environment before installing SMURF.
Create a Conda environment
conda create -n smurf python=3.10
conda activate smurf
Choose between SMURF-lite and SMURF-full
SMURF supports two operating modes for transcript assignment in shared spots.
SMURF-lite
Install with:
pip install pysmurf
SMURF-lite is the non-deep-learning mode. In the shared-spot transcript-assignment step, it uses a spatial-distance-weighted multinomial strategy and can be run on a standard workstation. Use this mode when a GPU is not available.
SMURF-full
Install with:
pip install "pysmurf[full]"
SMURF-full uses the same overall workflow as SMURF-lite, but adds a deep-learning refinement for shared spots involving cells of the same type. A GPU is strongly recommended for practical runtimes.
Developer install
Lite:
pip install "pysmurf @ git+https://github.com/The-Mitra-Lab/SMURF.git"
Full:
pip install "pysmurf[full] @ git+https://github.com/The-Mitra-Lab/SMURF.git"
Computational resources
Runtime and storage requirements depend on dataset size and analysis settings. On our benchmark workstation (Ubuntu 20.04.6 LTS; Intel Core i9-10920X CPU, 251 GiB RAM, NVIDIA GeForce RTX 3090 GPU), the mouse brain dataset required 1.69 h with SMURF-lite and 2.92 h with SMURF-full. Storage requirements depend on the size of the 2 μm outputs, associated histology images, and whether high-resolution visualizations and intermediate files are retained. In our experience, a typical mouse brain analysis can be run with approximately 25 GB of available storage, whereas larger datasets or analyses that retain intermediate files and high-resolution outputs may require on the order of 100 GB.
Tutorials
The main tutorials are available on the documentation site:
These tutorials illustrate the core segmentation and unrolling workflows used in the manuscript.
Citation
Please cite SMURF as follows:
@article{guo2025smurf,
title={SMURF: soft-segmentation for single-cell reconstruction and topological analysis of spatial transcriptomic data},
author={Guo, Juanru and Sarafinovska, Simona and Hagenson, Ryan A and Valentine, Mark C and Chen, David Y and McCoy, William H and Dougherty, Joseph D and Mitra, Robi D and Muegge, Brian D},
journal={bioRxiv},
year={2025}
}
Metadata
Release files for pysmurf 3.0.1
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 |
|---|---|---|---|---|
| pysmurf-3.0.1.tar.gz | 44.0 kB | Without provenance | Details for pysmurf-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysmurf-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for pysmurf-3.0.1-py3-none-any.whl |
Total release size: 90.4 kB
Release files / pysmurf-3.0.1.tar.gz
| Download URL | pysmurf-3.0.1.tar.gz |
|---|---|
| Size | 44.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e05ebb487ecfbf5b81964dc03d64bb1de67d174e1f14a59fb0815e3e5a2c1d4
|
|
BLAKE2b-256 checksum How to use checksums |
4e942a68b10be36febe5282a6f0aad554f2895481bdfdd27ad4cb0dd432682aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.6
|
Release files / pysmurf-3.0.1-py3-none-any.whl
| Download URL | pysmurf-3.0.1-py3-none-any.whl |
|---|---|
| Size | 46.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
170c5ae1e946416e87367741e0d55b185c25fbd26f4a253839ce89abd1c3810e
|
|
BLAKE2b-256 checksum How to use checksums |
c6f127c270662741496c08270498696d5499419b67be095a02b969bfa8a9687d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.6
|
Security for pysmurf 3.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.