Pairwise Sequence Aligner
The Learnbin Lab Pairwise Aligner is a high-performance bioinformatics utility designed to compare two nucleic acid sequences (DNA or RNA) to identify regions of similarity. Unlike server-based tools that require queuing, this tool runs entirely in your browser using optimized Client-Side JavaScript, ensuring instant results and complete data privacy.
1. Biological Theory: Global vs. Local Alignment
Alignment algorithms maximize a "Score" based on matches, mismatches, and gaps. This tool supports the two fundamental strategies of sequence comparison:
- Global Alignment (Needleman-Wunsch): Forces the entirety of Sequence A to align with Sequence B. This is ideal for comparing homologous genes, checking cloned plasmids, or identifying mutations (SNPs) between two versions of the same sequence.
- Local Alignment (Smith-Waterman): Searches for the best matching substring within the sequences, ignoring the rest. This is essential for finding motifs, primers, or conserved domains within highly divergent sequences.
2. Key Features & Visualizations
- Interactive Dot Plot: A graphical "Homology Map" that visualizes repeats, insertions, and deletions instantly. Perfect for detecting complex structural variations that text alignment might miss.
- Exact Matrix Calculation: For standard sequences (genes, PCR products), the tool uses exact Dynamic Programming matrices to guarantee mathematically optimal alignments.
- Hybrid Architecture: To handle large files without crashing your browser, the tool automatically switches modes:
- < 20kb: Full interactive text alignment and visualization.
- 20kb - 2MB: "Banded" heuristic mode (Text available via Download).
- > 2MB: High-performance "Dot Plot Only" mode for viral genomes or large contigs.
3. Understanding the Output
The tool provides three key metrics to quantify the relationship between your sequences:
- Score: The raw calculated value based on your parameters (Match +1, Mismatch -1, Gap -2). Higher is better.
- Identity (%): The percentage of positions that are identical matches. High identity (>95%) usually indicates the sequences are the same or closely related.
- Gaps: The total number of insertions or deletions required to align the sequences. A high gap count often indicates sequencing errors or evolutionary divergence.