Views
No views yet
embeddings = model.embed(adata) (the 1st Figure below panel D top);expressions = model.predict_cells_at_locations(adata, target_locs) (the 1st Figure below panel D bottom, and the 2nd Figure below).

conda create -n $MYENV python=3.11, but it is not the only way to do that.
After entering the environment, you can clone the model via:# Make sure you have git-lfs installed (https://git-lfs.com), e.g. as:
git lfs install
# or if you are under conda environment, you can also install git-lfs via conda as:
conda install anaconda::git-lfs
# clone the model and enter the directory
git clone https://huggingface.co/ynyou/CIFM
cd ./CIFM/
git lfs install ; git lfs pull# my python version is 3.11, which is manage when creating conda environment: conda create -n $MYENV python=3.11
pip install torch==2.1.0 --index-url https://download.pytorch.org/whl/cu118
pip install torch-scatter torch-sparse torch-cluster torch-geometric -f https://data.pyg.org/whl/torch-2.1.0+cu118.html
pip install scanpy e3nn lightning==2.1.0 transformers numpy==1.26.4torch and torch-geometric is not always guaranteed (lines 2-3), since these two guys are very picky on the platform and the version of other packages. You may need trial-and-error to find the right versions of torch and torch-geometric that works for you, e.g., in some machine I once installed via:pip install torch==2.0.1 --index-url https://download.pytorch.org/whl/cu117
pip install torch-scatter torch-sparse torch-cluster torch-geometric -f https://data.pyg.org/whl/torch-2.0.1+cu117.html@article{you2025building,
title={Building Foundation Models to Characterize Cellular Interactions via Geometric Self-Supervised Learning on Spatial Genomics},
author={You, Yuning and Wang, Zitong and Fleisher, Kevin and Liu, Rex and Thomson, Matt},
journal={bioRxiv},
pages={2025--01},
year={2025},
publisher={Cold Spring Harbor Laboratory}
}