TrimNN


NameTrimNN JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/yuyang-0825/TrimNN
SummaryTrimNN: an empowered bottom-up approach designed to estimate the prevalence of sizeable CC motifs in a triangulated cell graph
upload_time2024-11-01 18:56:26
maintainerNone
docs_urlNone
authorYang Yu
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # A bottom-up strategy to explore sizable cellular community motifs as building blocks of multicellular organization using TrimNN
<img src="https://img.shields.io/badge/TrimNN-v0.0.1-blue"> <img src="https://img.shields.io/badge/Platform-Linux-blue"> <img src="https://img.shields.io/badge/Language-python3-blue"> <img src="https://img.shields.io/badge/License-MIT-blue">

<p align="center">
  <img height="450" width="750" src="https://github.com/yuyang-0825/TrimNN/blob/main/figure/Figure.png"/>
</p>

**Triangulation cellular community Motif Neural Network (TrimNN)**, an empowered bottom-up approach designed to estimate the prevalence of sizeable CC motifs in a triangulated cell graph. Spatially resolved transcriptomics, e.g., STARmap PLUS and 10X Xenium, and spatial proteomics data, e.g., MIBI-TOF and CODEX, are used as input to generate corresponding cellular community. After process of subgraph matching and pattern growth, TrimNN estimates different Size-K overrepresented CC motifs. These CC motifs can be biologically interpreted in the downstream analysis, including statistical summarization, cellular level interpretation within cell-cell communication analysis, gene level interpretation within differentially expressed gene analysis, e.g., GO enrichment analysis and pathway enrichment analysis, and phenotypical analysis within the availability of phenotypical information, e.g., survival curve and supervised analysis. 


## System Requirements
### Install  Dependencies
``` 
 pip install -r requirements.txt
```

### Install TrimNN from GitHub
```
git clone https://yuyang-0825/TrimNN
cd TrimNN
```
## Data Preparation

