SpatialQuery
SpatialQuery is a Python package for spatial query and analysis of spatial transcriptomics data. It provides efficient methods to identify cell-type spatial co-occurrence patterns (motifs), perform motif enrichment analysis, and conduct motif-associated molecular analysis within spatial neighborhoods.
Method Overview
Key Applications
Single-dataset Analysis
Identify frequent cell-type co-occurrence patterns (motifs) using FP-Growth algorithm and evaluate their spatial enrichment via KNN or distance-based neighborhoods.
Detect genes differentially expressed within spatial motifs.
Quantify gene-gene covariation patterns associated with specific motifs.
Multi-dataset Analysis
Perform motif enrichment analysis across multiple FOVs or tissue samples simultaneously.
Compare motif frequencies across conditions to identify differentially enriched spatial patterns between groups.
Detect differentially expressed genes within spatial motifs across multiple datasets.
Quantify gene-gene covariation patterns across multiple datasets.
Getting Started
How to install SpatialQuery.
Step-by-step guides for single and multi-FOV analysis.
Full API documentation for all modules.
Reference
If you use SpatialQuery in your research, please cite:
An, S. et al. SpatialQuery: scalable discovery and molecular characterization of multicellular motifs from spatial omics data. bioRxiv (2026).