Skip to main content

Segmentation and Manifold UnRolling Framework (SMURF)

Project description

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}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysmurf-3.0.1.tar.gz (44.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysmurf-3.0.1-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file pysmurf-3.0.1.tar.gz.

File metadata

  • Download URL: pysmurf-3.0.1.tar.gz
  • Upload date:
  • Size: 44.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for pysmurf-3.0.1.tar.gz
Algorithm Hash digest
SHA256 3e05ebb487ecfbf5b81964dc03d64bb1de67d174e1f14a59fb0815e3e5a2c1d4
MD5 706c454ae77c16b3cb81e041af5759fd
BLAKE2b-256 4e942a68b10be36febe5282a6f0aad554f2895481bdfdd27ad4cb0dd432682aa

See more details on using hashes here.

File details

Details for the file pysmurf-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: pysmurf-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for pysmurf-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 170c5ae1e946416e87367741e0d55b185c25fbd26f4a253839ce89abd1c3810e
MD5 a7af0f666b1a27854d33ae2af999ce99
BLAKE2b-256 c6f127c270662741496c08270498696d5499419b67be095a02b969bfa8a9687d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page