cell-decipher


Namecell-decipher JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/gao-lab/decipher
SummarySpatial-omics data embedding and analysis
upload_time2024-10-20 13:52:13
maintainerNone
docs_urlNone
authorChen-Rui Xia
requires_python>=3.10
licenseMIT
keywords bioinformatics transformer single-cell spatial-omics deep-learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![stars-badge](https://img.shields.io/github/stars/gao-lab/DECIPHER?logo=GitHub&color=yellow)](https://github.com/gao-lab/DECIPHER/stargazers)
[![build-badge](https://github.com/gao-lab/DECIPHER/actions/workflows/build.yml/badge.svg)](https://github.com/gao-lab/DECIPHER/actions/workflows/build.yml)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![license-badge](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![Python 3.10|3.11|3.12](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)


# DECIPHER
<div align="center">

[Installation](#Installation) • [Documentation](#Documentation) • [Citation](#Citation) • [FAQ](#FAQ) • [Acknowledgement](#Acknowledgement)

</div>

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

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

## Installation
> [!IMPORTANT]
> Requires Python >= 3.10 and CUDA-enabled GPU (CPU-only device is not recommended).

### PyPI
We recommend to install `cell-decipher` to a new conda environment with [RAPIDS](https://docs.rapids.ai/install) dependencies.

```sh
mamba create -n decipher -c conda-forge -c rapidsai -c nvidia python=3.11 rapids=24.04 cuda-version=11.8 cudnn cutensor cusparselt -y && conda activate decipher
pip install cell-decipher
install_pyg_dependencies
```

### Docker
Build docker image from [Dockerfile](./Dockerfile) or pull the latest image from Docker Hub by:
```sh
docker pull huhansan666666/decipher:latest
```

## Documentation
> Please check [**documentation**](https://slat.readthedocs.io/en/latest/) for detailed tutorial.

### Minimal example
Here is a minimal example for quick start:

```python
import scanpy as sc
from decipher import DECIPHER

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

# Register data
adata = sc.read_h5ad('/path/to/adata.h5ad')
model.register_data(adata)

# Fit model
model.fit_omics()

# Get disentangled omics and spatial embeddings
omics_emb = model.center_emb
spatial_emb = model.nbr_emb
```

### Demo

| Name                                    | Description                                                  |
| --------------------------------------- | ------------------------------------------------------------ |
| [Basic Model Tutorial]() ([Colab](https://colab.research.google.com/drive/14PEtrgqlf-KbLOTfBLc9gbx0YvY6mi0S?usp=sharing))                | Tutorial on how to train DECIPHER                            |
| [Identify Localization Related Genes]() | Tutorial on how to identify cells’ localization related genes via DECIPHER embeddings|
| [Multi-slices with Batch Effects]()     | Tutorial on how to remove batch effects across multiple slices |
| [DDP Training]()                        | Tutorial on how to use multi-GPUs on large datasets          |


## Citation
TBD

> If you want to repeat our benchmarks and case studies, please check the [**benchmark**](./benchmark/README.md) and [**experiments**](./experiments/README.md) folder.

## FAQ
1. `CUDA out of memory` error

We do all experiments on A100-80G GPUs. We observed `model.train_gene_select()` may use ~40GB for 700,000 cells with 1,000 genes. If your GPU do not have enough memory, you can try running with CPU.


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

- [SimCLR](https://github.com/sthalles/SimCLR)
- [vit-pytorch](https://github.com/lucidrains/vit-pytorch)
- [lightly](https://github.com/lightly-ai/lightly)
- [scib](https://github.com/theislab/scib)
- [rapids_singlecell](https://github.com/scverse/rapids_singlecell/)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gao-lab/decipher",
    "name": "cell-decipher",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "bioinformatics, transformer, single-cell, spatial-omics, deep-learning",
    "author": "Chen-Rui Xia",
    "author_email": "xiachenrui@mail.cbi.pku.edu.cn",
    "download_url": "https://files.pythonhosted.org/packages/22/c8/6ce1aa99ce78370aee849413f4c62d02e8197a930ed9dad2bcc3a3ed3f28/cell_decipher-0.1.0.tar.gz",
    "platform": null,
    "description": "[![stars-badge](https://img.shields.io/github/stars/gao-lab/DECIPHER?logo=GitHub&color=yellow)](https://github.com/gao-lab/DECIPHER/stargazers)\n[![build-badge](https://github.com/gao-lab/DECIPHER/actions/workflows/build.yml/badge.svg)](https://github.com/gao-lab/DECIPHER/actions/workflows/build.yml)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![license-badge](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n![Python 3.10|3.11|3.12](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)\n\n\n# DECIPHER\n<div align=\"center\">\n\n[Installation](#Installation) \u2022 [Documentation](#Documentation) \u2022 [Citation](#Citation) \u2022 [FAQ](#FAQ) \u2022 [Acknowledgement](#Acknowledgement)\n\n</div>\n\n`DECIPHER` aims to learn cells\u2019 disentangled embeddings from intracellular state and extracellular contexts view based on single-cell spatial omics data.\n\n![DECIPHER](./docs/_static/Model.png)\n\n## Installation\n> [!IMPORTANT]\n> Requires Python >= 3.10 and CUDA-enabled GPU (CPU-only device is not recommended).\n\n### PyPI\nWe recommend to install `cell-decipher` to a new conda environment with [RAPIDS](https://docs.rapids.ai/install) dependencies.\n\n```sh\nmamba create -n decipher -c conda-forge -c rapidsai -c nvidia python=3.11 rapids=24.04 cuda-version=11.8 cudnn cutensor cusparselt -y && conda activate decipher\npip install cell-decipher\ninstall_pyg_dependencies\n```\n\n### Docker\nBuild docker image from [Dockerfile](./Dockerfile) or pull the latest image from Docker Hub by:\n```sh\ndocker pull huhansan666666/decipher:latest\n```\n\n## Documentation\n> Please check [**documentation**](https://slat.readthedocs.io/en/latest/) for detailed tutorial.\n\n### Minimal example\nHere is a minimal example for quick start:\n\n```python\nimport scanpy as sc\nfrom decipher import DECIPHER\n\n# Init model\nmodel = DECIPHER(work_dir='/path/to/work_dir')\n\n# Register data\nadata = sc.read_h5ad('/path/to/adata.h5ad')\nmodel.register_data(adata)\n\n# Fit model\nmodel.fit_omics()\n\n# Get disentangled omics and spatial embeddings\nomics_emb = model.center_emb\nspatial_emb = model.nbr_emb\n```\n\n### Demo\n\n| Name                                    | Description                                                  |\n| --------------------------------------- | ------------------------------------------------------------ |\n| [Basic Model Tutorial]() ([Colab](https://colab.research.google.com/drive/14PEtrgqlf-KbLOTfBLc9gbx0YvY6mi0S?usp=sharing))                | Tutorial on how to train DECIPHER                            |\n| [Identify Localization Related Genes]() | Tutorial on how to identify cells\u2019 localization related genes via DECIPHER embeddings|\n| [Multi-slices with Batch Effects]()     | Tutorial on how to remove batch effects across multiple slices |\n| [DDP Training]()                        | Tutorial on how to use multi-GPUs on large datasets          |\n\n\n## Citation\nTBD\n\n> If you want to repeat our benchmarks and case studies, please check the [**benchmark**](./benchmark/README.md) and [**experiments**](./experiments/README.md) folder.\n\n## FAQ\n1. `CUDA out of memory` error\n\nWe do all experiments on A100-80G GPUs. We observed `model.train_gene_select()` may use ~40GB for 700,000 cells with 1,000 genes. If your GPU do not have enough memory, you can try running with CPU.\n\n\n## Acknowledgement\nWe thank following great open-source projects for their help or inspiration:\n\n- [SimCLR](https://github.com/sthalles/SimCLR)\n- [vit-pytorch](https://github.com/lucidrains/vit-pytorch)\n- [lightly](https://github.com/lightly-ai/lightly)\n- [scib](https://github.com/theislab/scib)\n- [rapids_singlecell](https://github.com/scverse/rapids_singlecell/)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Spatial-omics data embedding and analysis",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://decipher.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/gao-lab/decipher",
        "Repository": "https://github.com/gao-lab/decipher"
    },
    "split_keywords": [
        "bioinformatics",
        " transformer",
        " single-cell",
        " spatial-omics",
        " deep-learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1b9ec1a9647312c1cfacf1aaf2baaf983c1e7bb246759b77f1e7f1de235f3909",
                "md5": "1171d289544c2e549e43349ffee70cf1",
                "sha256": "9cb3181d047e7cb734de3ec892d896ecfb4d70ffb6d84c331e612d1aabed0f56"
            },
            "downloads": -1,
            "filename": "cell_decipher-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1171d289544c2e549e43349ffee70cf1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 55506,
            "upload_time": "2024-10-20T13:52:11",
            "upload_time_iso_8601": "2024-10-20T13:52:11.544679Z",
            "url": "https://files.pythonhosted.org/packages/1b/9e/c1a9647312c1cfacf1aaf2baaf983c1e7bb246759b77f1e7f1de235f3909/cell_decipher-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22c86ce1aa99ce78370aee849413f4c62d02e8197a930ed9dad2bcc3a3ed3f28",
                "md5": "43607ded65395ebf60ec4ad72bc8bcfa",
                "sha256": "a31cefdb25582c0252894a409dfe4dd030ad33f526a801b9945c9c0c7504102d"
            },
            "downloads": -1,
            "filename": "cell_decipher-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "43607ded65395ebf60ec4ad72bc8bcfa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 44512,
            "upload_time": "2024-10-20T13:52:13",
            "upload_time_iso_8601": "2024-10-20T13:52:13.615523Z",
            "url": "https://files.pythonhosted.org/packages/22/c8/6ce1aa99ce78370aee849413f4c62d02e8197a930ed9dad2bcc3a3ed3f28/cell_decipher-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-20 13:52:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gao-lab",
    "github_project": "decipher",
    "github_not_found": true,
    "lcname": "cell-decipher"
}
        
Elapsed time: 0.39449s