seq-lumen
A small package for lumen/luminal-structure quantification only from centroids. Based on {cite}Reyes2026's method for quantification, with some small (presumed) fixes.
Getting started
Please refer to the documentation, in particular, the API documentation.
import seq_lumen
from anndata.acc import A
# Set up relevant accessors for each relevant field.
border_acc = A.obs["is_epithelial"]
# Only if needed with multiple samples
sample_acc = A.obs["sample_id"]
# Only if needed - the default check for centroids looks in obsm["spatial"]
# centroids_acc = A.obsm["X_spatial"]
assert seq_lumen.acc.centroids_acc in adata
# Resolve the parameters for quantification for all applicable samples, if present.
# This is much more robust than the defaults, which match Reyes et al.
sl_quantifier = seq_lumen.Quantifier.from_adata(adata, sample_acc=sample_acc)
# Each value of `lumen` is a `(n_lumen_points, 2)` array of luminal centroids and the key is the sample id.
# If no `sample_acc` is passed in, just a single ndarray is returned, calculated over all centroids/borders together.
lumen: dict[str, np.ndarray] = sl_quantifier(adata, border_acc=border_acc, sample_acc=sample_acc)
# Per-cell lumen scores and lumen ids are written to these default accessors (pass `count_acc`/`assignment_acc` to override in the above quantifier call)
assert seq_lumen.acc.count_acc in adata
assert seq_lumen.acc.assignment_acc in adata
Divergences from the Original
There are a combination of fixes/divergences from the original code/paper, some bugs, some things being misreported.
These are indicated within the code and in the docstring of {class}seq_lumen.Quantifier.
If you wish to reproduce the {cite}Reyes2026 paper's results exactly, go to the paper's repo.
Installation
You need to have Python 3.12 or newer installed on your system. If you don't have Python installed, we recommend installing uv.
We recommend managing dependencies in project-specific virtual environments to avoid dependency conflicts. This is most convenient using package managers such as uv. Choose from the options below to install seq-lumen:
-
Install the latest development version:
pip install seq-lumen # (or `uv add`)
Release notes
See the changelog.
Contact
For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.
Citation
Reyes, J., Del Priore, I., Chaikovsky, A. C., Pasnuri, N., Elhossiny, A. M., Park, J., Weiler, P., Krause, T., Moorman, A., Snopkowski, C., Takizawa, M., Burdziak, C., Ratnayeke, N., Masilionis, I., Ho, Y.-J., Chaligné, R., Romesser, P. B., Filliol, A., Nawy, T., … Lowe, S. W. (2026). Oncogenic and tumor-suppressive forces converge on a progenitor niche at the benign-to-malignant transition. Cell, 189(10), 2875–2897.e53. https://doi.org/10.1016/j.cell.2026.03.032
Metadata
Release files for seq-lumen 0.0.1
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 |
|---|---|---|---|---|
| seq_lumen-0.0.1.tar.gz | 2.3 MB | With provenance | Details for seq_lumen-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seq_lumen-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for seq_lumen-0.0.1-py3-none-any.whl |
Total release size: 2.3 MB
Release files / seq_lumen-0.0.1.tar.gz
| Download URL | seq_lumen-0.0.1.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e792c5920b43659a29b1855c28f5e3672cb8c147934e258b72f4561dcd3b81be
|
|
BLAKE2b-256 checksum How to use checksums |
5224ec8d46e221699f31cdc436fb3aefa5813ce60c296db95072bb9752c9cf96
|
| 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 13, 2026.
Transparency logRelease files / seq_lumen-0.0.1-py3-none-any.whl
| Download URL | seq_lumen-0.0.1-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
498c9088a88ac7f795a133ff9227b2825e708cb85ca12208a0ab0b98d9d98cab
|
|
BLAKE2b-256 checksum How to use checksums |
b2971ebdafb74c67068f60bc55dc247b50e44f8cb6e610bfa9ac71016b89f950
|
| 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 13, 2026.
Transparency logSecurity for seq-lumen 0.0.1
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 seq_lumen-0.0.1.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 13, 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.