Skip to content

hutaobo/pyXenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors