DenSR
DenSR provides density-aware spatial randomization using KDE-weighted sampling within a 3D cell mesh, plus object-based colocalization analysis for observed RNA spot coordinates, UniSR, and DenSR.
Cite this package
Kannan, S., Voelker, T. L., Snyder, B. S., & Robertson, G. A. (2026). Density-Aware Spatial Randomization (DenSR) generates realistic null models for object-based colocalization analysis. Molecular Biology of the Cell, 37(6), mr6.
Install
pip install densr
Usage
from densr import densr
spots1 = "path/to/folder/C1_1a_xyz.txt"
spots2 = "path/to/folder/C1_1b_xyz.txt"
object = "path/to/folder/C1_volume.obj"
colocalization_threshold = 1
densr(
spots1=spots1,
spots2=spots2,
object=object,
colocalization_threshold=colocalization_threshold,
)
The RNA spot files are read as tab-separated text files, and the first three columns are used as x, y, and z coordinates.
The densr(...) call displays the results table and spot plot automatically.
Built-in sample data
from densr import densr, sample_data
sample = sample_data()
densr(
spots1=sample.spots1,
spots2=sample.spots2,
object=sample.object,
colocalization_threshold=0.25,
)
Command line
densr C1_volume.obj C1_1a_xyz.txt C1_1b_xyz.txt --colocalization-threshold 1
Functions
densr(spots1, spots2, object, colocalization_threshold=1): one-line DenSR analysis using RNA spot files and a 3D cell mesh file.sample_data(): return file paths for the built-in DenSR sample data.
Metadata
Release files for densr 0.1.7
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 |
|---|---|---|---|---|
| densr-0.1.7.tar.gz | 211.2 kB | Without provenance | Details for densr-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| densr-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for densr-0.1.7-py3-none-any.whl |
Total release size: 423.2 kB
Release files / densr-0.1.7.tar.gz
| Download URL | densr-0.1.7.tar.gz |
|---|---|
| Size | 211.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4768f795649ff26730ecae2b23fced2a651406c41c8f4972fd59bee300a3d8d3
|
|
BLAKE2b-256 checksum How to use checksums |
462d1c4ca472cbed9b6012a089d7a3e98950b8b7d5add39fa53d04b0c690870e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / densr-0.1.7-py3-none-any.whl
| Download URL | densr-0.1.7-py3-none-any.whl |
|---|---|
| Size | 212.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
910805b137306ed8d1af1f6062a096ed386cbe53e634f0a8c22840ff3f988bcd
|
|
BLAKE2b-256 checksum How to use checksums |
a80dc3da4cbe1e2449b94fafe9151073f7cf93745cb73c65af3c263b07cb1319
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Security for densr 0.1.7
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.