A web-based interface for running Multiple Sequence Alignment (MSA) using A-Star and PA-Star algorithms.
This Flask application provides a user-friendly web interface for executing Multiple Sequence Alignment using optimized A-Star and Parallel A-Star (PA-Star) algorithms. It supports various benchmark sequence datasets and provides tools for managing sequences, binaries, and alignment results.
- Multiple Algorithm Support: Run MSA using A-Star or PA-Star implementations
- Benchmark Datasets: Built-in support for BALIBASE, Benchmark, NUC, and PAM250 sequence datasets
- Binary Management: Easy selection and management of different algorithm binaries
- Sequence Management: Browse and select FASTA sequences from organized datasets
- Results Tracking: View and manage alignment execution results
- Parallel Processing: Support for multi-threaded execution with configurable thread count
- Cost Matrix Options: Support for different substitution matrices (PAM250, etc.)
- Web Interface: Clean, intuitive web UI for all operations
msa_app/
βββ app.py # Application entry point
βββ requirements.txt # Python dependencies
βββ app/
β βββ __init__.py # Flask app factory
β βββ config.py # Configuration settings
β βββ routes/ # API routes
β β βββ binaries.py # Binary management endpoints
β β βββ results.py # Results viewing endpoints
β β βββ run.py # Alignment execution endpoints
β β βββ sequences.py # Sequence browsing endpoints
β βββ services/ # Business logic
β β βββ binaries_service.py
β β βββ results_service.py
β β βββ runner_service.py
β β βββ sequences_service.py
β βββ static/ # CSS and static assets
β β βββ style.css
β βββ templates/ # HTML templates
β β βββ index.html
β βββ utils/ # Utility functions
β βββ fasta.py # FASTA file parsing
β βββ filesystem.py # File system operations
β βββ security.py # Security utilities
βββ bin/ # Algorithm binaries (not in repo)
βββ seqs/ # Sequence datasets (not in repo)
β βββ Balibase/
β βββ Benchmark/
β βββ NUC/
β βββ PROT/
βββ results/ # Alignment results (generated)
- Python 3.10+
- Flask
- Werkzeug
-
Clone the repository
git clone https://github.com/vncsmnl/msa_app cd msa_app -
Create a virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up directories
Create the following directories if they don't exist:
mkdir bin seqs results
-
Add algorithm binaries
Place your A-Star and PA-Star executable binaries in the
bin/directory. -
Structure
seqs/Benchmark/- Benchmark test sequencesseqs/Balibase/- BAliBASE benchmark suiteseqs/NUC/- Nucleotide sequences (DNA/RNA)seqs/PAM/- Protein sequences organized by length
These sequences are used for:
- Testing the MSA algorithms
- Benchmarking performance
- Validating alignment quality
- BAliBASE: Benchmark Alignment Database
-
Start the server
python app.py
-
Access the application
Open your browser and navigate to:
http://localhost:5000 -
Run an alignment
- Select an algorithm (A-Star or PA-Star)
- Choose a binary version
- Browse and select a FASTA sequence file
- Configure parameters (cost type, thread count)
- Click "Run" to execute the alignment
-
View results
Results are automatically saved and can be viewed through the results interface.
GET /api/sequences/sources- List available sequence sourcesGET /api/sequences/<source>- Browse sequences in a sourceGET /api/sequences/<source>/file- Get sequence file content
GET /api/binaries- List available algorithm binaries
POST /api/run- Execute MSA alignment- Parameters: algorithm, binary_name, file_path, cost_type, num_threads, verbose
GET /api/results- List all alignment resultsGET /api/results/<result_id>- Get specific result details
Edit app/config.py to customize:
- Directory paths
- Sequence sources
- Server settings
- Secret key
MIT License
- The application runs with debug mode enabled by default
- Default server port is 5000
- Results are stored locally in the
results/directory - Execution timeout is set to 10 minutes per alignment