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

SpatialQuery method overview

Key Applications

Single-dataset Analysis

Motif Enrichment Analysis

Identify frequent cell-type co-occurrence patterns (motifs) using FP-Growth algorithm and evaluate their spatial enrichment via KNN or distance-based neighborhoods.

Single-dataset: Motif Enrichment Analysis
Differential Expression Analysis

Detect genes differentially expressed within spatial motifs.

Single-dataset: Differential Expression Analysis
Gene-Gene Covariation Analysis

Quantify gene-gene covariation patterns associated with specific motifs.

Single-dataset: Gene-Gene Covariation Analysis

Multi-dataset Analysis

Motif Enrichment Analysis

Perform motif enrichment analysis across multiple FOVs or tissue samples simultaneously.

Multi-dataset: Motif Enrichment Analysis
Differential Motif Analysis

Compare motif frequencies across conditions to identify differentially enriched spatial patterns between groups.

Multi-dataset: Differential Motif Analysis
Differential Expression Analysis

Detect differentially expressed genes within spatial motifs across multiple datasets.

Multi-dataset: Differential Expression Analysis
Gene-Gene Covariation Analysis

Quantify gene-gene covariation patterns across multiple datasets.

Multi-dataset: Gene-Gene Covariation Analysis

Getting Started

Installation

How to install SpatialQuery.

Installation
Tutorials

Step-by-step guides for single and multi-FOV analysis.

Tutorials
API Reference

Full API documentation for all modules.

API

Reference

If you use SpatialQuery in your research, please cite: