SideEffectNet addresses the challenges of understanding drug safety and interactions. With the increasing complexity of pharmacological data, healthcare professionals and researchers often struggle to analyze drug-side effect relationships, assess risks, and identify safer alternatives. This project provides a streamlined solution for visualizing and analyzing drug safety data, enabling informed decision-making in clinical and research settings.
How People Can Use It
1. Drug Risk Analysis:
- Analyze risk scores and side effects for individual drugs.
- Understand the potential risks associated with specific medications.
2. Drug Interaction Analysis:
- Identify shared side effects between drug combinations.
- Detect potential risks when combining multiple medications.
3. Risk Visualization:
- Generate interactive bar charts and network graphs to visualize drug risk scores and relationships.
- Explore the connections between drugs and their associated side effects.
4. Polypharmacy Risk Detection:
- Assess risks when combining multiple drugs.
- Identify overlapping side effects and calculate combined risk scores.
5. Hypothesis Generation:
- Use AI-powered tools to generate scientifically validated hypotheses for drug combinations.
- Support pharmacological research and decision-making with data-driven insights.
How It Makes Tasks Easier and Safer:
1. Improved Decision-Making:
- Provides clear visualizations and risk scores to help healthcare professionals make safer prescribing decisions.
2. Enhanced Research:
- Enables researchers to explore drug-side effect relationships and generate hypotheses for further study.
3. Time-Saving:
- Automates the analysis and visualization of complex pharmacological data, reducing manual effort.
4. Safety Assurance:
- Helps detect potential risks in drug combinations, ensuring patient safety in clinical practice.
Building SideEffectNet was an exciting journey, but it came with its share of challenges. One of the most significant hurdles was ensuring compatibility between the various technologies and datasets used in the project. Here are some of the key challenges and how I overcame them:
1. Handling Large and Complex Datasets
The raw datasets, such as meddra_all_se.tsv and meddra_freq.tsv, contained hundreds and thousands of entries with inconsistent formatting and missing values. Processing these datasets efficiently while maintaining data integrity was a major challenge.
Solution:
- I implemented robust data cleaning and preprocessing pipelines using Python's Pandas library.
- Automated scripts were created to handle missing values, normalize drug names, and filter irrelevant data.
- This ensured that the processed datasets (drug_risk_scores.csv and side_effects_clean.csv) were clean, structured, and ready for analysis.
2. Streamlit Deployment Issues
Deploying the Streamlit dashboard on Streamlit Cloud initially faced compatibility issues with certain libraries, such as st-aggrid. This blocked the deployment process.
Solution:
- I replaced st-aggrid with Streamlit's native st.dataframe for displaying tables, ensuring compatibility with Streamlit Cloud.
- Dependencies were carefully reviewed and updated to match the platform's requirements.
3. Optimizing Graph Construction
Building a complete knowledge graph with all nodes and edges was computationally expensive and led to performance bottlenecks.
Solution:
- Implemented a subgraph-based approach to dynamically construct graphs based on user input or specific queries.
- This reduced computational overhead and improved the responsiveness of the dashboard and visualizations.
4. Visualizing Complex Relationships
- Creating interactive visualizations for drug-side effect relationships was challenging due to the sheer number of nodes and edges in the knowledge graph. Rendering large graphs often led to performance issues.
Solution:
- Adopted a subgraph-based approach, dynamically constructing smaller, targeted graphs based on user input.
- PyVis and Plotly were used to create interactive visualizations, and advanced physics configurations were applied to optimize graph rendering.
- This approach improved performance while maintaining the accuracy and depth of the visualizations.