Skip to main content

csppinet

csppinet: A Python package for context-specific biological network construction and analysis based on omics data

 ██████ ███████ ██████  ██████  ██ ███    ██ ███████ ████████ 
██      ██      ██   ██ ██   ██ ██ ████   ██ ██         ██    
██      ███████ ██████  ██████  ██ ██ ██  ██ █████      ██    
██           ██ ██      ██      ██ ██  ██ ██ ██         ██    
 ██████ ███████ ██      ██      ██ ██   ████ ███████    ██ 
    version 1.0

Installing

To build and install from source, run

python setup.py install

You can also install from pip with

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.

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

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).

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.

Metadata

Release files for csppinet 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csppinet 1.2
File Size Uploaded Provenance
csppinet-1.2.tar.gz 10.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for csppinet 1.2
File Interpreter ABI Platform
csppinet-1.2-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / csppinet-1.2.tar.gz

Download URL csppinet-1.2.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
399775d4975bd885333952576bfa1ef20b32101c5fa5c4ad387e799ef9764f16
BLAKE2b-256 checksum
How to use checksums
b571d47b2444e2625ca66ba8cef38de22e1c1a7ef7fdabf7818bf499091b1096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / csppinet-1.2-py3-none-any.whl

Download URL csppinet-1.2-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad0848630163295dde682d4b0ff2798186897a2a9f989091f37c9e7aa5131ea1
BLAKE2b-256 checksum
How to use checksums
a18895e9f7a1e3ac0c863d701949764083c7e3db5236dcf0738004ce60929b6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for csppinet 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page