SCOUBI
SCOUBI is a computational framework for analyzing extrasomatic transcripts in imaging-based spatial transcriptomics data. Rather than discarding unassigned RNA as background, SCOUBI uses marker-gene expression of neurites and spatial ligand–receptor colocalization to classify extrasomatic regions as axon- or dendrite-enriched and to identify putative “interfaces” enriched for intercellular signaling programs. These interfaces provide a transcriptomic window into neuronal communication sites that are typically inaccessible to cell-centric spatial analyses. SCOUBI enables regional and molecular characterization of putative synaptic signaling environments directly from intact tissue.
Preprint: Coming soon.
Overview
Imaging-based spatial transcriptomics often detects a substantial fraction of transcripts outside segmented cell bodies. SCOUBI treats this extrasomatic signal as a biologically informative layer of tissue organization.
The workflow has two main stages:
-
Neurite identity classification
Extrasomatic spatial bins are classified as axon- or dendrite-enriched using curated marker genes and a signaling-informed optimization objective. -
Interface identification
SCOUBI scans for local regions where axonic and dendritic bins converge and where significant ligand–receptor pairs are colocalized.
The resulting interface map can be used to study:
- Spatial distribution of putative neuronal communication regions
- Neurite-enriched genes
- Interface-enriched genes
- Regional variation in interface transcriptomes
- Interface signatures compared with nearby cell bodies
Installation
pip install scoubi
For local development from a checkout:
pip install -e .
Quickstart
import torch
import scoubi
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
adata = scoubi.io.load_data(
"data/data.parquet",
cell_type="data/cell_types.csv",
region="data/regions.csv",
)
adata = scoubi.pp.bin_data(adata, binsize=2)
adata = scoubi.md.train(adata, axon_markers, dendrite_markers, device=device)
adata = scoubi.tl.overview(adata, device=device)
adata = scoubi.tl.axon_dendrite_enrichment(adata)
adata = scoubi.tl.distance(adata)
adata = scoubi.tl.expression_profile(adata, key="region")
adata = scoubi.tl.communication_profile(adata, key="region")
adata.summarize()
Module Map
| Module | Alias | Purpose |
|---|---|---|
scoubi.io |
- | Data loading and AnnData helpers |
scoubi.preprocess |
scoubi.pp |
Preprocessing (Spatial binning) |
scoubi.model |
scoubi.md |
Neurite annotation |
scoubi.tools |
scoubi.tl |
Downstream analysis utilities |
scoubi.plotting |
scoubi.pl |
Visualization helpers |
Data and Runtime Notes
scoubi.pp.bin_data()stores binned expression as a sparse flattened bin-by-gene matrix inadata.uns["binned_data"]and stores the equivalent 3-D sparse tensor as AnnData-safe COO components inadata.uns["binned_data_3d"].scoubi.md.train()can use a bundled ligand-receptor reference table (from NeuronChat) whenpairs=None.- GPU acceleration is optional; most workflows can run on CPU, although training and convolution-heavy steps are faster on CUDA when available.
- Downstream all-gene summaries use sparse reductions over the binned matrix
where possible, avoiding full dense
(x, y, genes)materialization.
Tutorial
The guided walkthrough lives in tutorial.ipynb. It covers data loading, model training, spatial overview generation, enrichment analysis, interface profiling, communication analysis, and save/load workflows.
Citation
@article{aggarwal2026revealing,
title={Revealing the transcriptomic organization of extrasomatic interfaces using SCOUBI},
author={Aggarwal, Bhavay and Jain, Saumya and Sinha, Saurabh},
journal={bioRxiv},
pages={2026--11},
year={2026},
publisher={Cold Spring Harbor Laboratory}
}
Metadata
Release files for scoubi 2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scoubi-2.0.tar.gz | 51.6 kB | With provenance | Details for scoubi-2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scoubi-2.0-py3-none-any.whl | Python 3 | none | any | Details for scoubi-2.0-py3-none-any.whl |
Total release size: 106.4 kB
Release files / scoubi-2.0.tar.gz
| Download URL | scoubi-2.0.tar.gz |
|---|---|
| Size | 51.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e94571b310a099ab42e9668d2d21ca2604401826d2b44eb79e2856d44570474
|
|
BLAKE2b-256 checksum How to use checksums |
5bbfbf5634526e149ce53bb96d54bde966e22e9debe71d59c11f4b7155ab86c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / scoubi-2.0-py3-none-any.whl
| Download URL | scoubi-2.0-py3-none-any.whl |
|---|---|
| Size | 54.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5cc5445dc86da99280e710b27009de2fe746abd93e2e172a5a90783edfd03aa
|
|
BLAKE2b-256 checksum How to use checksums |
a880caa11e808ef6b837d53569a4af3ec279df528200529b93795ba349a80ddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for scoubi 2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for scoubi-2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.