Skip to content

Library for managing, storage, viewing, and working with spatial transcriptomics data using Imglib2, N5, BigDataViewer and Fiji.

License

Notifications You must be signed in to change notification settings

PreibischLab/STIM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STIM - the Spatial Transcriptomics as Images Project

Example rendering of calm-2, ptgds, mbp

The Spatial Transcriptomics as Images Project (STIM) is a framework for storing, (interactively) viewing, aligning, and processing spatial transcriptomics data, which builds on the powerful libraries Imglib2, N5, BigDataViewer and Fiji.

STIM can be installed through Conda and uses AnnData and/or N5 as a storage backend thus allowing easy interaction with existing tools for spatial transcriptomics. It provides efficient access to spatial transcriptomics data "classically" as values, or can render them as images at arbitrary resolution. These image representations allow to apply computer vision techniques to spatially resolved sequencing datasets.

Some highlights are:

  • efficient interactive rendering (using BigDataViewer)
  • rendering high-quality still images (using ImageJ/Fiji)
  • alignment of spatial dataset slides using SIFT, ICP and RANSAC combined with global optimization
  • efficient and fast storage using AnnData and N5 for multi-slice datasets
  • Conda installable, straight-forward interoperability with other packages
  • image filtering framework for irregularly-spaced datasets

A great example dataset is provided by the SlideSeq paper and can be downloaded here.

A minimal example of a two-slice Visium dataset is available here. We provide a detailed walk-through for this dataset in the wiki to get you started. Note: we highly recommend this tutorial as a starting point for using STIM. If you have any questions, feature requests or concerns please open an issue here on GitHub.

Please see the wiki for additional tutorials, detailed installation instructions, and more.

Installation

We recommend using Conda to install STIM. If you don't have Conda installed, please follow the instructions here. Once Conda is installed, you can install STIM from conda-forge by running:

conda install -c conda-forge stim

You can also build STIM from source, see the detailed instructions in the wiki.

Cite STIM

If you use STIM in your research, please cite our publication:

Preibisch, S., Innerberger, M., Leon-Perinan, D., Karaiskos, N., & Rajewsky, N. (2024). Scalable image-based visualization and alignment of spatial transcriptomics datasets. bioRxiv.

Wrapping in Python

The stimwrap package from the Rajewsky lab provides an interface to extract datasets and their attributes from an N5-container created by STIM. The package can be easily installed via pip:

pip install stimwrap

Java code examples

There are example classes in this Java package that can help you to get started with programming in STIM, specifically VisualizeStack.java and TestDisplayModes.java could be useful. Additionally, the code for all command-line tools can be found here, which is also a good starting place in combination with the tutorials. Note that the install scripts install and install_windows.bat show a link between the command-line tool name and Java class name, e.g., st-bdv-view is cmd.DisplayStackedSlides.

About

Library for managing, storage, viewing, and working with spatial transcriptomics data using Imglib2, N5, BigDataViewer and Fiji.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages