Spaces:
Sleeping
Sleeping
BioFlow - AI-Powered Drug Discovery Platform
BioFlow is a unified AI platform for drug discovery, combining molecular encoding, protein analysis, and drug-target interaction prediction in a modern web interface.
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Next.js Frontend β
β (React 19 + Tailwind) β
β localhost:3000 β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β HTTP/REST
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FastAPI Backend β
β localhost:8000 β
β ββββββββββββββββ βββββββββββββββ ββββββββββββββββββββ β
β β ModelService β βQdrantServiceβ β DTI Predictor β β
β β (Encoders) β β (VectorDB) β β (DeepPurpose) β β
β ββββββββββββββββ βββββββββββββββ ββββββββββββββββββββ β
βββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OpenBioMed Core β
β ββββββββββββββ ββββββββββββββ βββββββββββββββββββββββ β
β β Models β β Datasets β β Tasks β β
β β BioT5,ESM β β DAVIS,KIBA β β Property Prediction β β
β ββββββββββββββ ββββββββββββββ βββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Quick Start
Prerequisites
- Python 3.10+
- Node.js 18+ with pnpm
- (Optional) CUDA-compatible GPU
Installation
# Clone the repository
git clone https://github.com/hamzasammoud11-dotcom/lacoste001.git
cd lacoste001
# Install Python dependencies
pip install -r bioflow/api/requirements.txt
# Install frontend dependencies
cd lacoste001/ui
pnpm install
cd ../..
Running
Option 1: Using the launch script (Windows)
launch_bioflow_full.bat
Option 2: Manual start
# Terminal 1: Start FastAPI backend
python -m uvicorn bioflow.api.server:app --reload --port 8000
# Terminal 2: Start Next.js frontend
cd lacoste001/ui
pnpm dev
Access
- Frontend: http://localhost:3000
- API Docs: http://localhost:8000/docs
- API Health: http://localhost:8000/health
π Project Structure
OpenBioMed/
βββ bioflow/ # BioFlow Platform
β βββ api/ # FastAPI Backend
β β βββ server.py # Main API server
β β βββ model_service.py # Unified model access
β β βββ qdrant_service.py # Vector database
β β βββ dti_predictor.py # DTI prediction
β βββ core/ # Core abstractions
β βββ plugins/ # Encoders & retrievers
β βββ workflows/ # Pipeline definitions
β
βββ lacoste001/
β βββ ui/ # Next.js Frontend
β βββ app/
β β βββ api/ # API routes
β β βββ dashboard/ # UI pages
β βββ components/ # React components
β βββ lib/ # Services & utilities
β
βββ open_biomed/ # OpenBioMed Research Engine
β βββ models/ # BioT5, ESM, GraphMVP
β βββ datasets/ # Dataset loaders
β βββ tasks/ # Task implementations
β
βββ configs/ # YAML configurations
π API Endpoints
Discovery Pipeline
POST /api/discovery- Start discovery jobGET /api/discovery/{job_id}- Get job status
Predictions
POST /api/predict- DTI predictionPOST /api/encode- Encode molecule/protein/text
Data Management
POST /api/ingest- Add data to vector DBGET /api/molecules- List moleculesGET /api/proteins- List proteinsGET /api/collections- List vector collections
Visualization
GET /api/explorer/embeddings- Get 2D projectionsGET /api/similarity- Compute similarity scores
π§ͺ Features
Drug Discovery Pipeline
- Natural language, SMILES, or FASTA input
- Automatic modality detection
- Vector similarity search
- Property prediction (MW, LogP, TPSA)
- Binding affinity prediction
Molecular Analysis
- 2D/3D molecule visualization
- SMILES validation
- Property calculation via RDKit
Protein Analysis
- 3D protein structure viewing
- Sequence embedding
- DTI prediction
Explorer
- UMAP/t-SNE embedding visualization
- Cluster analysis
- Interactive filtering
π§ Configuration
Environment Variables
# .env file
NEXT_PUBLIC_API_URL=http://localhost:8000
QDRANT_URL=http://localhost:6333 # Optional: remote Qdrant
QDRANT_PATH=./qdrant_data # Local Qdrant storage
API Configuration
Edit lacoste001/ui/config/api.config.ts:
export const API_CONFIG = {
baseUrl: process.env.NEXT_PUBLIC_API_URL || "http://localhost:8000",
// ...
}
𧬠Model Support
| Model | Type | Use Case |
|---|---|---|
| ChemBERTa | Molecule Encoder | SMILES embeddings |
| ESM-2 | Protein Encoder | Sequence embeddings |
| PubMedBERT | Text Encoder | Biomedical text |
| DeepPurpose | DTI | Binding prediction |
| GraphMVP | Property | Molecular properties |
| BioT5 | Generation | Molecule generation |
π Development
Verify Installation
python scripts/verify_phase3.py
Run Tests
pytest tests/
Type Checking (Frontend)
cd lacoste001/ui
pnpm tsc --noEmit
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
π License
Apache 2.0 - See LICENSE
π Acknowledgments
- OpenBioMed - Foundation models
- DeepPurpose - DTI prediction
- Qdrant - Vector database
- Next.js - React framework
- Shadcn/ui - UI components