Overview
Image-based spatial transcriptomics resolves the positions of individual transcripts at sub-cellular scale. However, the (often incorrect) assignment of these transcripts to cells by segmentation presents perennial issues in downstream analysis. Another of our lab's tools, SpatialRNA, effectively distills spatial signal at transcript resolution to produce a latent embedding space encoding the local molecular neigbhourhood of each transcript. Here, you will find DuetiST, a tool designed to take the outputs of SpatialRNA and derive two layers of spatial features - fine-grained niches, and coarser, contiguous domains. DuetiST achieves this through a hierarchical Bayesian model. The tool first collapses transcripts into a grid, then uses grid embedding averages and density weights to seed a large number of niches. The local neighbourhood composition of each grid point is then used to seed a smaller number of domains, which are modelled with a Potts-prior Hidden Markov Random Field. The model iterates to learn niches from their overlying domains, and domains from their underlying niches, as well as tuning the smoothing of the Potts model. At predetermined intervals, domains are also merged based on compositional similarity. Finally, an Iterated Conditional Modes step refines each point's identity at both layers of scale. DuetiST is inherently designed for the analysis of many samples at once: smoothing can be run in parallel per-sample, and the model itself learns both shared and unique features across samples.
Installation
DuetiST requires Python 3.11 or newer and is available from PyPI:
pip install duetist
Some features need optional dependencies, installed as extras:
| Extra | Adds | Needed for |
|---|---|---|
hdbscan |
hdbscan |
init="hdbscan" seeding |
plot |
matplotlib |
the duetist.plotting module and duetist plot |
zarr |
zarr |
reading zarr embedding stores (such as SpatialRNA's output) |
all |
all of the above |
pip install "duetist[all]"
To install the development version, with the test and lint tools:
git clone https://gitlab.svi.edu.au/biocellgen-public/duetist.git
cd duetist
pip install -e ".[dev]"
pytest
Check the install with duetist --version.
Examples
Coming soon...
Project status
DuetiST is still in active development! Expect relatively frequent updates as I further refine the model and backend of the tool.
Metadata
Release files for duetist 0.1.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 |
|---|---|---|---|---|
| duetist-0.1.0.tar.gz | 27.6 kB | Without provenance | Details for duetist-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| duetist-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for duetist-0.1.0-py3-none-any.whl |
Total release size: 57.6 kB
Release files / duetist-0.1.0.tar.gz
| Download URL | duetist-0.1.0.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77b6aa6d307c41aaa8b8490e0bb8cf6f8049cd7b999136501bc3567503acb789
|
|
BLAKE2b-256 checksum How to use checksums |
64bfe04cf1b24cc2b7c72e7c9362e0dbf4ee6c8bb18bc9fb2ec6e97d1b730bae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / duetist-0.1.0-py3-none-any.whl
| Download URL | duetist-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
627c42c11e59634261cbbcd74eeab80868ca8c3654d87cf05496657ad4b3cdf3
|
|
BLAKE2b-256 checksum How to use checksums |
1e3ded29d896edf383838574b814b842d6923c0fe5c5f1761bf8734ca4f50b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for duetist 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.