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.1.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.1-py3-none-any.whl (164.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyxenium-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0072cf06d841006a69ef057f60758d2c4a4fd93121197318d7f5c1ef2e717a54
MD5 7c5be2dffe4524e33638f04cb86ce5fd
BLAKE2b-256 bf653ae5900a9c350fa09209f1044e7be45beaed0e6c5b0ae33a89c7c7bcacba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyxenium-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43f03427a2d0d1f65be8402be2e57102ec7eb386df3a835e7ca9209044dda666
MD5 47e0ef4f1d69d20d406342495c2dc3ec
BLAKE2b-256 41baeb1bbe9033600eddb0aec542d43a1cec248cffc17771dc54fe8f23e4b30e

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