An interactive Protein-Protein Interaction (PPI) visualization tool built with Shiny for Python. This application allows users to explore interaction networks from high-quality datasets like BioPlex and HuRI.
- Interactive Network Visualization: Uses
vis-networkfor high-performance graph rendering. - Multiple Datasets: Supports BioPlex 293, BioPlex HCT116, and HuRI.
- Gene-Centric Exploration: Search for specific genes and visualize their first-degree interaction partners.
- REST API Endpoint: Programmatic access to generate subnetwork HTML fragments.
- Dockerized Deployment: Ready for production with Docker and Uvicorn.
├── app.py # Main Shiny application & Starlette API
├── config.py # Global configurations and data initialization
├── data_loader.py # Logic for reading PPI datasets and neighbor retrieval
├── graph_utils.py # NetworkX and Pyvis graph generation utilities
├── ui_modules.py # Modular UI component definitions
├── server_modules.py # Server-side reactive logic
├── update_data.py # Script for data maintenance
├── generate_static_graph.py # CLI tool for static graph generation
├── Dockerfile # Container configuration
├── deploy.sh # Deployment automation script
├── data/ # PPI dataset storage (TSV/CSV)
├── lib/ # Local JS/CSS dependencies (vis-network, tom-select)
└── www/ # Static assets and generated graph cache
As per the project guidelines, use conda to manage the environment and packages:
# Create and activate the environment
conda create -n bio_env python=3.12
conda activate bio_env
# Install dependencies from conda-forge
conda install -c conda-forge shiny pandas networkx pyvis uvicornRun the application locally using shiny:
shiny run app.py --reloadOr via uvicorn (as configured in the Dockerfile):
uvicorn app:app --host 0.0.0.0 --port 5070The project includes a Dockerfile and deploy.sh for easy deployment.
chmod +x deploy.sh
./deploy.shThe application will be accessible at http://localhost:5070/ppi.
The application exposes a subnetwork generation endpoint:
GET /graph/{dataset}/{gene}
Example: http://localhost:5070/ppi/graph/huri/TP53
This project is licensed under the MIT License.