Skip to content

Django-based platform for Multiple Myeloma research combining drug discovery tools, PKPD simulation, digital patient twins, and clinical decision support

License

Notifications You must be signed in to change notification settings

andreazedda/bmyCure4MM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

bmyCure4MM 🧬

A comprehensive Django-based platform for Multiple Myeloma research, clinical decision support, and drug discovery.

License: MIT Python 3.10+ Django 4.2+

image

🎯 Overview

bmyCure4MM is an integrated research platform that combines:

  • πŸ”¬ Drug Discovery Tools - Molecular structure analysis, ADME property calculation, and similarity search
  • πŸ’Š PKPD Simulation - Pharmacokinetic/pharmacodynamic modeling for treatment optimization
  • πŸ‘€ Digital Patient Twins - Virtual patient modeling for personalized treatment planning
  • πŸ“Š Clinical Decision Support - Evidence-based scenario management with educational validation
  • πŸ§ͺ Computational Biology - Integration with PDB, molecular visualization, and cheminformatics

Perfect for researchers, clinicians, and students working on multiple myeloma treatment optimization and drug discovery.


✨ Key Features

πŸ”¬ ChemTools - Drug Discovery Suite

  • 3D Molecular Visualization: Interactive py3Dmol-based structure viewer
  • Similarity Search: Find similar compounds using RDKit fingerprints
  • ADME Prediction: Calculate drug-like properties (Lipinski's Rule of Five)
  • PDB Integration: Fetch and analyze protein structures from Protein Data Bank
  • Structure Caching: Fast retrieval of previously analyzed molecules

πŸ’Š Simulator - PKPD Modeling

  • Treatment Optimization: Bayesian optimization with Optuna for finding optimal drug regimens
  • Virtual Patients: 7 clinical archetypes (newly diagnosed, refractory, frail elderly, etc.)
  • Mathematical Models: Differential equation-based tumor growth and drug response models
  • Clinical Scenarios: Educational case studies with comprehensive validation
  • Difficulty Scoring: Auto-calculated complexity for training scenarios

πŸ‘₯ Clinic - Patient Management

  • Patient record management
  • Clinical assessments tracking
  • Treatment history documentation
  • CRUD operations with role-based access

πŸ“š Docs Viewer

  • Multi-language documentation (English/Italian)
  • Markdown rendering with syntax highlighting
  • Search functionality
  • Contextual help system

πŸš€ Quick Start

Prerequisites

  • Python 3.10+
  • Redis (for background tasks)
  • Git

Installation

# Clone the repository
git clone https://github.com/andreazedda/bmyCure4MM.git
cd bmyCure4MM

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your configuration

# Run database migrations
python manage.py migrate

# Create a superuser (admin)
python manage.py createsuperuser

# Install Redis (if not already installed)
# macOS: brew install redis
# Linux: sudo apt-get install redis-server
# Windows: https://github.com/microsoftarchive/redis/releases

Running the Application

Option 1: All services with one command (Recommended)

./start_dev.sh

This starts Redis, Celery, and Django development server automatically.

Option 2: Without background tasks (Development)

export CELERY_TASK_ALWAYS_EAGER=True
python manage.py runserver 8001

Option 3: Docker Compose (Most Portable)

docker-compose up -d

Visit http://127.0.0.1:8001 in your browser.


πŸ“– Documentation

Comprehensive documentation is available in the /docs directory:

Quick Links

Topic Documentation
Getting Started Quickstart Guide
PKPD Simulation Simulator Docs
Patient Twins Digital Twin System
Drug Discovery ChemTools Guide
Mathematical Models PKPD Models
Troubleshooting Common Issues

πŸ—οΈ Project Structure

bmyCure4MM/
β”œβ”€β”€ chemtools/          # Drug discovery and molecular analysis
β”œβ”€β”€ simulator/          # PKPD simulation and optimization
β”œβ”€β”€ clinic/             # Patient management
β”œβ”€β”€ docs_viewer/        # Documentation system
β”œβ”€β”€ modules/            # Standalone analysis modules
β”‚   β”œβ”€β”€ binding_visualizer/
β”‚   └── lipinski_analyzer/
β”œβ”€β”€ pipelines/          # Data processing pipelines
β”œβ”€β”€ lab/                # Research notebooks and experiments
β”œβ”€β”€ docs/               # Comprehensive documentation
β”œβ”€β”€ templates/          # HTML templates
β”œβ”€β”€ static/             # CSS, JavaScript, images
└── tests/              # Test suites

πŸ”¬ Use Cases

For Researchers

  • Evaluate drug candidates using ADME predictions
  • Run PKPD simulations to understand drug kinetics
  • Optimize treatment protocols using virtual patients
  • Analyze protein-ligand interactions

For Clinicians

  • Access evidence-based treatment scenarios
  • Understand drug dosing guidelines and contraindications
  • Learn about risk stratification and patient assessment
  • Review clinical decision support recommendations

For Educators

  • Create educational clinical scenarios with difficulty scoring
  • Teach pharmacology through interactive simulations
  • Demonstrate drug-target interactions with 3D visualization
  • Assess learner understanding through scenario challenges

For Students

  • Learn PKPD concepts through hands-on simulation
  • Practice clinical decision-making with virtual patients
  • Explore drug discovery through molecular analysis
  • Understand mathematical modeling in medicine

πŸ§ͺ Testing

# Run all tests
python manage.py test

# Run specific app tests
python manage.py test simulator
python manage.py test chemtools

# Run with coverage
coverage run --source='.' manage.py test
coverage report

# Run with verbose output
python manage.py test -v 2

Current Test Coverage: 94% (30/32 tests passing)


🀝 Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding features, improving documentation, or suggesting ideas, your help is appreciated.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes and add tests
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to your branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.

Development Setup

# Install dev dependencies
pip install -r requirements.txt

# Run tests before committing
python manage.py test

# Check code style (optional)
ruff check .

πŸ“Š Technology Stack

Backend

  • Django 4.2+ - Web framework
  • Django REST Framework - API development
  • Celery - Asynchronous task queue
  • Redis - Message broker and caching

Scientific Computing

  • NumPy & SciPy - Numerical computing and ODE solving
  • RDKit - Cheminformatics and molecular analysis
  • BioPython - Biological structure parsing
  • Optuna - Bayesian optimization
  • py3Dmol - 3D molecular visualization

Frontend

  • HTMX - Dynamic HTML without JavaScript frameworks
  • Alpine.js - Lightweight reactive components
  • Chart.js - Interactive charts and visualizations
  • Custom CSS - Responsive design

Database

  • SQLite (development) / PostgreSQL (production-ready)

πŸ” Security & Privacy

This repository is prepared for public release with:

  • βœ… No hardcoded credentials or API keys
  • βœ… Environment variable configuration (see .env.example)
  • βœ… No absolute filesystem paths
  • βœ… Comprehensive .gitignore for sensitive files
  • βœ… CSRF protection and secure session handling
  • βœ… SQL injection prevention through Django ORM

Important: Never commit:

  • .env files with real credentials
  • Database files (*.sqlite3, *.db)
  • API keys or secrets
  • User data or media uploads

πŸ“„ License

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

MIT License

Copyright (c) 2024 Andrea Zedda

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

πŸ‘€ Author

Andrea Zedda


πŸ™ Acknowledgments

  • Multiple Myeloma research community
  • Open-source contributors
  • Django and Python communities
  • RDKit and BioPython developers
  • Clinical collaborators and advisors

πŸ“ž Support & Contact


πŸ—ΊοΈ Roadmap

Upcoming Features

  • PostgreSQL migration guide
  • Enhanced API documentation with Swagger/OpenAPI
  • Real-time collaboration features
  • Mobile-responsive interface improvements
  • Integration with external drug databases (DrugBank, ChEMBL)
  • Machine learning models for response prediction
  • Multi-user simulation sessions
  • Export/import clinical scenarios

Research Goals

  • Validate PKPD models against clinical trial data
  • Expand virtual patient library
  • Add more multiple myeloma drugs to library
  • Integrate pharmacogenomics data
  • Develop resistance prediction models

πŸ“ˆ Project Status

Active Development - This project is actively maintained and welcomes contributions.

  • Latest Release: v1.0.0
  • Last Updated: November 2024
  • Test Coverage: 94%
  • Documentation: Comprehensive

⭐ If you find this project useful, please consider giving it a star on GitHub!