Skip to content

Commit b776d6d

Browse files
author
Qwen Code
committed
updated
1 parent e07a101 commit b776d6d

File tree

1 file changed

+25
-44
lines changed

1 file changed

+25
-44
lines changed

README.md

Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,48 @@
11
# DRIFT: Multi-Scale Stochastic Research Workbench
2-
32
[![CI](https://github.com/tomwolfe/DRIFT/actions/workflows/ci.yml/badge.svg)](https://github.com/tomwolfe/DRIFT/actions/workflows/ci.yml)
43
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
54
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
65
[![Coverage Status](https://coveralls.io/repos/github/tomwolfe/DRIFT/badge.svg?branch=main)](https://coveralls.io/github/tomwolfe/DRIFT?branch=main)
7-
86
![Sample Dashboard](assets/sample_output.png)
97

108
DRIFT (**D**rug-target **R**esponse **I**ntegrated **F**lux **T**rajectory) is a multi-scale stochastic framework designed to bridge the gap between molecular binding events and systemic metabolic phenotypes.
119

1210
## 🚀 Interactive Demo
13-
1411
Try DRIFT in your browser without any installation:
15-
1612
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/tomwolfe/DRIFT/blob/main/examples/quickstart_tutorial.ipynb)
1713
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/tomwolfe/DRIFT/main?filepath=examples%2Fquickstart_tutorial.ipynb)
1814

1915
## 📐 System Architecture
20-
2116
DRIFT integrates three distinct biological scales into a unified simulation loop:
22-
2317
```mermaid
2418
graph TD
25-
A[Drug Concentration] -->|Hill Equation| B(BindingEngine)
26-
B -->|Inhibition Factor| C(StochasticIntegrator)
27-
C -->|Langevin Dynamics| D{Signaling State}
28-
D -->|PI3K/AKT/mTOR| E(MetabolicBridge)
29-
E -->|Vmax Constraints| F(DFBASolver)
30-
F -->|FBA Optimization| G[Metabolic Fluxes & Growth]
31-
G -->|Feedback/Recording| H[History/Dashboard]
19+
A[Drug Concentration] -->|Hill Equation| B(BindingEngine)
20+
B -->|Inhibition Factor| C(StochasticIntegrator)
21+
C -->|Langevin Dynamics| D{Signaling State}
22+
D -->|PI3K/AKT/mTOR| E(MetabolicBridge)
23+
E -->|Vmax Constraints| F(DFBASolver)
24+
F -->|FBA Optimization| G[Metabolic Fluxes & Growth]
25+
G -->|Feedback/Recording| H[History/Dashboard]
3226
```
3327

3428
## ❓ Why DRIFT?
35-
3629
In drug discovery, linking a molecular binding event to a systemic outcome (like growth inhibition) is often treated as a "black box." DRIFT provides a transparent, mechanistic bridge by:
3730
1. **Capturing Temporal Dynamics:** Moving beyond static $IC_{50}$ values to see how responses evolve.
3831
2. **Accounting for Stochasticity:** Modeling the "drift" in metabolic states caused by intrinsic cellular noise.
3932
3. **Integrating Scales:** Coupling pharmacokinetics (Binding), pharmacodynamics (Signaling), and phenotype (Metabolism) in a single unified solver.
4033

4134
## 🌟 Key Features
42-
4335
- **Multi-Scale Integration:** Seamlessly couples molecular binding, stochastic signaling (SDEs), and dynamic flux balance analysis (dFBA). Supports both E. coli core and Human GEMs (e.g., Recon1).
4436
- **Stochastic Dynamics:** Captures cellular heterogeneity using a high-stability **Milstein scheme** integrator with state-dependent noise, accelerated by **Numba**.
4537
- **Global Sensitivity Analysis (GSA):** Identify critical drivers of metabolic drift by perturbing signaling parameters and binding affinity simultaneously.
4638
- **Monte Carlo Uncertainty:** Built-in support for ensemble simulations to assess model robustness and parameter sensitivity.
4739
- **Interoperability:** Export results to structured Parquet or JSON formats (aligning with SED-ML principles) for cross-platform research.
4840
- **Interactive Dashboards:** Generates comprehensive HTML reports using **Plotly** for deep-dive analysis of trajectories.
4941
- **Scientific Validation:** Benchmarked against known biological responses and numerical stability tests.
42+
- **Polypharmacology Support:** (v0.2.0) Explicitly model drugs targeting multiple proteins with distinct $K_d$ values.
5043

5144
## 📚 Documentation
52-
5345
Detailed documentation is available in the `docs/` directory:
54-
5546
| Document | Description |
5647
| --- | --- |
5748
| [**Case Study Gallery**](docs/gallery.md) | **New:** Predictions for Erlotinib, Imatinib, and more. |
@@ -64,32 +55,28 @@ Detailed documentation is available in the `docs/` directory:
6455
| [**Tool Comparison**](docs/comparison_tools.md) | How DRIFT compares to DeepPurpose, COBRApy, etc. |
6556

6657
## 🧪 Scientific Foundation
67-
6858
DRIFT's modeling approach is grounded in established systems biology literature:
69-
7059
- **Signaling Dynamics:** The PI3K/AKT/mTOR SDE model is inspired by the topology described in *Chen et al. (2009), "Input-output behavior of ErbB signaling pathways."*
7160
- **Metabolic Modeling:** Flux Balance Analysis (FBA) implementation follows the standard protocols in *Orth et al. (2010), "What is flux balance analysis?"*
7261
- **Multi-scale Coupling:** The integration of signaling and metabolism reflects recent advances in dynamic FBA as reviewed in *Reimers et al. (2021).*
7362

7463
## 🚀 Quick Start
7564

7665
### Installation
77-
7866
**Using Pip:**
7967
```bash
8068
pip install -e .
8169
```
8270

8371
**Solver Setup (Critical):**
8472
DRIFT relies on `cobrapy` and `optlang` for metabolic solving. While it handles missing solvers gracefully by falling back to GLPK (via `swiglpk`), we recommend:
85-
8673
1. **GLPK (Default):** Usually installed via `swiglpk`. If you encounter build errors on **M1/M2 Macs**:
87-
```bash
88-
brew install glpk
89-
export C_INCLUDE_PATH=/opt/homebrew/include
90-
export LIBRARY_PATH=/opt/homebrew/lib
91-
pip install swiglpk
92-
```
74+
```bash
75+
brew install glpk
76+
export C_INCLUDE_PATH=/opt/homebrew/include
77+
export LIBRARY_PATH=/opt/homebrew/lib
78+
pip install swiglpk
79+
```
9380
2. **CPLEX / Gurobi:** For large-scale models, these commercial solvers (free for academics) are significantly faster. Ensure they are in your Python environment's path.
9481

9582
**Using Conda:**
@@ -105,7 +92,6 @@ docker run -it drift
10592
```
10693

10794
## ⚡ Performance & Solver Guide
108-
10995
DRIFT is optimized for performance, but the overall speed of multi-scale simulations is often limited by the underlying Linear Programming (LP) solver.
11096

11197
| Model Scale | Recommended Solver | Rationale |
@@ -119,7 +105,6 @@ DRIFT is optimized for performance, but the overall speed of multi-scale simulat
119105
- **Worker Cache:** The `Workbench` automatically caches initialized models across Monte Carlo iterations to avoid the overhead of reloading genome-scale models.
120106

121107
### Basic Usage
122-
123108
Run a standard Monte Carlo simulation:
124109
```bash
125110
python main.py --mc-iterations 30 --sim-steps 100
@@ -136,11 +121,9 @@ python main.py --export-json outputs/results.json
136121
```
137122

138123
## 🧪 Development and Testing
139-
140124
```bash
141125
# Run the full test suite
142126
pytest tests/
143-
144127
# Run tests with coverage
145128
pytest tests/ --cov=drift --cov-report=html
146129
```
@@ -150,6 +133,7 @@ To generate a sample dashboard and verify the workbench visualization:
150133
```bash
151134
python scripts/generate_sample_dashboard.py
152135
```
136+
153137
Generated reports are saved in the `outputs/` directory (ignored by git).
154138

155139
### Current Test Coverage
@@ -159,30 +143,26 @@ Generated reports are saved in the `outputs/` directory (ignored by git).
159143
- **Visualization:** Dashboard generation and data integrity checks
160144

161145
## 📈 Example Results
162-
163146
Running a typical simulation produces:
164147
- Interactive HTML dashboard with multi-scale visualization
165148
- Quantitative summary of growth inhibition and metabolic drift
166149
- Statistical analysis of ensemble variability
167150
- Parameter sensitivity reports
168151

169152
## 🗺️ Project Roadmap
170-
171153
- [x] **v0.1.0:** Initial engine release & Monte Carlo integration.
172-
- [ ] **v0.2.0:** Support for multi-target inhibition (Polypharmacology).
154+
- [x] **v0.2.0:** Support for multi-target inhibition (Polypharmacology), strict validation, and enhanced export metadata.
173155
- [ ] **v0.3.0:** Integration with SBML models for custom signaling topologies.
174156
- [ ] **v1.0.0:** Stable release with full experimental dataset benchmarking.
175157

176158
## 🤝 Contributing
177-
178159
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on:
179160
- Setting up your development environment
180161
- Code style guidelines
181162
- Submitting pull requests
182163
- Reporting issues
183164

184165
## 📜 Citing DRIFT
185-
186166
If you use DRIFT in your research, please cite it as:
187167
> Wolfe, T. (2025). DRIFT: A Multi-Scale Stochastic Framework for Predicting Drug-Induced Metabolic Drift. GitHub Repository. https://github.com/tomwolfe/DRIFT
188168
@@ -194,17 +174,18 @@ If you use DRIFT in your research, please cite it as:
194174

195175
## 📋 Release Notes
196176

197-
**Latest Release (v0.1.2):**
198-
- **Numerical Stability:** Upgraded SDE integrator from Euler-Maruyama to a **Milstein scheme** with state-dependent noise for improved robustness in high-noise scenarios.
199-
- **Scientific Consistency:** Added explicit support and fallback mechanisms for human metabolic models (e.g., Recon1) and corresponding growth keys.
200-
- **Dependency Optimization:** Integrated `glpk` and `swiglpk` into environment configurations for seamless FBA solving.
177+
**Latest Release (v0.2.0):**
178+
- **Harden polypharmacology validation** with strict input validation for the `targets` dictionary.
179+
- **Parallel reproducibility fixes** for bit-perfect Monte Carlo simulations.
180+
- **Explicit 'solver_status' field** added to exported JSON results.
181+
- Enhanced `BindingEngine` to enforce strict validation of targets dictionary.
182+
- Fixed seed propagation to Numba-jitted functions in worker processes.
183+
- Improved export metadata with solver status information.
201184

202185
**Previous Release (v0.1.1):**
203186
- Initial public release
204187
- Multi-scale integration engine
205188
- Monte Carlo uncertainty quantification
206189
- Interactive visualization dashboard
207-
208-
## 🚀 Release Process
209-
210-
For information about creating new releases, see our [Release Process](RELEASE_PROCESS.md) documentation.
190+
- Dedicated `outputs/` directory for simulation results
191+
- Support for custom drift functions

0 commit comments

Comments
 (0)