|
Download QUICK_START.md from RottenShadow/ailixir-drug-repurposing: direct link, hf CLI and curl.
- Browser
- Download file 2.89 kB
-
https://huggingface.co/spaces/RottenShadow/ailixir-drug-repurposing/resolve/main/QUICK_START.md
- Command line
-
hf download hf://spaces/RottenShadow/ailixir-drug-repurposing/QUICK_START.md
-
curl -L -o QUICK_START.md https://huggingface.co/spaces/RottenShadow/ailixir-drug-repurposing/resolve/main/QUICK_START.md
2.89 kB
| # 𧬠Drug Repurposing API - QUICK REFERENCE | |
| ## π Get Started in 60 Seconds | |
| ```bash | |
| # Windows | |
| start.bat | |
| # Linux/Mac | |
| chmod +x start.sh && ./start.sh | |
| ``` | |
| Wait for "β SETUP COMPLETE" message, then visit: **http://localhost:8000/docs** | |
| --- | |
| ## π― Main Endpoint | |
| ### POST `/api/v1/screen` | |
| **Request:** | |
| ```json | |
| { | |
| "disease_name": "Type 2 Diabetes", | |
| "min_score": 0.5, | |
| "top_n_targets": 10, | |
| "known_drugs": ["Metformin"] | |
| } | |
| ``` | |
| **Response:** | |
| ```json | |
| { | |
| "disease": "Type 2 Diabetes", | |
| "total_targets": 10, | |
| "total_drugs": 200, | |
| "total_predictions": 2000, | |
| "top_results": [ | |
| { | |
| "drug_name": "Drug_DB00838", | |
| "target_symbol": "GCK", | |
| "score": 0.92, | |
| "status": "β Known Treatment" | |
| } | |
| ], | |
| "success": true, | |
| "message": "β Screening completed in 45.23s" | |
| } | |
| ``` | |
| --- | |
| ## π Other Endpoints | |
| | Endpoint | Method | Purpose | | |
| |----------|--------|---------| | |
| | `/health` | GET | Check API status | | |
| | `/api/v1/model-status` | GET | Check AI model info | | |
| | `/api/v1/disease-targets` | POST | Get disease targets | | |
| | `/api/v1/protein-sequences` | POST | Get protein sequences | | |
| | `/api/v1/drug-library` | GET | Get drug library | | |
| --- | |
| ## π Check Status | |
| ```bash | |
| curl http://localhost:8000/health | |
| curl http://localhost:8000/api/v1/model-status | |
| ``` | |
| --- | |
| ## βοΈ Configuration | |
| Edit `app/config.py` to adjust: | |
| - `MAX_DRUGS_FOR_DEMO`: Number of drugs to screen | |
| - `MAX_TARGETS`: Number of disease targets | |
| - `BATCH_SIZE`: Optimization for GPU/CPU | |
| --- | |
| ## π Troubleshooting | |
| | Problem | Solution | | |
| |---------|----------| | |
| | API won't start | Ensure Python 3.10+ installed | | |
| | DeepPurpose missing | `pip install git+https://github.com/kexinhuang12345/DeepPurpose.git` | | |
| | GPU not detected | Install PyTorch CUDA: `pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121` | | |
| | Slow predictions | System uses CPU - GPU dramatically faster | | |
| | No API docs | Visit http://localhost:8000/docs | | |
| --- | |
| ## π Performance | |
| | Config | Speed | Throughput | | |
| |--------|-------|-----------| | |
| | GPU | ~5s | 1,200 pairs/sec | | |
| | CPU | ~30s | 67 pairs/sec | | |
| --- | |
| ## π Full Documentation | |
| - **PRODUCTION_GUIDE.md** - Complete guide | |
| - **IMPLEMENTATION_SUMMARY.md** - What was built | |
| - **http://localhost:8000/docs** - Interactive API docs | |
| --- | |
| ## π Pipeline Stages | |
| ``` | |
| Disease Input | |
| β | |
| [1] Disease β Targets (OpenTargets API) | |
| β | |
| [2] Targets β Sequences (UniProt API) | |
| β | |
| [3] Load Drug Library (TDC) | |
| β | |
| [4] AI Screening (DeepPurpose MPNN_CNN) | |
| β GPU CUDA acceleration | |
| β | |
| [5] Process Results | |
| β | |
| Ranked Drug Candidates | |
| ``` | |
| --- | |
| ## π§ Dependencies | |
| **Minimum**: Python 3.10, pip, 8GB RAM | |
| **Recommended**: GPU with CUDA 12.0+, 16GB RAM | |
| **Auto-installed by start scripts**: | |
| - FastAPI | |
| - PyTorch | |
| - DeepPurpose (AI model) | |
| - TDC (drug data) | |
| --- | |
| **Version**: 1.0.0 | **Status**: Production-Ready β | |