ailixir-drug-repurposing / QUICK_START.md
AILIXIR Bot
Auto-sync: ea9a2035cd92f6b1521e3c5f9d31e8c453a93d43
4a8b134
|
Raw
History Blame Contribute Delete
2.89 kB

🧬 Drug Repurposing API - QUICK REFERENCE

πŸš€ Get Started in 60 Seconds

# 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:

{
  "disease_name": "Type 2 Diabetes",
  "min_score": 0.5,
  "top_n_targets": 10,
  "known_drugs": ["Metformin"]
}

Response:

{
  "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

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 βœ