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.3.tar.gz (154.2 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.3-py3-none-any.whl (164.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyxenium-0.2.3.tar.gz
  • Upload date:
  • Size: 154.2 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.3.tar.gz
Algorithm Hash digest
SHA256 e796c658e8e0603389d828619c77b201040659b373fdefc25d4dde83906df5a4
MD5 6b4d15da08780e9c499653e9d3847139
BLAKE2b-256 38cd257b6d415b8f080cc226b46294d07d008f9a94efc871cfb114754c0890b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyxenium-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 21d578e07797b79e59b9a0241ba65113bc43f9dfa09e559e8aa7bc81dd93b316
MD5 a83624846d928707a9e29d770e5d22fe
BLAKE2b-256 c986a57c05ba56ca412285063c27f879e0b8823e28288526869858c347766f2d

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