A web-based tool for visualizing sequence alignment algorithms (Needleman-Wunsch and Smith-Waterman).
- Global Alignment (Needleman-Wunsch algorithm)
- Local Alignment (Smith-Waterman algorithm)
- Interactive web interface
- Matrix visualization with traceback path highlighting
- Alignment score calculation
- Python 3.x
- Flask
# Create and enter toolbox
toolbox create bioinformatics
toolbox enter bioinformatics
# Install Flask
sudo dnf install python3-flask
# Navigate to project directory
cd /var/home/merdan/Desktop/bioinformatics/bioinformatics-allignment-visualizer
# Run the application
python3 app.py# Install dependencies
pip install -r requirements.txt
# Run the application
python3 app.py-
Start the application:
python3 app.py
-
Open your web browser and navigate to:
http://127.0.0.1:5000 -
Enter your sequences in the input fields
-
Select the alignment algorithm:
- Global (Needleman-Wunsch): Aligns entire sequences
- Local (Smith-Waterman): Finds best local alignment
-
Click Calculate Alignment to see results
bioinformatics-allignment-visualizer/
├── app.py # Application entry point
├── requirements.txt # Python dependencies
├── test_alignment.py # Test script for core algorithms
├── core/ # Core alignment algorithms
│ ├── __init__.py
│ ├── alignment_global.py # Needleman-Wunsch implementation
│ ├── alignment_local.py # Smith-Waterman implementation
│ └── scoring.py # Scoring functions
├── gui/ # Web interface
│ ├── __init__.py
│ ├── web_server.py # Flask server
│ └── templates/
│ └── index.html # Web UI
└── utils/ # Utility functions
├── __init__.py
└── matrix_ops.py
Run the test suite to verify core algorithms:
python3 test_alignment.py- Aligns complete sequences from end to end
- Optimal for sequences of similar length
- Uses dynamic programming to find optimal global alignment
- Finds best matching subsequences
- Optimal for finding conserved regions
- Uses dynamic programming with 0 as minimum score
Default scoring parameters:
- Match: +1
- Mismatch: -1
- Gap: -2
These can be modified in core/scoring.py.