Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Glacier: Decoding the causal drivers of spatial cellular topology

Figure 1

Glacier is a python library to leverage spatial Granger causality to infer transcriptional and signaling relationships based on tissue organization. By combining GASTON’s global isodepth coordinate with Velorama’s graph-based causal inference framework, we enable bidirectional inference of regulatory relationships along spatial axes, identifying transcription factor target interactions and ligand-receptor pairs that operate across spatial domains.

Our program is designed specifically for single-cell, spatial transcriptomics data. Glacier constructs a directed acyclic graph (DAG) based on global spatial coordinates, by first using GASTON to compute isodepth for each cell. Then, we test for Granger causality by using spatial-data adapted Velorama. We are also able to invert each cell's isodepth, allowing information to flow in the other direction.

Our code can also be found on Zenodo: https://doi.org/10.5281/zenodo.19500378

Installation:

We recommend first cloning this repository:

git clone git@github.com:rohitsinghlab/glacier.git
cd glacier

Then, set up a conda or mamba environment with the environment.yml file here.

conda create -n glacier -f environment.yml
conda activate glacier

Tutorial

After everything is installed, navigate to the tutorial folder. cerebellum_data is there as sample data. First download cerebellum_counts_mat.npy from here and put it inside the cerebellum_data folder. Then follow the tutorial, including the CREATE DATASETS portion.

With created datasets, go to velorama folder and run commands such as python run_modified.py -ds $dataset -dyn dag_precomputed -dev $device to infer transcriptional and signaling relationships. -dyn needs to remain dag_precomputed, since we use the spatial dag. $dataset is the data saved from the previous step. $device can be cpu or gpu. Other hyperparameters that can be change include maximum number of lags $L, dimension of hidden layers $hidden, among others.

About

Decoding the causal drivers of spatial cellular topology

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages