SeqBench

Pairwise Sequence Alignment (Global & Local)

Align two sequences with Needleman-Wunsch or Smith-Waterman.

Align two DNA or protein sequences online with global (Needleman-Wunsch), local (Smith-Waterman) or semiglobal pairwise alignment. Semiglobal is a fitting alignment keyed to the boxes, not to length: Sequence B is consumed end to end while Sequence A's terminal overhangs are free, so put the read in Sequence B and the reference in Sequence A to place a partial read without smearing it across the reference. Set your own match, mismatch and affine gap scores, then read the score, percent identity, alignment length and gap count above a 60-column alignment with a match midline. Local and semiglobal runs also report the aligned coordinate range in each sequence, and the result copies out as FASTA.

▸Scoring: match 1 · mismatch -1 · gap open -3 · extend -2

Gaps are affine: every gap position costs the extend penalty and a gap's first position costs the open penalty on top, so score = match × identities + mismatch × mismatches + extend × gap positions + open × gap runs. Set open to 0 for a purely linear penalty.

Design, edit, and verify complete constructsSeqStudio combines sequence editing and annotation, plasmid maps, primer/cloning/CRISPR design, Sanger verification, and GenBank/SnapGene files in one workspace.

How to use the Pairwise Alignment tool

  1. 1Paste your two sequences into the Sequence A and Sequence B boxes — or press "Load example" for a pair that differs by one gap and two substitutions; each label shows that sequence's current length.
  2. 2Choose "Global (Needleman-Wunsch)", "Local (Smith-Waterman)" or "Semi-global (fitting: B into A)" from the Mode dropdown.
  3. 3Open the "Scoring" line to set the Match, Mismatch, Gap extend and Gap open fields; it shows the current values (defaults 1, -1, -2 and -3) without opening.
  4. 4Read the Score, Identity, Aln length and Gaps tiles, scan the alignment in 60-column blocks with its match midline, and click "Copy FASTA" to take the aligned pair away.

Frequently asked questions

What is the difference between global and local alignment?

Global (Needleman-Wunsch) aligns the sequences end to end. Local (Smith-Waterman) finds the best-matching subregion, which is better when only part of the sequences is similar.

Does it work for proteins?

Yes. Scoring is match/mismatch with affine gaps, and you set all four values yourself — match, mismatch, gap open and gap extend — so it works for DNA and protein alike, and you tune it to the divergence you expect rather than to a fixed substitution matrix such as BLOSUM.

How are gaps penalized?

Affinely, so one long gap is cheaper than several short ones. Gap extend is the per-position cost, charged for every position of a gap including its first, and Gap open is an extra one-off cost charged on that first position — with the form's defaults (-2 extend, -3 open) a k-base gap costs -2 x (k + 1.5). That is why the reported score is lower than multiplying the extend value by the gap count would suggest. Both are editable fields on the page and they are independent: set Gap open to 0 for a purely linear penalty, or raise Gap extend on its own and the 1.5x relationship between them no longer holds. Over the API, omitting gapOpen falls back to 1.5 x gap.

Is there a length limit?

Very long sequences are capped to keep the alignment responsive. Use shorter sequences if you hit the limit.

More