SMINT is a Python package for Spatial Multi-Omics Integration with enhanced segmentation capabilities and streamlined workflow. It provides a comprehensive toolkit for processing, analyzing, and visualizing spatial multi-omics data.
- Multi-GPU cell segmentation for whole-slide images
- Distributed segmentation using Dask for improved performance
- Live segmentation monitoring with intuitive visualization tools
- Streamlined alignment workflow using ST Align
- Integration with R analysis scripts via rpy2
- Graceful dependency handling for all optional components
- Comprehensive documentation with step-by-step guides
- HPC deployment scripts for SLURM-based clusters
Comprehensive documentation is available at https://jurgenkriel.github.io/SMINT/
pip install smintSMINT is designed with graceful dependency handling to ensure robust operation across different environments.
# Full installation with all dependencies
pip install "smint[all]"
# Install specific feature sets
pip install "smint[segmentation]" # For segmentation functionality
pip install "smint[visualization]" # For visualization functionality
pip install "smint[r_integration]" # For R integrationFor more information, see the Dependency Handling Documentation.
This project is linked to the GitHub repository at https://github.com/JurgenKriel/SMINT.
To contribute changes to the GitHub repository:
-
Clone the repository:
git clone https://github.com/JurgenKriel/SMINT.git cd SMINT -
Make your changes and test them locally.
-
Push changes to GitHub:
git add . git commit -m "Description of changes" git push origin main
Documentation is automatically deployed to GitHub Pages using GitHub Actions. The workflow file is located at .github/workflows/deploy-docs.yml.
When you push changes to the main branch, the documentation will be automatically built and deployed to https://jurgenkriel.github.io/SMINT/.
To build documentation locally for testing:
pip install mkdocs mkdocs-material pymdown-extensions mkdocstrings
mkdocs serveimport smint
from smint.segmentation import process_large_image
# Run cell segmentation on a whole-slide image
process_large_image(
image_path="path/to/whole_slide_image.ome.tiff",
csv_base_path="path/to/output_directory",
cell_model_path="cyto", # Use pre-trained Cellpose model
cells_diameter=120.0,
cells_channels=[1, 2], # Green and Blue channels for cells
nuclei_model_path="nuclei", # Use pre-trained nuclei model
nuclei_diameter=60.0,
nuclei_channels=[2, 1], # Blue and Green channels for nuclei
visualize=True # Generate visualization images
)from smint.visualization import visualize_segmentation_results
# Create interactive visualization of segmentation results
visualize_segmentation_results(
image_path="path/to/whole_slide_image.ome.tiff",
segmentation_csv="path/to/segmentation_results.csv",
output_html="path/to/output/visualization.html",
thumbnail_size=(800, 800)
)from smint.r_integration import run_spatialomics_analysis
# Run spatial statistics analysis using R
run_spatialomics_analysis(
segmentation_data="path/to/segmentation_results.csv",
expression_data="path/to/gene_expression.csv",
output_directory="path/to/output",
spatial_methods=["Ripley", "Morans"]
)See stitching script under stitching/stitching.Rmd
See alignment of polygons and transcripts under See transcript assignment script under assignment/transcript_assignment.R
pip install --upgrade "git+https://github.com/JEFworks-Lab/STalign.git"
See alignment script under alignment/ST_align_xenium.py
See metabolite assignment script under integration/metabolomics_integration.R
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
e9fadf4d662d283dafd59ae756781bbe1e40863c
