scgraphne


Namescgraphne JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/sldyns/scGraphNE
SummaryscGraphNE: a novel scRNA-seq representation learning method based on graph node embedding
upload_time2023-08-05 08:06:57
maintainerKun Qian
docs_urlNone
authorKun Qian, Ting Li
requires_python
licenseMIT Licence
keywords single-cell rna-sequencing graph node embedding dimensionality reduction
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # scGraphNE: a novel scRNA-seq representation learning method based on graph node embedding

## Overview

![alt](overview.png)

scGraphNE is a graph autoencoder network where the encoder based on multi-layer graph convolutional networks extracts high-order representations of cells and genes from the cell-gene bipartite graph, and the decoder based on the ZINB model uses these representations to reconstruct the gene expression matrix. By virtue of a model-driven self-supervised training paradigm, scGraphNE can effectively learn low-dimensional representations of both cells and genes, amenable to diverse downstream analytical tasks.

## Installation

Please install `scGraphNE` from pypi with:

```bash
pip install scgraphne
```

Or clone this repository and use

```bash
pip install -e .
```

in the root of this repository.

## Quick start

Load the data to be analyzed:

```python
import scanpy as sc

adata = sc.AnnData(data)
```



Perform data pre-processing:

```python
# Basic filtering
sc.pp.filter_genes(adata, min_cells=3)
sc.pp.filter_cells(adata, min_genes=200)

adata.raw = adata.copy()

# Total-count normlize, logarithmize the data, calculate the gene size factor 
sc.pp.normalize_per_cell(adata)
adata.obs['cs_factor'] = adata.obs.n_counts / np.median(adata.obs.n_counts)
sc.pp.log1p(adata)
adata.var['gs_factor'] = np.max(adata.X, axis=0, keepdims=True).reshape(-1)
```

Run the scGraphNE method:

```python
from scgraphne import run_scgraphne
adata = run_scgraphne(adata)
```

The output adata contains the cell embeddings in `adata.obsm['feat']` and the gene embeddings in `adata.obsm['feat']`. The embeddings can be used as input of other downstream analyses.

Please refer to `tutorial.ipynb` for a detailed description of scGraphNE's usage.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sldyns/scGraphNE",
    "name": "scgraphne",
    "maintainer": "Kun Qian",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "kun_qian@foxmail.com",
    "keywords": "single-cell RNA-sequencing,Graph node embedding,Dimensionality reduction",
    "author": "Kun Qian, Ting Li",
    "author_email": "kun_qian@foxmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cc/80/ccbe44c9fcd9f9d1d28b8814a8bb1a68a233e1166581104f9a800357681d/scgraphne-0.1.1.tar.gz",
    "platform": "any",
    "description": "# scGraphNE: a novel scRNA-seq representation learning method based on graph node embedding\n\n## Overview\n\n![alt](overview.png)\n\nscGraphNE is a graph autoencoder network where the encoder based on multi-layer graph convolutional networks extracts high-order representations of cells and genes from the cell-gene bipartite graph, and the decoder based on the ZINB model uses these representations to reconstruct the gene expression matrix. By virtue of a model-driven self-supervised training paradigm, scGraphNE can effectively learn low-dimensional representations of both cells and genes, amenable to diverse downstream analytical tasks.\n\n## Installation\n\nPlease install `scGraphNE` from pypi with:\n\n```bash\npip install scgraphne\n```\n\nOr clone this repository and use\n\n```bash\npip install -e .\n```\n\nin the root of this repository.\n\n## Quick start\n\nLoad the data to be analyzed:\n\n```python\nimport scanpy as sc\n\nadata = sc.AnnData(data)\n```\n\n\n\nPerform data pre-processing:\n\n```python\n# Basic filtering\nsc.pp.filter_genes(adata, min_cells=3)\nsc.pp.filter_cells(adata, min_genes=200)\n\nadata.raw = adata.copy()\n\n# Total-count normlize, logarithmize the data, calculate the gene size factor \nsc.pp.normalize_per_cell(adata)\nadata.obs['cs_factor'] = adata.obs.n_counts / np.median(adata.obs.n_counts)\nsc.pp.log1p(adata)\nadata.var['gs_factor'] = np.max(adata.X, axis=0, keepdims=True).reshape(-1)\n```\n\nRun the scGraphNE method:\n\n```python\nfrom scgraphne import run_scgraphne\nadata = run_scgraphne(adata)\n```\n\nThe output adata contains the cell embeddings in `adata.obsm['feat']` and the gene embeddings in `adata.obsm['feat']`. The embeddings can be used as input of other downstream analyses.\n\nPlease refer to `tutorial.ipynb` for a detailed description of scGraphNE's usage.\n\n",
    "bugtrack_url": null,
    "license": "MIT Licence",
    "summary": "scGraphNE: a novel scRNA-seq representation learning method based on graph node embedding",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/sldyns/scGraphNE"
    },
    "split_keywords": [
        "single-cell rna-sequencing",
        "graph node embedding",
        "dimensionality reduction"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fdefc25e192e697dd3754da71342a550574c4533b9dc342309dabfd7c263fea3",
                "md5": "d7187fa701ec8b406a6b9d0b1aa968d3",
                "sha256": "1924bf18fdfbb828502d83e97e4a5edb610d0e2050769b98e0d304ffd102379a"
            },
            "downloads": -1,
            "filename": "scgraphne-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7187fa701ec8b406a6b9d0b1aa968d3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16719,
            "upload_time": "2023-08-05T08:06:54",
            "upload_time_iso_8601": "2023-08-05T08:06:54.282403Z",
            "url": "https://files.pythonhosted.org/packages/fd/ef/c25e192e697dd3754da71342a550574c4533b9dc342309dabfd7c263fea3/scgraphne-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc80ccbe44c9fcd9f9d1d28b8814a8bb1a68a233e1166581104f9a800357681d",
                "md5": "ea783a8d34e02a2a05b9a12552cbe086",
                "sha256": "ded6821d1e61ba7b097f7e08095fed995bebb801b2be34083eb4527672c6ab08"
            },
            "downloads": -1,
            "filename": "scgraphne-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ea783a8d34e02a2a05b9a12552cbe086",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13847,
            "upload_time": "2023-08-05T08:06:57",
            "upload_time_iso_8601": "2023-08-05T08:06:57.258946Z",
            "url": "https://files.pythonhosted.org/packages/cc/80/ccbe44c9fcd9f9d1d28b8814a8bb1a68a233e1166581104f9a800357681d/scgraphne-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-05 08:06:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sldyns",
    "github_project": "scGraphNE",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "scgraphne"
}
        
Elapsed time: 1.21194s