Project Overview

A Python implementation of the global sequence-alignment algorithm that optimises DNA / protein alignments with dynamic programming. It supports custom scoring matrices (e.g. BLOSUM 62) or simple match/mismatch schemes, calculates detailed statistics, and exports publication-ready alignments.

Key Features

Dynamic Programming Core

O(mn) time/space Needleman-Wunsch matrix with traceback.

Custom Scoring Matrices

Imports any text-matrix (BLOSUM, PAM, DNA identity) or simple match/mismatch values.

Rich Output

Alignment blocks wrapped at 80 chars, plus score, matches, mismatches, gaps & similarity %.

Tech & Tools

Sample Output

GATTACA-CTG
||| | |  |
GA-T-CAACTG

Score: 23 Matches: 7 Mismatches: 2 Gaps: 2 Similarity: 77.8%