Skip to content

Commit

Permalink
Update URL links
Browse files Browse the repository at this point in the history
  • Loading branch information
xiachenrui committed Nov 5, 2024
1 parent 9ea5399 commit e7c0f21
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

</div>

`DECIPHER` aims to learn cells’ disentangled embeddings from intracellular state and extracellular contexts view based on single-cell spatial omics data.
`DECIPHER` aims to learn cells’ disentangled embeddings from intracellular state and extracellular context views based on spatial omics data.

![DECIPHER](./docs/_static/Model.png)

Expand Down Expand Up @@ -48,35 +48,43 @@ Here is a minimal example for quick start:
```python
import scanpy as sc
from decipher import DECIPHER
from decipher.utils import scanpy_viz

# Init model
model = DECIPHER(work_dir='/path/to/work_dir')

# Register data
# Register data (adata.X is raw counts, adata.obsm['spatial'] is spatial coordinates)
adata = sc.read_h5ad('/path/to/adata.h5ad')
model.register_data(adata)

# Fit model
# Fit DECIPHER model
model.fit_omics()

# Get disentangled omics and spatial embeddings
omics_emb = model.center_emb
spatial_emb = model.nbr_emb
# Clustering disentangled embeddings
adata.obsm['X_center'] = model.center_emb # intracellular embedding
adata.obsm['X_nbr'] = model.nbr_emb # context embedding
adata = scanpy_viz(adata, ['center', 'nbr'], rapids=False)

# Plot
adata.obsm['X_umap'] = adata.obsm['X_umap_center'].copy()
sc.pl.umap(adata, color=['cell_type'])
adata.obsm['X_umap'] = adata.obsm['X_umap_nbr'].copy()
sc.pl.umap(adata, color=['region'])
```

### Tutorials
> Please check [**documentation**](https://slat.readthedocs.io/en/latest/) for all tutorials.
<!-- > Please check [**documentation**](https://slat.readthedocs.io/en/latest/) for all tutorials. -->

| Name | Description | Colab |
| --------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| [Basic Model Tutorial]() | Tutorial on how to use DECIPHER | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/drive/14PEtrgqlf-KbLOTfBLc9gbx0YvY6mi0S?usp=sharing) |
| [Multi-slices with Batch Effects]() | Tutorial on how to apply DECIPHER to multiple slices with batch effects | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/drive/1eLJeRDZFq2tlDUWpETlSxVUdzRv9CeSD?usp=sharing) |
| [Identify Localization-related LRs]() | Tutorial on how to identify ligand-receptors which related wtih cells’ localization based on DECIPHER embeddings | Insufficient resources |
| [Multi-GPUs Training]() | Tutorial on how to use DECIPHER with multi-GPUs on spatial atlas | Insufficient resources |
| [Basic Model Tutorial](./docs/tutorials/1-train_model.ipynb) | Tutorial on how to use DECIPHER | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/drive/14PEtrgqlf-KbLOTfBLc9gbx0YvY6mi0S?usp=sharing) |
| [Multi-slices with Batch Effects](./docs/tutorials/2-remove_batch.ipynb) | Tutorial on how to apply DECIPHER to multiple slices with batch effects | [![Open In Colab](https://img.shields.io/badge/Colab-PyTorch-blue?logo=googlecolab)](https://colab.research.google.com/drive/1eLJeRDZFq2tlDUWpETlSxVUdzRv9CeSD?usp=sharing) |
| [Identify Localization-related LRs](./docs/tutorials/3-select_LRs.ipynb) | Tutorial on how to identify ligand-receptors which related wtih cells’ localization based on DECIPHER embeddings | Insufficient resources |
| [Multi-GPUs Training](./docs/tutorials.md#multi-gpu-training) | Tutorial on how to use DECIPHER with multi-GPUs on spatial atlas | Insufficient resources |


## Citation
TBD
In preparation.

> If you want to repeat our benchmarks and case studies, please check the [**benchmark**](./benchmark/README.md) and [**experiments**](./experiments/README.md) folder.
Expand All @@ -85,6 +93,9 @@ TBD

We observed `model.train_gene_select()` function in [Identify Localization-related LRs]() tutorial (700,000 cells and 1,000 genes) uses ~40G GPU memory. If your GPU do not have enough memory, you still can train model on GPU but disabling GPU in `train_gene_select()` function.

2. Visium or ST data

DECIPHER is designed for single cell resolution data. As for Visium or ST, DECIPHER still can be applied after obtaining single-cell resolution through deconvolution or spatial mapping strategies.

## Acknowledgement
We thank following great open-source projects for their help or inspiration:
Expand Down

0 comments on commit e7c0f21

Please sign in to comment.