# csppinet
csppinet: A Python package for context-specific biological network construction and analysis based on omics data
```shell
██████ ███████ ██████ ██████ ██ ███ ██ ███████ ████████
██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██
██ ███████ ██████ ██████ ██ ██ ██ ██ █████ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ███████ ██ ██ ██ ██ ████ ███████ ██
```
version 1.0
- [Installation](#installing)
- [Overview](#overview)
- [Workflow](#workflow)
- [Command-line interface](#command-line-interface)
- [Python library usage](#python-library-usage)
- [Examples](#examples)
- [Article](#article)
# Installing
To build and install from source, run
```shell
python setup.py install
```
You can also install from pip with
```shell
pip install csppinet
```
# Overview
csppinet construct a context-specific biological network based on omics data. From omics data, such as temporal transcriptome data, csppinet generates a context-specific network for each biological condition. It provides both an easy-to-use object-oriented Python API and a command-line interface (CLI) for context-specific network construction and post-analysis.
In order to fully leverage the capabilities of our package and obtain comprehensive insights, it is crucial to have a diverse and substantial number of biological conditions available for analysis, because the main function to determine a protein activity is based on [three-sigma method](https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/pmic.201200277).
# Workflow
csppinet contains a flowchart designed to provide a structured context-specific (cs) network based on omics data, as well metrics and comparative reports.
csppinet features include:
1. The construction of a context-specific network based on omics data. We account for gene activity across biological conditions, and then take this activity for each network interaction, where it remains if both genes are active;
2. The calculation of network metrics for the genes for each context-specific network;
3. The calculation of network metrics for each context-specific network.
# Command-line interface
csppinet can be executed from the command line using the csppinet command. It takes the network and the gene expression file, as well the number of threads (essential for large networks).
```
usage: csppinet [-h] --network_file network.csv --expression_file gene_expression.csv --method METHOD --value VALUE --threads THREADS
optional arguments:
-h, --help show this help message and exit
--network_file A csv file containing the network
--expression_file A csv file containing the expression of the genes per condition
--method A method to determine protein expression. Choose between "3-sigma", "percentile" or "pre-threshold".
--value A threshold value for "pre-threshold" or "percentile" method. In the 'pre-threshold' method, the threshold value represents an absolute threshold for gene expression. On the other hand, in the 'percentile' method, the threshold value corresponds to the percentile cutoff. For example, a value of 5 represents the 5th percentile, while a value of 25 represents the 25th percentile or the first quartile.
--threads Number of threads for multiprocessing. Considere it for large networks
example: python3 csppinet.py --network_file network.csv --expression_file gene_expession.csv --method pre-threshold --value 2 --threads 2
```
In your current working folder, csppinet generates the following outputs:
1. A csv file containing the context-specific network for each biological condition ("csppinet_csnetwork" prefix);
2. A csv file containing the network metrics for the genes of each context-specific network ("csppinet_GenesMetrics" prefix);
3. A txt file containing the network metrics report file for each cs network ("csppinet_Reports" prefix).
4. A csv file for the metrics Betweenness Centrality (BC), Closeness Centrality (CC) and Degree for all biological conditions in expression file.
# Python library usage
csppinet generates the files in the current working directory.
To use as a Python library
```python
import csppinet
# csppinet arguments. Input files should be in .csv extension
network = '/opt/data/network.csv'
exp = '/opt/data/expression_file.csv'
threads = 10
method = "percentile"
value = 25
#construction
csppinet.construction(network,exp,threads,method,value)
#network metrics
csppinet.network_metrics(exp)
```
# Examples
In these examples we will use as input the network of **Saccharomyces cerevisiae** from STRINGdb with "combined_score" > 900 together with gene expression data from the article by de Carvalho, et al. 2021 (https://doi.org/10.1093/femsyr/foab030). You could find the script in the Article section (next one).
```shell
csppinet --network_file STRING_yeast.csv --expression_file expression_deCarvalho2021.csv --threads 10 --method pre-threshold --value 5
```
# Article
For application examples, scripts and datasets access the package article on BioRxiv.
Raw data
{
"_id": null,
"home_page": "https://github.com/lmigueel/csppinet/",
"name": "csppinet",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "bioinformatics,context-specific network,PPI network,interactome,network analysis,omics",
"author": "Luca Miguel de Carvalho",
"author_email": "lucasmigueel@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b5/71/d47b2444e2625ca66ba8cef38de22e1c1a7ef7fdabf7818bf499091b1096/csppinet-1.2.tar.gz",
"platform": null,
"description": "# csppinet\ncsppinet: A Python package for context-specific biological network construction and analysis based on omics data\n\n```shell\n \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \n\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \n\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \n\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \n \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \n ```\n version 1.0\n\n\n- [Installation](#installing)\n- [Overview](#overview)\n- [Workflow](#workflow)\n- [Command-line interface](#command-line-interface)\n- [Python library usage](#python-library-usage)\n- [Examples](#examples)\n- [Article](#article)\n\n# Installing\n\nTo build and install from source, run\n\n```shell\npython setup.py install\n```\nYou can also install from pip with\n\n```shell\npip install csppinet\n``` \n\n# Overview\n\ncsppinet construct a context-specific biological network based on omics data. From omics data, such as temporal transcriptome data, csppinet generates a context-specific network for each biological condition. It provides both an easy-to-use object-oriented Python API and a command-line interface (CLI) for context-specific network construction and post-analysis. \n\nIn order to fully leverage the capabilities of our package and obtain comprehensive insights, it is crucial to have a diverse and substantial number of biological conditions available for analysis, because the main function to determine a protein activity is based on [three-sigma method](https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/10.1002/pmic.201200277).\n\n# Workflow\n\ncsppinet contains a flowchart designed to provide a structured context-specific (cs) network based on omics data, as well metrics and comparative reports.\n\ncsppinet features include:\n\n 1. The construction of a context-specific network based on omics data. We account for gene activity across biological conditions, and then take this activity for each network interaction, where it remains if both genes are active;\n 2. The calculation of network metrics for the genes for each context-specific network;\n 3. The calculation of network metrics for each context-specific network.\n\n# Command-line interface\n\ncsppinet can be executed from the command line using the csppinet command. It takes the network and the gene expression file, as well the number of threads (essential for large networks). \n\n```\nusage: csppinet [-h] --network_file network.csv --expression_file gene_expression.csv --method METHOD --value VALUE --threads THREADS\n\noptional arguments:\n -h, --help show this help message and exit\n --network_file A csv file containing the network\n --expression_file A csv file containing the expression of the genes per condition\n --method A method to determine protein expression. Choose between \"3-sigma\", \"percentile\" or \"pre-threshold\". \n --value A threshold value for \"pre-threshold\" or \"percentile\" method. In the 'pre-threshold' method, the threshold value represents an absolute threshold for gene expression. On the other hand, in the 'percentile' method, the threshold value corresponds to the percentile cutoff. For example, a value of 5 represents the 5th percentile, while a value of 25 represents the 25th percentile or the first quartile. \n --threads Number of threads for multiprocessing. Considere it for large networks\n\nexample: python3 csppinet.py --network_file network.csv --expression_file gene_expession.csv --method pre-threshold --value 2 --threads 2\n```\nIn your current working folder, csppinet generates the following outputs:\n\n 1. A csv file containing the context-specific network for each biological condition (\"csppinet_csnetwork\" prefix);\n 2. A csv file containing the network metrics for the genes of each context-specific network (\"csppinet_GenesMetrics\" prefix);\n 3. A txt file containing the network metrics report file for each cs network (\"csppinet_Reports\" prefix).\n 4. A csv file for the metrics Betweenness Centrality (BC), Closeness Centrality (CC) and Degree for all biological conditions in expression file.\n \n# Python library usage\n\ncsppinet generates the files in the current working directory. \n\nTo use as a Python library\n\n```python\n\nimport csppinet\n\n# csppinet arguments. Input files should be in .csv extension \nnetwork = '/opt/data/network.csv'\nexp = '/opt/data/expression_file.csv'\nthreads = 10\nmethod = \"percentile\"\nvalue = 25 \n\n#construction\ncsppinet.construction(network,exp,threads,method,value)\n\n#network metrics\ncsppinet.network_metrics(exp)\n\n```\n\n# Examples\n\nIn these examples we will use as input the network of **Saccharomyces cerevisiae** from STRINGdb with \"combined_score\" > 900 together with gene expression data from the article by de Carvalho, et al. 2021 (https://doi.org/10.1093/femsyr/foab030). You could find the script in the Article section (next one).\n\n```shell\ncsppinet --network_file STRING_yeast.csv --expression_file expression_deCarvalho2021.csv --threads 10 --method pre-threshold --value 5\n```\n\n# Article\n\nFor application examples, scripts and datasets access the package article on BioRxiv.\n\n",
"bugtrack_url": null,
"license": "GNU General Public License v3.0",
"summary": "A Python package for context-specific protein-protein interaction network construction and analysis based on omics data.",
"version": "1.2",
"project_urls": {
"Homepage": "https://github.com/lmigueel/csppinet/"
},
"split_keywords": [
"bioinformatics",
"context-specific network",
"ppi network",
"interactome",
"network analysis",
"omics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a18895e9f7a1e3ac0c863d701949764083c7e3db5236dcf0738004ce60929b6e",
"md5": "139c19ee913a160b6f8f732db388f74b",
"sha256": "ad0848630163295dde682d4b0ff2798186897a2a9f989091f37c9e7aa5131ea1"
},
"downloads": -1,
"filename": "csppinet-1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "139c19ee913a160b6f8f732db388f74b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 9900,
"upload_time": "2023-05-23T21:34:00",
"upload_time_iso_8601": "2023-05-23T21:34:00.272029Z",
"url": "https://files.pythonhosted.org/packages/a1/88/95e9f7a1e3ac0c863d701949764083c7e3db5236dcf0738004ce60929b6e/csppinet-1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b571d47b2444e2625ca66ba8cef38de22e1c1a7ef7fdabf7818bf499091b1096",
"md5": "ba8671ba01d28ad22636e296265e56d9",
"sha256": "399775d4975bd885333952576bfa1ef20b32101c5fa5c4ad387e799ef9764f16"
},
"downloads": -1,
"filename": "csppinet-1.2.tar.gz",
"has_sig": false,
"md5_digest": "ba8671ba01d28ad22636e296265e56d9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 10360,
"upload_time": "2023-05-23T21:34:04",
"upload_time_iso_8601": "2023-05-23T21:34:04.331074Z",
"url": "https://files.pythonhosted.org/packages/b5/71/d47b2444e2625ca66ba8cef38de22e1c1a7ef7fdabf7818bf499091b1096/csppinet-1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-23 21:34:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lmigueel",
"github_project": "csppinet",
"github_not_found": true,
"lcname": "csppinet"
}