Modeling Gene Regulatory Networks in Hematopoietic Stem Cell Fate Decisions
Comparing Classical Numerical Solvers with Physics-Informed Neural Networks
๐Report โข ๐ Extended Report โข ๐ Quick Start โข ๐ Results โข ๐ค Contributing
This repository investigates stem cell differentiation through the lens of computational modeling, specifically focusing on the PU.1-GATA-1 toggle switch that controls blood cell fate decisions. We compare traditional numerical methods with modern machine learning approaches to solve complex biological ODEs.
How do stem cells make irreversible fate decisions? We model the mutual inhibition between transcription factors PU.1 (myeloid commitment) and GATA-1 (erythroid commitment) that determines whether a hematopoietic stem cell becomes a white or red blood cell.
dG/dt = aโPยฒ/(1+Pยฒ) - G (GATA-1 dynamics)
dP/dt = aโGยฒ/(1+Gยฒ) - P (PU.1 dynamics)
A bistable system with nonlinear mutual inhibition
- Classical Methods: LSODA, Radau, Trapezoidal Rule
- Modern ML: Physics-Informed Neural Networks (PINNs)
- Benchmark Analysis: 13 visualizations, 9 performance tables
|
|
|
|
๐ฆ stem-cell-pinns-project/
โ
โโโ ๐ฌ notebooks and codes/ # Core implementations
โ โโโ ๐ LSODA.py # Adaptive step-size solver
โ โโโ ๐ LSODES.r # R-based implementation
โ โโโ ๐ค PINNS.ipynb # Neural network training
โ โโโ โ๏ธ PINNS_VS_Numerical.ipynb # Method comparison
โ โโโ ๐ข Radau.py # Implicit Runge-Kutta
โ โโโ ๐ Trapzoidal.py # Classical explicit method
โ
โโโ ๐ report/ # Project documentation
โ โโโ ๐ค presentation/ # Slides and visuals for presentation
โ โ โโโ Course_Project_Presentation.pdf # Project presentation (PDF)
โ โ โโโ Course_Project_Presentation.pptx # Project presentation (PowerPoint)
โ โโโ ๐ Full_Extended_version.md # Complete analysis (pages)
โ โโโ ๐ Numerical_Report_Team_4.pdf # Main report (4 pages)
โ โโโ ๐ Numerical_Report_Team_4(Latex_Version).tex # Main report (Latex-Code)
โ
โโโ ๐ results/ # Generated visualizations
โ โโโ ๐ both/ # Cross-method comparisons
โ โโโ ๐ case1/ # Symmetric scenario (aโ=aโ=1)
โ โโโ ๐ case2/ # Asymmetric scenario (aโ=5,aโ=10)
โ
โโโ ๐ README.md # This file
# Clone repository
git clone https://github.com/SiefEldinSameh/stem-cell-pinns-project.git
cd stem-cell-pinns-project
# Install dependencies
pip install -r requirements.txt
# Optional: R dependencies
Rscript -e "install.packages(c('deSolve', 'ggplot2', 'dplyr'))"# Individual solver execution
python "notebooks and codes/LSODA.py" # Fastest, adaptive
python "notebooks and codes/Radau.py" # Most accurate
python "notebooks and codes/Trapzoidal.py" # Educational baseline# Launch PINN training interface
jupyter notebook "notebooks and codes/PINNS.ipynb"# Comprehensive benchmarking
jupyter notebook "notebooks and codes/PINNS_VS_Numerical.ipynb"Results automatically save to results/ with organized subdirectories:
case1/โ Symmetric parameter analysiscase2/โ Asymmetric parameter analysisboth/โ Cross-method comparisons
| Method | Accuracy | Speed | Stiffness | Best Use Case |
|---|---|---|---|---|
| ๐ฅ Radau | โญโญโญโญโญ | โญโญโญ | โญโญโญโญโญ | High-precision requirements |
| ๐ฅ LSODA | โญโญโญโญโญ | โญโญโญโญโญ | โญโญโญโญ | General-purpose solver |
| ๐ฅ Trapezoidal | โญโญโญโญ | โญโญโญโญ | โญโญ | Educational/simple cases |
| ๐ค PINN | โญโญโญโญ | โญโญ*โญโญโญ | โญโญโญ | Data integration/real-time |
*Slow training, fast inference
๐ Case 1: Symmetric Parameters (aโ=1, aโ=1)
| Method | MSE (GATA-1) | MSE (PU.1) | Rยฒ Score | Training Time |
|---|---|---|---|---|
| Radau | 2.74ร10โปยนโด |
2.74ร10โปยนโด |
1.0000 |
0.052s |
| LSODA | 1.20ร10โปยนยณ |
1.20ร10โปยนยณ |
1.0000 |
0.002s |
| Trapezoidal | 8.00ร10โปยนโด |
8.00ร10โปยนโด |
1.0000 |
0.004s |
| PINN | 7.26ร10โปยนโฐ |
9.24ร10โปยนโฐ |
0.9997 |
197.7s |
๐ Case 2: Asymmetric Parameters (aโ=5, aโ=10)
| Method | MSE (GATA-1) | MSE (PU.1) | Rยฒ Score | Training Time |
|---|---|---|---|---|
| Radau | 2.32ร10โปยนโด |
1.29ร10โปยนยณ |
1.0000 |
0.052s |
| LSODA | 1.45ร10โปยนยณ |
2.10ร10โปยนยณ |
1.0000 |
0.003s |
| Trapezoidal | 1.14ร10โปโธ |
4.10ร10โปโท |
1.0000 |
0.006s |
| PINN | 4.70ร10โปโธ |
5.90ร10โปโท |
1.0000 |
370.6s |
graph TD
A[Choose Your Method] --> B{Primary Goal?}
B -->|Maximum Accuracy| C[๐ฏ Radau Method]
B -->|Fastest Results| D[โก LSODA Solver]
B -->|Learning/Teaching| E[๐ Trapezoidal Rule]
B -->|Data Integration| F[๐ค PINN Approach]
C --> C1[Machine precision<br/>Stiff systems<br/>Critical applications]
D --> D1[General purpose<br/>Fast prototyping<br/>Parameter sweeps]
E --> E1[Educational use<br/>Simple systems<br/>Method comparison]
F --> F2[Experimental data<br/>Real-time inference<br/>Parameter uncertainty]
style A fill:#e1f5fe
style C fill:#c8e6c9
style D fill:#fff3e0
style E fill:#f3e5f5
style F fill:#ffebee
Hematopoietic Stem Cell
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Bistable โ
โ Toggle Switch โ
โโโโโโโฌโโโโโโฌโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโ
โ PU.1โ โ โ GATA-1โ โ
โ GATA-1โ โ โ PU.1โ โ
โโโโโโโโโโโ โโโโโโโโโโโ
โ โ
โผ โผ
Myeloid Cells Erythroid Cells
(White Blood) (Red Blood)
| Disease | Disrupted Factor | Computational Insight |
|---|---|---|
| Acute Myeloid Leukemia | PU.1 overexpression | Asymmetric parameter analysis |
| Polycythemia Vera | GATA-1 amplification | Bistability breakdown modeling |
| Aplastic Anemia | Both factors reduced | System stability analysis |
- Commitment Time: 1.2-2.5 hours (parameter dependent)
- Switch Sensitivity: Higher in asymmetric cases
- Therapeutic Targets: Transcription factor balance restoration
๐ก All plots are available in the
results/directory in publication-ready quality
|
Minimum Configuration
|
Recommended Setup
|
# Core Scientific Computing
numpy >= 1.21.0 # Numerical operations
scipy >= 1.7.0 # Scientific algorithms
matplotlib >= 3.5.0 # Visualization
pandas >= 1.3.0 # Data manipulation
# Machine Learning
torch >= 1.11.0 # Neural networks
torchvision >= 0.12.0 # Vision utilities
# Interactive Computing
jupyter >= 1.0.0 # Notebook environment
ipykernel >= 6.0.0 # Jupyter kernel- GPU Acceleration: Enable CUDA for PINN training
- Vectorization: Batch operations for inference
- Parallel Computing: Multi-core parameter sweeps
- Memory Management: Efficient tensor operations
- Systems Biology: Gene regulatory network modeling
- Numerical Methods: ODE solver comparison and selection
- Machine Learning: Physics-informed neural networks
- Scientific Computing: Benchmarking and validation
- Step-by-step Implementation: Well-commented code
- Mathematical Derivations: Complete in extended report
- Biological Context: Real-world relevance
- Comparative Analysis: Method trade-offs discussion
- Method Development: Template for new solver comparison
- Biological Modeling: Extensible to other toggle switches
- Parameter Studies: Systematic exploration framework
- Clinical Translation: Disease modeling foundation
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-solver) - ๐ Commit your changes (
git commit -m 'Add amazing solver') - ๐ค Push to the branch (
git push origin feature/amazing-solver) - ๐ Open a Pull Request
- Use GitHub Issues for bug reports
- Include system information and error traces
- Provide minimal reproducible examples
- Tag with appropriate labels (bug/enhancement/question)
- New Solvers: Additional numerical methods
- Biological Models: Other gene regulatory networks
- Visualizations: Enhanced plotting and analysis
- Documentation: Improved explanations and examples
- Performance: Optimization and profiling
- Testing: Unit tests and validation suites
Foundational Biology
- Chickarmane et al. (2006) - "Transcriptional dynamics of the embryonic stem cell switch" - Computational modeling of PU.1-GATA-1 system
- Orkin & Zon (2008) - "Hematopoiesis: an evolving paradigm for stem cell biology" - Nature Reviews Genetics
- Enver et al. (2009) - "Stem cell states, fates, and the rules of attraction" - Cell Stem Cell
Computational Methods
- Raissi et al. (2019) - "Physics-informed neural networks: A deep learning framework for solving forward and inverse problems" - Journal of Computational Physics
- Hairer & Wanner (1996) - "Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems" - Springer
- Shampine & Gear (1979) - "A user's view of solving stiff ordinary differential equations" - SIAM Review
Systems Biology
- Alon (2006) - "An Introduction to Systems Biology: Design Principles of Biological Circuits" - CRC Press
- Davidson (2010) - "Emerging properties of animal gene regulatory networks" - Nature
- Elowitz & Leibler (2000) - "A synthetic oscillatory network of transcriptional regulators" - Nature
- ๐ Full Extended Report - Complete mathematical derivations
- ๐ SciPy ODE Documentation - Numerical solver details
- ๐ค PyTorch Tutorials - Neural network implementation
- ๐ Systems Biology Resources - Domain knowledge
This project is licensed under the MIT License - see the LICENSE file for details.
If you use this work in your research, please cite:
@software{stem_cell_pinns_2024,
title={Stem Cell Differentiation: Numerical and Machine Learning Approaches},
author={[Your Name]},
year={2024},
url={https://github.com/SiefEldinSameh/stem-cell-pinns-project},
note={Computational modeling of PU.1-GATA-1 toggle switch}
}Built upon decades of research in systems biology and hematopoietic development
Powered by the scientific Python ecosystem and PyTorch framework
Inspired by principles of reproducible research and collaborative science
|
|
|
|
This project bridges computational biology, numerical analysis, and machine learning to understand fundamental processes in stem cell biology. We hope it serves as both a research tool and educational resource for the scientific community.
โญ Star this repository if you find it useful for your research or learning!








