SpaceTravLR (Spatially perturbing Transcription factors, Ligands & Receptors)
SpaceTravLR leverages convolutional neural networks to generate a sparse graph with differentiable edges. This enables signals to propagate both within cells through regulatory edges and between cells through ligandβmediated connections.
- predicting niche-specific perturbation outcome at single cell resolution
- inferring functional cell-cell communications events
- identifying spatial domains and functional microniches and their driver genes
Make & sync your Environment the modern way
pip install -r requirements.txt
uv pip install SpaceTravLR==0.1.17uv venv
source .venv/bin/activate
uv syncLoad the example Slide-tags Human Tonsil data.
adata = sc.read_h5ad('data/snrna_germinal_center.h5ad')Create a SpaceShip
from SpaceTravLR.spaceship import SpaceShip
spacetravlr = SpaceShip(name='myTonsil').setup_(adata)
assert spacetravlr.is_everything_ok()
spacetravlr.spawn_worker(
python_path='.venv/bin/python',
partition='preempt'
)SpaceTravLR generates a queue of genes that each worker consumes in parallel. spacetravlr.spawn_worker submits a new job to the clusters.
output/ βββ input_data/ β βββ _adata.h5ad β βββ celloracle_links.pkl β βββ communication.pkl β βββ LRs.parquet βββ betadata/ β βββ PAX5_betadata.parquet β βββ FOXO1_betadata.parquet β βββ CD79A_betadata.parquet β βββ ... β βββ IL21_betadata.parquet β βββ IL4_betadata.parquet β βββ CCR4_betadata.parquet βββ logs/ β βββ training_TIMESTAMP.log
If you find SpaceTravLR useful in your research or projects, please cite our paper: