Skip to main content

Xenium I/O, multimodal analysis, topology workflows, and contour-native spatial profiling.

Project description

pyXenium banner

pyXenium

Xenium I/O, multimodal analysis, topology workflows, and contour-native spatial profiling.

PyPI version Read the Docs CI Python versions License

PyPI · Read the Docs · GitHub · Changelog · Releases

pyXenium is a Python toolkit for 10x Genomics Xenium with five canonical public surfaces:

  • pyXenium.io: Xenium artifact loading, partial export recovery, SData I/O, and SpatialData-compatible export.
  • pyXenium.multimodal: canonical RNA + protein loading, joint analysis, immune-resistance scoring, and packaged workflows.
  • pyXenium.ligand_receptor: topology-native ligand-receptor analysis.
  • pyXenium.pathway: pathway topology analysis and pathway activity scoring.
  • pyXenium.contour: contour import, contour expansion, and contour-aware density profiling around polygon annotations.

Legacy compatibility entry points under pyXenium.analysis, pyXenium.validation, and pyXenium.io.load_xenium_gene_protein(...) remain importable, but new code should target the canonical namespaces above.

Release & Build

Install

pip install pyXenium

For local development:

git clone https://github.com/hutaobo/pyXenium
cd pyXenium
pip install -e ".[dev]"

For documentation work:

pip install -e ".[docs]"

Quick examples

Xenium I/O

from pyXenium.io import read_xenium

sdata = read_xenium("/path/to/xenium_export", as_="sdata", prefer="zarr")

Canonical multimodal loading

from pyXenium.multimodal import load_rna_protein_anndata

adata = load_rna_protein_anndata(
    base_path="/path/to/xenium_export",
    prefer="auto",
)

Contour expansion

from pyXenium.contour import expand_contours

expand_contours(
    sdata,
    contour_key="protein_cluster_contours",
    distance=25.0,
    mode="voronoi",
)

Documentation structure

The docs mirror the package surfaces and high-level workflows:

  • Installation / Quickstart
  • User Guide
  • Workflows
  • API Reference
  • Changelog

Start here: pyxenium.readthedocs.io

Branding assets

The repository keeps its Read the Docs and GitHub branding assets under:

docs/_static/branding/

To update the GitHub social preview manually, upload:

docs/_static/branding/pyxenium-social-preview.png

in the repository settings.

License

Copyright (c) 2025 Taobo Hu. All rights reserved.

This project is source-available, not open source. You may use, modify, and redistribute it only for non-commercial purposes under the terms of the LICENSE file. Commercial use requires prior written permission from the copyright holder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxenium-0.2.2.tar.gz (154.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyxenium-0.2.2-py3-none-any.whl (164.2 kB view details)

Uploaded Python 3

File details

Details for the file pyxenium-0.2.2.tar.gz.

File metadata

  • Download URL: pyxenium-0.2.2.tar.gz
  • Upload date:
  • Size: 154.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pyxenium-0.2.2.tar.gz
Algorithm Hash digest
SHA256 f7f8be2b9dd045773978e4dbb7544160083a96dbf8398b7afefd233113829431
MD5 ad18859c5e90fb8f2c799424c3a9c401
BLAKE2b-256 06aceb30c139da633dbd78ebf4410f4c9c4093aac212499b73473882b1567080

See more details on using hashes here.

File details

Details for the file pyxenium-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pyxenium-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 164.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for pyxenium-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c0aa4202a5f060e1873d8c6a1614789afff58c6eac215211c9c61e5792dd06bf
MD5 82f5d99230975173c3d1341c65b801ae
BLAKE2b-256 ad24f756f711afb02247267f45c95e23a1f408ab66379fa8721cc0822b90597e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page