STARIT (Spatial Transcriptomics As Rasterized Image Tensors) is an open-source Python package that turns im-SRT data point coordinates into rasterized image tensors. This is the STARIT Python documentation
website. Questions, suggestions, or problems should be submitted as
GitHub issues.
Imaging-based spatially resolved transcriptomics (im-SRT) provide high-throughput molecular-resolution spatial characterization of genes within cells. Conventional analysis methods to identify cell-types and states in im-SRT data rely on gene count matrices derived from tallying the number of mRNA molecules detected for each gene per segmented cell, thereby overlooking subcellular heterogeneity that can be useful in defining cell states.
To take advantage of the molecular-resolution information in im-SRT data and potentially identify cell-states based on subcellular heterogeneity, we developed STARIT (Spatial Transcriptomics As Rasterized Image Tensors). STARIT converts transcripts within segmented cells in im-SRT data into an image-based tensor representation that can be combined with deep learning computer vision models for downstream analysis. Using simulated data, we demonstrate that STARIT distinguishes expected transcriptionally distinct cell types and further separates cell states based on subcellular transcript localization, which conventional gene count analysis fails to capture. Likewise, using real im-SRT data, we demonstrate how STARIT can offer comparable results to conventional gene count analysis as well as delineate rotational variation not captured by conventional gene count analysis. By providing a standardized framework to represent subcellular molecular information in im-SRT data, coupled with future technological advancements, STARIT will enable deeper insights into subcellular heterogeneity and enhance the identification and characterization of cell types and states that are overlooked by gene count representations.
This package requires Python 3.11 or later.
To ensure compatibility, you must have a version that satisfies the python_requires setting in pyproject.toml.
From GitHub (main branch)
pip install "git+https://github.com/JEFworks-Lab/STARIT.git#egg=starit"
- Clean old build junk (if applicable)
pip install "git+https://github.com/JEFworks-Lab/STARIT.git#egg=starit"
- Fresh virtual environment (venv)
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
- Editable install
pip install -e .
- Build the wheel/sdist
pip install -U build twine
python -m build
twine check dist/*- Try the built wheel in a clean env
deactivate
python -m venv .venv-clean
source .venv-clean/bin/activate
python -m pip install -U pip
pip install dist/starit-*.whlgit clone git@github.com:JEFworks-Lab/STARIT.git
cd STARIT
conda create --name starit python=3.11
pip install -e .Should be able to import and use STARIT like so:
from starit import starit- [Running STARIT on Simulated Dataset]
- [Running STARIT on Simulated Dataset with Noise]
Our paper describing STARIT will be available in bioRxiv soon.
