Skip to main content

Python rewrite of SigXTalk: Dissecting crosstalk induced by cell-cell communication

Project description

py-sigxtalk

Python rewrite of SigXTalk: Dissecting crosstalk induced by cell-cell communication using single-cell transcriptomic data.

Installation

# Install from source
cd py-sigxtalk
pip install -e ".[dev]"

Quick Start

import pysigxtalk as psx

# Load databases
rtf_db, tftg_db = psx.load_databases(species="human")

# Prepare inputs
inputs = psx.prepare_input(exp_mat, target_genes, lr_pairs, rtf_db, tftg_db)

# Run HGNN
pathways = psx.run_hgnn(inputs, epochs=10, device="cpu")

# Calculate PRS
prs_results = psx.compute_prs(inputs.exp_clu, pathways, n_estimators=10)

# Visualize
psx.plot_counts_histogram(prs_results)
psx.plot_counts_bar(prs_results, topk=20)
psx.plot_fid_spe(prs_results, key_tg="CD68")

Benchmark

Python vs R (single core, PBMC3k dataset):

Step Python R (ranger)
HGNN 31s 31s
PRS 33s 219s
Total 80s 266s
Speedup 3.33x -
Correlation 0.9912 -

PRS Weight Correlation:

Benchmark Correlation

Timing Comparison:

Benchmark Timing

Visualization Gallery

Crosstalk Counts:

Histogram Bar Chart
Histogram Bar

Crosstalk Analysis:

Fid/Spe Alluvial Ridgeline
Fid/Spe Alluvial Ridgeline

Network Diagrams:

Chord CCI Chord CCI Circle
Chord CCI Chord CCI Circle

Heatmaps:

Signal Contribution Rec-TG Heatmap Circular Bar
Signal Heatmap Circular

Examples

example/
├── quickstart.ipynb              # Full analysis workflow
├── benchmark.ipynb               # Python vs R comparison
├── data/                         # Input data & results
│   ├── pbmc3k_final.h5ad         # PBMC3k dataset
│   ├── prs_results.csv           # PRS results
│   ├── prs_results_python.csv    # Python PRS results
│   └── prs_results_r.csv         # R PRS results
├── figures/                      # Generated figures
│   ├── 01-11_*.png               # 11 visualization figures
│   └── benchmark_*.png           # Benchmark plots
└── scripts/                      # Utility scripts
    ├── run_benchmark.py          # Benchmark runner
    ├── tutorial.py               # Tutorial script
    └── compare_R_vs_Python.py    # R vs Python comparison

Citation

Hou, J. et al. Dissecting crosstalk induced by cell-cell communication using single-cell transcriptomic data. Nature Communications (2025).

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

py_sigxtalk-0.1.0.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

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

py_sigxtalk-0.1.0-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file py_sigxtalk-0.1.0.tar.gz.

File metadata

  • Download URL: py_sigxtalk-0.1.0.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for py_sigxtalk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8bcffbafcb45b575353f52733bd4e59ee5271eddb930802fa842fc134ad89eb5
MD5 3bb2929e2fe1edce909c978849a57d80
BLAKE2b-256 de0240d4d63ffe3e6513f99c6e8885c2791ca7b920251ceb323b7e06ad97e95f

See more details on using hashes here.

File details

Details for the file py_sigxtalk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_sigxtalk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for py_sigxtalk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91e84a849615e5aff3283486383b1e08be60108a21af6cd5b214f0dc2ce5c6c1
MD5 02d5e001624dc3912431418cf4225a5b
BLAKE2b-256 82b63a441d5f30810df4f5826ce1c3e5405c913005494b293636b86458553295

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