SPACKLE: A spatial-first framework for multi-layer spatial transcriptomic analysis
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Background
The emergence of accessible spatial transcriptomic platforms such as 10x Genomics Visium HD and Xenium has created demand for analysis tools that can handle the complexity and scale of spatial datasets. Current frameworks approach spatial data primarily as an extension of single-cell RNA-seq pipelines, where spatial coordinates are retained as metadata rather than treated as a first-class organizing principle. As a result, common tasks such as multi-modal data alignment, region-of-interest selection, and cross-resolution visualization require manually managing disparate data types, coordinates, and scales, making spatial analysis unnecessarily time-consuming and error-prone.
Results
We present SPACKLE (Spatial Platform for Analysis of Composite stacKs and Layered data Extraction), a Python-based “spatial-first” framework that treats absolute physical micron coordinates as the organizing principle for all data types. All data – morphology images, transcript point clouds, expression matrices, segmented cells, and user-defined regions – are stored as typed objects (“Channels”) that carry their own spatial metadata, keeping all layers in automatic registration regardless of platform, resolution, or analysis operation. Two complementary interfaces simplify access to underlying data: the ViewPort , a compositing engine for efficient multi-channel visualization, and the DataPort , which extracts raw data in its native format for downstream analysis. A set of spatial analysis tools demonstrates the practical benefits of the framework, including ROI-based expression binning, cortical unfolding, and sub-micron fine alignment of transcript and image data. The use of modern Python data management methods helps maintain the efficiency of the framework, allowing for quick visualizations and analysis with a low memory footprint.
Conclusions
SPACKLE is designed to complement rather than replace widely used tools in the spatial analysis ecosystem (Scanpy, Squidpy, CellPose, StarDist), by handling the spatial mechanics of large datasets so that the analyst can focus on the biology. SPACKLE is freely available under the MIT license at https://github.com/maynardt/spackle .