Skip to main content
https://img.shields.io/pypi/v/skny.svg Documentation Status

SKNY - Spatial omics analysis tools for tumor microenvironment

_images/SKYN_logo.svg

SKNY (SpatialKNifeY) is a tools for spatial omics analysis of tumor microenvironment for multiple platform such as Xenium, CosMx, and PhenoCycler. SKNY automatically contours the tumor based on the expression data and calculates the distance from these contours to each coordinate in space. Using this distance data, we provide two analyses:

  1. A quantitative evaluation of the peri- and intra-tumoral gene expressions.

  2. “Single tumor microenvironment analysis” with bulk gene expression within each contour.

Since v0.3.0 SKNY also provides a cell-label based variant (skny.pp.calculate_region) for cell-level data with annotated cell types (e.g. scanpy / Xenium 5K): the tumor is defined by a cell label such as "Malignant" and every cell is assigned to the tumor core (within 15 um of a tumor cell), the peri-tumoral margin (stroma within 100 um of the core) or dist (farther tissue), with an all-cell tissue mask so that empty space is never counted. skny.pp.region_density then gives the density (cells / mm^2) of any cell group (e.g. immune subtypes) per region, and skny.pl.region_map / skny.pl.region_density_plot draw the results.

import skny as sk
sk.pp.calculate_region(adata, "Malignant", label_key="cell_type", sample_key="sample")  # coordinates in um in adata.obsm["spatial"]
df = sk.pp.region_density(adata, "immune_subtype", sample_key="sample")
sk.pl.region_map(adata, sample="S1", highlight=["T cell", "Myeloid"])
sk.pl.region_density_plot(df, groups=["CD8+ T", "Treg", "M2-like"])

Also, anndata object-based programming makes it compatible with scanpy, squidpy and stlearn.

Recommended Python version: We recommend using Python 3.8 or 3.9 to ensure compatibility.

Documentation

Citation

  • TODO

History

0.3.0 (2026-11-02)

  • New cell-label based region analysis (a variant of calculate_distance that works on cell-level AnnData instead of marker expression on a grid): skny.pp.calculate_region (tumor core / margin / dist from the Euclidean distance to the nearest reference cell, with an all-cell tissue mask), skny.pp.region_density (cells / mm^2 of any cell group per region), skny.pl.region_map and skny.pl.region_density_plot.

  • Tutorial notebooks/region_analysis and unit tests tests/test_region.py.

0.2.16 (2024-02-14)

0.2.8 (2024-02-01)

0.2.7 (2024-01-31)

0.2.6 (2024-01-31)

  • Practice of upload to PyPI.

0.2.5 (2024-01-30)

0.2.4 (2024-01-30)

0.2.3 (2024-01-30)

0.2.2 (2024-01-30)

0.2.1 (2024-01-30)

0.1.2 (2024-01-30)

0.1.1 (2024-01-30)

0.1.0 (2024-01-21)

  • First release on PyPI.

Metadata

Release files for skny 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for skny 0.3.0
File Size Uploaded Provenance Actions
skny-0.3.0.tar.gz 10.4 MB Without provenance Details for skny-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for skny 0.3.0
File Interpreter ABI Platform Actions
skny-0.3.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for skny-0.3.0-py2.py3-none-any.whl

Total release size: 10.4 MB

Release files / skny-0.3.0.tar.gz

Download URL skny-0.3.0.tar.gz
Size 10.4 MB
Tags Source
SHA-256 checksum
How to use checksums
72cb60cfa8f640e7b056c9e0c37986067ef084241c5c7beef225435ba7974587
BLAKE2b-256 checksum
How to use checksums
11eb720e325ad63dbc893fcf7a397d65536bb7040d314a4b4794d829953b9fa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / skny-0.3.0-py2.py3-none-any.whl

Download URL skny-0.3.0-py2.py3-none-any.whl
Size 30.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4c0483abb9121ed58d8d1d2d89f96f354258214667490600cc0dba28a8f9b952
BLAKE2b-256 checksum
How to use checksums
9aabbceaddfcc96882ce9dabf7388d4de76fe62bfcca6ecb3a571e21e9100588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Security for skny 0.3.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page