Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.76 KB

README.md

File metadata and controls

61 lines (44 loc) · 1.76 KB

PPI-net-builder

PyPI version Python version License

PPI-net-builder is a Python package for constructing and analyzing protein-protein interaction (PPI) networks using the STRING-db database.

Features

  • Construct PPI networks from a list of genes.
  • Extract high-modality subnetworks.
  • Perform enrichment analysis on the main network or its subnetworks.
  • Save enrichment plots for visualization.

Installation

Install the package using pip:

pip install ppi-net-builder

Usage

Here is an example demonstrating how to use PPI-net-builder:

from ppi_net_builder import NetworkBuilder

# List of genes to construct the network
genes = ["p53", "BRCA1", "cdk2", "Q99835"]

# Specify the annotation file name (this will be created later)
annot_file_name = "./annotation.csv"

# Initialize the NetworkBuilder
nb = NetworkBuilder(genes,
                    annot_file_name=annot_file_name,
                    add_color_nodes=10)

# Construct a PPI network and find high-modality subnetworks
nb.construct_network()
nb.extract_subnets()
print(nb.subnets)

# Perform enrichment analysis on the main network or subnetworks
enrich_df = nb.get_enrichment_table()
print(enrich_df.head())

# Save enrichment analysis plots
nb.save_enrichment_plot(img_file_name="enrichment.png")

Requirements

  • Python 3.9 or higher
  • Dependencies are automatically installed with the package.

Contributing

Contributions are welcome! Feel free to submit issues or pull requests to improve the package.

License

This project is licensed under the MIT License. See the LICENSE file for details.