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:
Timing Comparison:
Visualization Gallery
Crosstalk Counts:
| Histogram | Bar Chart |
|---|---|
Crosstalk Analysis:
| Fid/Spe | Alluvial | Ridgeline |
|---|---|---|
Network Diagrams:
| Chord | CCI Chord | CCI Circle |
|---|---|---|
Heatmaps:
| Signal Contribution | Rec-TG Heatmap | Circular Bar |
|---|---|---|
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bcffbafcb45b575353f52733bd4e59ee5271eddb930802fa842fc134ad89eb5
|
|
| MD5 |
3bb2929e2fe1edce909c978849a57d80
|
|
| BLAKE2b-256 |
de0240d4d63ffe3e6513f99c6e8885c2791ca7b920251ceb323b7e06ad97e95f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e84a849615e5aff3283486383b1e08be60108a21af6cd5b214f0dc2ce5c6c1
|
|
| MD5 |
02d5e001624dc3912431418cf4225a5b
|
|
| BLAKE2b-256 |
82b63a441d5f30810df4f5826ce1c3e5405c913005494b293636b86458553295
|