Skip to main content

scTenifoldXct

PyPI version License: MIT DOI

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:8765

Load 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. Run sctenifoldxct-ui --help for host/port/GRN-cache options.

Prefer a hosted, always-on option instead? Try the Streamlit demo.

scTenifoldXct local web UI: load a dataset, pick sender/receiver cell types, and configure a run

drawing


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:

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

sctenifoldxct-0.2.2.tar.gz (85.4 kB view details)

Uploaded Source

Built Distribution

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

sctenifoldxct-0.2.2-py3-none-any.whl (82.8 kB view details)

Uploaded Python 3

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

Hashes for sctenifoldxct-0.2.2.tar.gz
Algorithm Hash digest
SHA256 4d094addee4eb96d6d001f186825df8197b5b0262b2f2e81bd2004e922df758a
MD5 6f6e68bba16a3aed4a33f23d30597974
BLAKE2b-256 b8a3ed325aaf23636b57e6b69c4dec40dcd27c8289d308af43a0c6a4d40d2a41

See more details on using hashes here.

Provenance

The following attestation bundles were made for sctenifoldxct-0.2.2.tar.gz:

Publisher: publish.yml on cailab-tamu/scTenifoldXct

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for sctenifoldxct-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f566430f156710e72fa0d0da4c87865833b4c7ada1d21182ec07d1f9702fcf62
MD5 4b685bae32deae6a58234306486961c8
BLAKE2b-256 49438958c441047b60dee1721efbc57f7f9c2e1a8cfce0ad7d0d2e6167d54ec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for sctenifoldxct-0.2.2-py3-none-any.whl:

Publisher: publish.yml on cailab-tamu/scTenifoldXct

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page