Yuning You commited on
Commit
a9af6e4
·
1 Parent(s): 89847a2
Files changed (2) hide show
  1. README.md +9 -2
  2. test.ipynb +11 -0
README.md CHANGED
@@ -21,7 +21,7 @@ The current version of CI-FM has 138M parameters and is trained on around 23M ce
21
  The detailed usage of the model can be found in the [tutorial](https://huggingface.co/ynyou/CIFM/blob/main/test.ipynb).
22
  Before running the tutorial, please set up an environment following the [environment instruction](https://huggingface.co/ynyou/CIFM#environment).
23
 
24
- More information about the model can be found in the [preprint]().
25
 
26
  ![](./figures/cifm.png)
27
  ![](./figures/autoregressive.gif)
@@ -57,5 +57,12 @@ pip install torch-scatter torch-sparse torch-cluster torch-geometric -f https://
57
  ## Citation
58
  If you use this code for you research, please cite our paper.
59
  ```
60
- TBD
 
 
 
 
 
 
 
61
  ```
 
21
  The detailed usage of the model can be found in the [tutorial](https://huggingface.co/ynyou/CIFM/blob/main/test.ipynb).
22
  Before running the tutorial, please set up an environment following the [environment instruction](https://huggingface.co/ynyou/CIFM#environment).
23
 
24
+ More information about the model can be found in the [preprint](https://www.biorxiv.org/content/10.1101/2025.01.25.634867v1).
25
 
26
  ![](./figures/cifm.png)
27
  ![](./figures/autoregressive.gif)
 
57
  ## Citation
58
  If you use this code for you research, please cite our paper.
59
  ```
60
+ @misc{you2025cifm,
61
+ title={Building Foundation Models to Characterize Cellular Interactions via Geometric Self-Supervised Learning on Spatial Genomics},
62
+ author={You, Yuning and Wang, Zitong and Fleisher, Kevin and Liu, Rex and Thomson, Matt},
63
+ year={2025},
64
+ elocation-id = {2025.01.25.634867},
65
+ archivePrefix={bioRxiv},
66
+ url={https://www.biorxiv.org/content/early/2025/01/27/2025.01.25.634867},
67
+ }
68
  ```
test.ipynb CHANGED
@@ -257,6 +257,17 @@
257
  " expressions = model.predict_cells_at_locations(adata, target_locs)\n",
258
  "expressions, expressions.shape"
259
  ]
 
 
 
 
 
 
 
 
 
 
 
260
  }
261
  ],
262
  "metadata": {
 
257
  " expressions = model.predict_cells_at_locations(adata, target_locs)\n",
258
  "expressions, expressions.shape"
259
  ]
260
+ },
261
+ {
262
+ "cell_type": "code",
263
+ "execution_count": null,
264
+ "metadata": {},
265
+ "outputs": [],
266
+ "source": [
267
+ "# you can convert it into normalize counts\n",
268
+ "counts_normalized = np.exp(expressions) - 1\n",
269
+ "counts_normalized = counts_normalized / counts_normalized.sum(axis=1, keepdims=True)"
270
+ ]
271
  }
272
  ],
273
  "metadata": {