MUSCLE-JS - Multiple Sequence Alignment

Pairwise (Needleman–Wunsch/Smith–Waterman) or progressive multiple sequence alignment uses a compact JavaScript implementation inspired by MUSCLE (MUltiple Sequence Comparison by Log-Expectation), focusing on core alignment mechanics and visualisation. The code includes functionality for automatically checking and correcting the orientation of DNA/RNA sequences. This is particularly important when working with sequenced data, where sequences may be in either the forward or reverse complementary orientation.

Processed locally in your browser
FASTA input
Paste sequences below or load an example.
Alignment Parameters
Quick start
1) Upload or paste FASTA  →  2) Set alignment type and gap penalties  →  3) Click Generate  →  4) Choose Visual, FASTA, or CLUSTAL output.
Recommended: Auto for routine use

  • FASTA headers start with >. Each header begins a new sequence record.
  • Use standard one-letter alphabets (DNA/RNA or protein). Remove spaces, numbers, and unusual symbols when possible.
  • Auto mode selects pairwise alignment for 1–2 sequences and multiple sequence alignment for 3+ sequences.
  • The badge near “FASTA input” updates as sequences are detected.

  • Gap open penalizes starting a gap; gap extend penalizes extending an existing gap.
  • Penalties are typically negative numbers (e.g., -10 open, -1 extend). More negative values generally produce fewer/shorter gaps.
  • Global aligns end-to-end (Needleman–Wunsch). Local finds best matching subregions (Smith–Waterman).

  • Visual shows colored residues and a simple conservation line (* for fully conserved non-gap positions, . otherwise).
  • FASTA and CLUSTAL provide plain text exports suitable for downstream tools.
  • Use “Output block width” to control line wrapping for readability.

  • Privacy: alignments run locally in JavaScript; sequences are not sent to a server by this page.
  • Limitations: this is a compact, educational implementation inspired by MUSCLE; results may differ from full MUSCLE builds and other aligners.
  • If you see unexpected output, try: (i) switching output format, (ii) simplifying characters in the input, or (iii) using different gap penalties.
Export: Click inside the output panel → Select all (Ctrl+A) → Copy (Ctrl+C) → Paste into your editor (Ctrl+V).