### Input Spatial Omics Data
A spatial omics data should include ```X```, ```Y```(coordinates) and ```cell_type```  columns to generate a cellular community graph. [[example]](https://github.com/yuyang-0825/TrimNN/blob/main/spatial_data/demo_data.csv)

Generate gml file from your input CSV file as TrimNN's input.
```
cd src 
python csv2gml.py --path spatial_data/demo_data.csv
```
* --path: The path of input data.
* The gml file with the same name will appear in the same folder.

 
## Demo

### Function 1: Identify specific size top overrepresented CC motif
To identify the specific size top overrepresented CC motif in the cellular community graph, run:
```
cd src
python specific_size.py -size 3 -k 2 -graph spatial_data/demo_data.gml -celltype 8 -outpath result/
```
##### Command Line Arguments:
*	-size: specific size of CC motif (from 3 to 9).
*	-k: k-hop.
*	-graph: file path for input cellular community graph.
*	-celltype: number of cell types.
*	-outpath: folder path for output result.

### Function 2: Identify all top overrepresented CC motifs
To identify all top overrepresented CC motifs from size3 to size5(default) in the cellular community graph, run:
```
cd src
python all_size.py -size 5 -k 2 -graph spatial_data/demo_data.gml -celltype 8 -outpath result/
```
##### Command Line Arguments:
*	-size: The maximum size of the generated top overrepresented CC motifs.[default: 5] [maximum: 9]
*	-k: k-hop.
*	-graph: file path for input cellular community graph.
*	-celltype: number of cell types.
*	-outpath: folder path for output result.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yuyang-0825/TrimNN",
    "name": "TrimNN",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Yang Yu",
    "author_email": "yykk3@umsystem.edu",
    "download_url": "https://files.pythonhosted.org/packages/d1/2a/972ea46b93167be437568ac4a988076ad7cbd5ea9351b22852ad47d1228b/TrimNN-0.0.1.tar.gz",
    "platform": null,
    "description": "# A bottom-up strategy to explore sizable cellular community motifs as building blocks of multicellular organization using TrimNN\n<img src=\"https://img.shields.io/badge/TrimNN-v0.0.1-blue\"> <img src=\"https://img.shields.io/badge/Platform-Linux-blue\"> <img src=\"https://img.shields.io/badge/Language-python3-blue\"> <img src=\"https://img.shields.io/badge/License-MIT-blue\">\n\n<p align=\"center\">\n  <img height=\"450\" width=\"750\" src=\"https://github.com/yuyang-0825/TrimNN/blob/main/figure/Figure.png\"/>\n</p>\n\n**Triangulation cellular community Motif Neural Network (TrimNN)**, an empowered bottom-up approach designed to estimate the prevalence of sizeable CC motifs in a triangulated cell graph. Spatially resolved transcriptomics, e.g., STARmap PLUS and 10X Xenium, and spatial proteomics data, e.g., MIBI-TOF and CODEX, are used as input to generate corresponding cellular community. After process of subgraph matching and pattern growth, TrimNN estimates different Size-K overrepresented CC motifs. These CC motifs can be biologically interpreted in the downstream analysis, including statistical summarization, cellular level interpretation within cell-cell communication analysis, gene level interpretation within differentially expressed gene analysis, e.g., GO enrichment analysis and pathway enrichment analysis, and phenotypical analysis within the availability of phenotypical information, e.g., survival curve and supervised analysis. \n\n\n## System Requirements\n### Install  Dependencies\n``` \n pip install -r requirements.txt\n```\n\n### Install TrimNN from GitHub\n```\ngit clone https://yuyang-0825/TrimNN\ncd TrimNN\n```\n## Data Preparation\n\n### Input Spatial Omics Data\nA spatial omics data should include ```X```, ```Y```(coordinates) and ```cell_type```  columns to generate a cellular community graph. [[example]](https://github.com/yuyang-0825/TrimNN/blob/main/spatial_data/demo_data.csv)\n\nGenerate gml file from your input CSV file as TrimNN's input.\n```\ncd src \npython csv2gml.py --path spatial_data/demo_data.csv\n```\n* --path: The path of input data.\n* The gml file with the same name will appear in the same folder.\n\n \n## Demo\n\n### Function 1: Identify specific size top overrepresented CC motif\nTo identify the specific size top overrepresented CC motif in the cellular community graph, run:\n```\ncd src\npython specific_size.py -size 3 -k 2 -graph spatial_data/demo_data.gml -celltype 8 -outpath result/\n```\n##### Command Line Arguments:\n*\t-size: specific size of CC motif (from 3 to 9).\n*\t-k: k-hop.\n*\t-graph: file path for input cellular community graph.\n*\t-celltype: number of cell types.\n*\t-outpath: folder path for output result.\n\n### Function 2: Identify all top overrepresented CC motifs\nTo identify all top overrepresented CC motifs from size3 to size5(default) in the cellular community graph, run:\n```\ncd src\npython all_size.py -size 5 -k 2 -graph spatial_data/demo_data.gml -celltype 8 -outpath result/\n```\n##### Command Line Arguments:\n*\t-size: The maximum size of the generated top overrepresented CC motifs.[default: 5] [maximum: 9]\n*\t-k: k-hop.\n*\t-graph: file path for input cellular community graph.\n*\t-celltype: number of cell types.\n*\t-outpath: folder path for output result.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "TrimNN: an empowered bottom-up approach designed to estimate the prevalence of sizeable CC motifs in a triangulated cell graph",
    "version": "0.0.1",
    "project_urls": {
        "Homepage": "https://github.com/yuyang-0825/TrimNN"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31788ea2d4d0bc7424fdd83f4a39d44fbec25d8c0849a79e305a5d4c917fd11c",
                "md5": "bb9cdb58f69295aaa83567cd5afe627a",
                "sha256": "06aeb91bf26fdfa6f6bc8841b74b61d2a4e9b163af6ba31e622c626e3e2be28a"
            },
            "downloads": -1,
            "filename": "TrimNN-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bb9cdb58f69295aaa83567cd5afe627a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 3319,
            "upload_time": "2024-11-01T18:56:25",
            "upload_time_iso_8601": "2024-11-01T18:56:25.219830Z",
            "url": "https://files.pythonhosted.org/packages/31/78/8ea2d4d0bc7424fdd83f4a39d44fbec25d8c0849a79e305a5d4c917fd11c/TrimNN-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d12a972ea46b93167be437568ac4a988076ad7cbd5ea9351b22852ad47d1228b",
                "md5": "9783e8ca5363ee2372100c3f4d0f5c6c",
                "sha256": "a9b32f402cd60b5ea8adb12f8a9912d985f20d08353e76e51418b4aed693bdac"
            },
            "downloads": -1,
            "filename": "TrimNN-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "9783e8ca5363ee2372100c3f4d0f5c6c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 3346,
            "upload_time": "2024-11-01T18:56:26",
            "upload_time_iso_8601": "2024-11-01T18:56:26.688265Z",
            "url": "https://files.pythonhosted.org/packages/d1/2a/972ea46b93167be437568ac4a988076ad7cbd5ea9351b22852ad47d1228b/TrimNN-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-01 18:56:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yuyang-0825",
    "github_project": "TrimNN",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "trimnn"
}
        
Elapsed time: 1.11645s