Metadata-Version: 2.4
Name: SpatialZoomer
Version: 1.1.0
Summary: Multi-scale feature analysis of spatial transcriptomics
Author-email: Xinqi Li <lxq19@tsinghua.org.cn>, Yuhan Fan <fyh22@mails.tsinghua.edu.cn>
License: MIT License
        
        Copyright (c) 2025 Xinqi Li
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: scanpy
Requires-Dist: squidpy
Requires-Dist: seaborn
Requires-Dist: scipy
Requires-Dist: kneed
Requires-Dist: pandas
Requires-Dist: scikit-learn
Requires-Dist: pygsp
Requires-Dist: python-igraph
Requires-Dist: leidenalg
Requires-Dist: ipykernel
Dynamic: license-file

# SpatialZoomer: multi-scale feature analysis of spatial transcriptomics

The Python implementation of **SpatialZoomer**, a toolkit for **multi-scale spatial feature analysis** of single-cell resolved spatial transcriptomics via spectral graph signal processing. It scales to millions of cells with high computational efficiency and low hardware requirements.

Explore SpatialZoomer's multi-scale results by sliding the scale axis across four datasets on our interactive demo site:

👉 [**Demo Website**](https://li-xinqi.github.io/SpatialZoomer/)

👉 [**Github Website**](https://github.com/Li-Xinqi/SpatialZoomer.git)


## Introduction
SpatialZoomer is a novel computational method that enables the multi-scale feature analysis of single-cell resolved spatial transcriptomics like a zoom-capable microscope. By modeling gene expression as signals on spatial neighbor graph and applying spectral graph signal processing, the method efficiently extracts spatial features across multiple scales and reveals biologically meaningful structures. It can automatically identify “critical” scales by partitioning the cross-scale similarity map via dynamic programming. 


### Functions

- **Zoom-capable analysis across spatial scales**  
   SpatialZoomer enables the detection of spatial structures from **cells**, **niches**, to **domains** across multiple scales. It can cpature biologically meaningful signals at specific scales, such as those related to disease progression in perturbation or longitudinal scenarios.

- **Identification of spatially dependent subtypes**  
   As the spatial scale increases, SpatialZoomer progressively integrates spatial context from larger neighborhoods into each cell’s transcriptomic profile, potentially enabling cells from a single cluster at scale 0 to separate into spatially dependent subclusters at larger scales. These spatial contexts can amplify transcriptomic heterogeneity between biologically distinct subtypes.

- **Uncovering complex tissue architecture**  
   The extracted multi-scale features can be used to dissect the complex spatial organization.

### Advantages
- High computational efficiency with relatively low memory requirements (No GPU required).
- Fast runtime, even for large-scale datasets.
- Scalable to >1 million cells on desktops.

## System Requirements
SpatialZoomer requires only a standard computer with sufficient RAM for in-memory operations and runs without the need for a GPU. It is lightweight and can be executed on **laptops, desktops, or servers**.

## Cite
Xinqi Li#, Yuhan Fan#, Yue Han, Wenbo Guo, Jingmin Huang, Nan Yan, Zeyu Chen, Yanhong Wu, Yuxin Miao, Lin Hou, Xuegong Zhang, Zeyu Chen, Jin Gu*. SpatialZoomer: multi-scale feature analysis of spatial transcriptomics. bioRxiv (2025).
