scTenifoldXct
A semi-supervised method for predicting cell-cell interactions and mapping cellular communication graphs via manifold learning. [Paper]
🆕 New: a local web UI. No code required:
pip install --no-cache-dir "scTenifoldXct[web]" sctenifoldxct-ui # opens http://127.0.0.1:8765Load a dataset (the bundled example needs no upload, from a git checkout — otherwise upload your own
.h5ad), pick sender/receiver cell types, and hit Run analysis. Ranked ligand-receptor pairs show up in-browser with a full CSV download. Everything — data, computation, results — stays on your machine. Runsctenifoldxct-ui --helpfor host/port/GRN-cache options.Prefer a hosted, always-on option instead? Try the Streamlit demo.
Install
Requires Python 3.10+.
pip install scTenifoldXct
From source (development or latest unreleased changes):
git clone https://github.com/cailab-tamu/scTenifoldXct.git
cd scTenifoldXct
pip install .
Example Data
Two real, ready-to-use datasets are bundled under data/ — no data of your own required:
| File | Shape | Cell types (ident) |
Used by |
|---|---|---|---|
adata_short_example.h5ad |
202 cells × 3,000 genes | Inflam. FIB, Inflam. DC |
single-sample analysis (sctenifoldxct / st.scTenifoldXct) |
adata_merge_example.h5ad |
199 cells × 2,608 genes | B cells, Fibroblasts (across NormalvsTumor conditions N/T) |
two-sample differential analysis (sctenifoldxct-merge) |
Both are log-normalised and ready to feed straight into the examples below. See
data/README.md for additional/larger datasets.
Usages
Quick Start
import logging
import scanpy as sc
import scTenifoldXct as st
# scTenifoldXct logs progress via the logging module; configure a handler to
# see messages when verbose=True (e.g. in a script or notebook):
logging.basicConfig(level=logging.INFO, format="%(message)s")
adata = sc.read_h5ad('data/adata_short_example.h5ad') # load data
xct = st.scTenifoldXct(data = adata, # an AnnData
source_celltype = 'Inflam. FIB', # sender cell type
target_celltype = 'Inflam. DC', # receiver cell type
obs_label = 'ident', # colname in adata.obs indicating cell types
rebuild_GRN = True, # whether to build GRNs
GRN_file_dir = 'Net_example_dev', # folder path to GRNs
verbose = True, # whether to log the processing
n_cpus = -1) # CPU multiprocessing, -1 to use all
emb = xct.get_embeds(train = True) # Manifold alignment to project data to low-dimensional embeddings
xct_pairs = xct.null_test() # non-parametric test to get significant interactions
print(xct_pairs)
Command line
# single-sample interaction analysis
sctenifoldxct data/adata_short_example.h5ad --rebuild \
-s "Inflam. FIB" -r "Inflam. DC" --n_cpus 8 -v
# two-sample differential interaction analysis
sctenifoldxct-merge data/adata_merge_example.h5ad NormalvsTumor N T \
--rebuild -s "B cells" -r "Fibroblasts" --n_cpus 8 -v
Run sctenifoldxct --help or sctenifoldxct-merge --help for all options.
Tutorial
Two tutorial notebooks cover usage and results visualization:
- Single-sample interaction analysis: https://github.com/cailab-tamu/scTenifoldXct/blob/main/tutorials/tutorial-short_example.ipynb
- Two-sample differential interaction analysis: https://github.com/cailab-tamu/scTenifoldXct/blob/main/tutorials/tutorial-merge_short_example.ipynb
Run scTenifoldXct from command-line by Docker
A Docker image with all required packages and databases included, for users not familiar with Python:
docker build -t sctenifold .
docker run -it --name xct --shm-size=8gb sctenifold
This drops you into a Bash terminal in the container. Example single-sample run:
sctenifoldxct data/adata_short_example.h5ad \
--rebuild \
-s "Inflam. FIB" \
-r "Inflam. DC" \
--n_cpus 8 \
-v
Two-sample analysis:
sctenifoldxct-merge data/adata_merge_example.h5ad \
NormalvsTumor N T \
--rebuild \
-s "B cells" \
-r "Fibroblasts" \
--n_cpus 8 \
-v
Copy your own data into the container for your analyses. When done, detach with Ctrl+p Ctrl+q and copy results back to the host:
docker cp xct:/app/xct_results/ .
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 sctenifoldxct-0.2.2.tar.gz.
File metadata
- Download URL: sctenifoldxct-0.2.2.tar.gz
- Upload date:
- Size: 85.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d094addee4eb96d6d001f186825df8197b5b0262b2f2e81bd2004e922df758a
|
|
| MD5 |
6f6e68bba16a3aed4a33f23d30597974
|
|
| BLAKE2b-256 |
b8a3ed325aaf23636b57e6b69c4dec40dcd27c8289d308af43a0c6a4d40d2a41
|
Provenance
The following attestation bundles were made for sctenifoldxct-0.2.2.tar.gz:
Publisher:
publish.yml on cailab-tamu/scTenifoldXct
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sctenifoldxct-0.2.2.tar.gz -
Subject digest:
4d094addee4eb96d6d001f186825df8197b5b0262b2f2e81bd2004e922df758a - Sigstore transparency entry: 2482297860
- Sigstore integration time:
-
Permalink:
cailab-tamu/scTenifoldXct@01f6666238e135e473039707025583447039444c -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/cailab-tamu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@01f6666238e135e473039707025583447039444c -
Trigger Event:
push
-
Statement type:
File details
Details for the file sctenifoldxct-0.2.2-py3-none-any.whl.
File metadata
- Download URL: sctenifoldxct-0.2.2-py3-none-any.whl
- Upload date:
- Size: 82.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f566430f156710e72fa0d0da4c87865833b4c7ada1d21182ec07d1f9702fcf62
|
|
| MD5 |
4b685bae32deae6a58234306486961c8
|
|
| BLAKE2b-256 |
49438958c441047b60dee1721efbc57f7f9c2e1a8cfce0ad7d0d2e6167d54ec8
|
Provenance
The following attestation bundles were made for sctenifoldxct-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on cailab-tamu/scTenifoldXct
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sctenifoldxct-0.2.2-py3-none-any.whl -
Subject digest:
f566430f156710e72fa0d0da4c87865833b4c7ada1d21182ec07d1f9702fcf62 - Sigstore transparency entry: 2482297950
- Sigstore integration time:
-
Permalink:
cailab-tamu/scTenifoldXct@01f6666238e135e473039707025583447039444c -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/cailab-tamu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@01f6666238e135e473039707025583447039444c -
Trigger Event:
push
-
Statement type: