Skip to content

Coda-Research-Group/alphafind-annotator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AlphaFind Annotator

License: MIT Python React TypeScript Docker Kubernetes

AlphaFind Annotator: A protein structure annotation application for GROMACS molecular dynamics files.

AlphaFind Annotator is a full-stack web application that enables researchers to upload GROMACS topology files (TPR/GRO) and automatically identify proteins through dual analysis approaches: structural similarity via AlphaFind and sequence similarity via BLAST.

πŸ”¬ Features

  • 🧬 Dual Analysis Engine: Combines structural (AlphaFind) and sequence (BLAST) similarity analysis
  • πŸ“ Format Support: TPR file format with automatic conversion
  • 🌐 Modern Web Interface: React TypeScript frontend with responsive Bootstrap UI
  • πŸ”„ RESTful API: Comprehensive REST API for automation and integration
  • πŸš€ Production Ready: Docker and Kubernetes deployment configurations
  • πŸ“Š Rich Results: Detailed protein matches with UniProt integration and 3D visualization
  • πŸ”’ Secure: Built-in file validation, rate limiting, and automatic cleanup
  • πŸ“± Mobile Friendly: Responsive design that works on all devices

πŸ—οΈ Architecture

graph TB
    subgraph "User Interface"
        UI[React Frontend<br/>TypeScript + Bootstrap]
        UPLOAD[File Upload<br/>TPR/GRO/PDB]
    end
    
    subgraph "API Layer"
        API[Flask REST API<br/>Python Backend]
        CONV[File Conversion<br/>GROMACS gmx]
        CACHE[File Cache<br/>UUID-based]
    end
    
    subgraph "Analysis Engines"
        AF[AlphaFind API<br/>Structural Similarity]
        BLAST[BLAST<br/>Sequence Similarity]
        BIO[BioPython<br/>Structure Processing]
    end
    
    subgraph "External Services"
        UNIPROT[UniProt Database<br/>Protein Information]
        ALPHAFIND[AlphaFind Database<br/>3D Structures]
        MOL[Mol* Viewer<br/>3D Visualization]
    end
    
    UI --> UPLOAD
    UPLOAD --> API
    API --> CONV
    API --> CACHE
    CONV --> BIO
    BIO --> AF
    BIO --> BLAST
    AF --> ALPHAFIND
    BLAST --> UNIPROT
    API --> UI
    UI --> MOL
Loading

πŸ”„ Workflow

sequenceDiagram
    participant User
    participant Frontend
    participant API
    participant GROMACS
    participant AlphaFind
    participant BLAST
    participant UniProt
    
    User->>Frontend: Upload TPR/GRO file
    Frontend->>API: POST /api/annotate
    API->>GROMACS: Convert to PDB
    GROMACS-->>API: PDB structure
    
    par Structural Analysis
        API->>AlphaFind: Search similar structures
        AlphaFind-->>API: TM-scores, alignments
    and Sequence Analysis
        API->>BLAST: Search similar sequences
        BLAST->>UniProt: Query protein database
        UniProt-->>BLAST: Protein matches
        BLAST-->>API: Identity scores, alignments
    end
    
    API-->>Frontend: Combined results
    Frontend-->>User: Display ranked proteins
    User->>Frontend: Download PDB/annotations
Loading

πŸ“‹ Prerequisites

  • Python 3.6+ with pip
  • Node.js 16+ with npm (for frontend development)
  • GROMACS installed and gmx command available in PATH
  • Docker (optional, for containerized deployment)
  • Kubernetes (optional, for production deployment)

πŸš€ Quick Start

Option 1: Docker Compose (Recommended)

# Clone the repository
git clone https://github.com/your-org/alphafind-annotator.git
cd alphafind-annotator

# Start all services
docker-compose up -d

# Access the application
open http://localhost:3000

Option 2: Manual Setup

  1. Backend Setup:
cd api
pip install -r api/requirements.txt
cp config.env.template config.env
# Edit config.env with your settings
python api/simple_app.py
  1. Frontend Setup:
cd ui
npm install
npm start
  1. Access the application at http://localhost:3000

πŸ“ Project Structure

alphafind-annotator/
β”œβ”€β”€ api/                    # Backend API (Python Flask)
β”‚   β”œβ”€β”€ api/               # Core API modules
β”‚   β”œβ”€β”€ k8s/              # Backend Kubernetes manifests
β”‚   β”œβ”€β”€ manifests/        # Additional deployment configs
β”‚   └── data/             # Sample data and uploads
β”œβ”€β”€ ui/                    # Frontend (React TypeScript)
β”‚   β”œβ”€β”€ src/              # Source code
β”‚   β”œβ”€β”€ public/           # Static assets
β”‚   └── k8s/              # Frontend Kubernetes manifests
β”œβ”€β”€ docs/                  # Documentation
└── deployment/           # Deployment configurations

πŸ› οΈ Development

See CONTRIBUTING.md for detailed development setup and guidelines.

Backend Development

cd api
pip install -r api/requirements.txt
python api/simple_app.py

Frontend Development

cd ui
npm install
npm start

🚒 Production Deployment

Docker Deployment

# Build images
docker build -f api/k8s/Dockerfile -t alphafind-annotator-api:latest ./api
docker build -f ui/k8s/Dockerfile -t alphafind-annotator-ui:latest ./ui

# Run with docker-compose
docker-compose -f docker-compose.prod.yml up -d

Kubernetes Deployment

See DEPLOYMENT.md for comprehensive Kubernetes deployment guide.

# Deploy backend
kubectl apply -k api/k8s/

# Deploy frontend
kubectl apply -k ui/k8s/

πŸ“š Documentation

πŸ”¬ Scientific Background

AlphaFind Annotator addresses the need for automated protein identification in molecular dynamics simulations. By combining:

  • Structural similarity analysis via AlphaFind's 3D structure database
  • Sequence similarity analysis via BLAST against UniProt
  • Automated file conversion from GROMACS formats to standard PDB

Researchers can quickly identify and annotate proteins in their simulation systems, facilitating hypothesis generation and validation in computational biology workflows.

🌐 Public Instance

A public instance is available at: https://alphafind-annotator.dyn.cloud.e-infra.cz/

πŸ“– Usage Examples

Web Interface

  1. Visit the application URL
  2. Upload your TPR/GRO file or use the example file
  3. Click "Run Annotation" and wait for processing
  4. Download results and view protein matches

API Usage

# Convert file to PDB
curl -X POST -F "file=@simulation.tpr" http://localhost:5000/api/convert

# Annotate with both structural and sequence analysis
curl -X POST -F "file=@simulation.tpr" "http://localhost:5000/api/annotate?limit=10"

# Sequence-only annotation
curl -X POST -F "file=@simulation.tpr" "http://localhost:5000/api/annotate-sequential?limit=5"

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • AlphaFind - For structural similarity search capabilities
  • BLAST/UniProt - For sequence similarity analysis
  • GROMACS - For molecular dynamics file format support
  • Mol* - For 3D structure visualization
  • React and Flask communities for excellent frameworks

πŸ“ž Support


Built with ❀️ for the computational biology community

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors