Sequence alignment

Align two sequences, a gene family or a protein family online with Clustal Omega, MAFFT and MUSCLE5, then compare the alignments to see which columns you can trust.

What is sequence alignment?

Sequence alignment is a computational method for arranging two or more DNA, RNA or protein sequences in rows so that corresponding residues share a column. Where one sequence carries an insertion or deletion, the aligner opens a gap in the other. Align human and mouse β-globin and all 147 residues fall into register without a single gap: 118 positions are identical, an identity of 80%.

The arrangement comes from a score. A substitution matrix such as BLOSUM62 rewards likely exchanges, so isoleucine opposite leucine scores better than isoleucine opposite tryptophan, while gap penalties charge for opening and extending each gap. Dynamic programming then finds the best-scoring arrangement: the Needleman-Wunsch algorithm across full lengths, the Smith-Waterman algorithm for the single best local region. The globin figures here come from our own global alignments of UniProt sequences with BLOSUM62 and the EMBOSS Needle default gap penalties.

An alignment is a hypothesis about correspondence, not proof of shared ancestry. Human β-globin and myoglobin fold into the same globin structure, yet a global alignment of the two finds only about 25% identical positions. That sits inside the 20 to 35% "twilight zone" where identity alone no longer separates true relatives from chance matches, so structure or profile evidence has to carry the argument.

When to use sequence alignment

  • Find the positions where a variant, construct or ortholog differs from its reference.
  • Locate conserved residues and motifs across a protein or gene family.
  • Prepare an alignment for a phylogenetic tree, a profile search or a consensus sequence.
  • Check whether a new sequence shares a domain with a characterized protein.

Strengths and limitations

Alignment is fast, needs nothing but sequences and produces a position-by-position record anyone can inspect. A column of identical residues across a family is often the first hint of a catalytic or binding site, and the same alignment feeds trees, profiles and structure prediction.

Every column is still an inference under one scoring scheme. Change the matrix, the gap penalties or the program and gaps can move, most often in loops, repeats and low-complexity regions. Fragments, reversed strands and a poorly chosen sequence set distort the result more than the choice of algorithm does, and similarity alone does not establish homology, function or evolutionary history.

Which sequence alignment tool to use

The right tool follows from two questions: how many sequences you have, and whether you want aligned sequences or only scores. Every tool below runs online from pasted FASTA or an uploaded file and shows its credit cost before it starts. A 1,000-residue MAFFT alignment costs 11 credits.

What you want to doToolWhat you get back
Align two sequences and see where the gaps fallMAFFTAligned sequences with the native run report
Align three or more protein, DNA or RNA sequencesClustal OmegaA multiple alignment, plus an optional guide tree and distance matrix
Measure how much an alignment depends on its guide treeMUSCLE5An ensemble of alternative alignments with column confidence
Score every pair in a set without aligning themStringZillaA matrix of Needleman-Wunsch, Smith-Waterman or edit-distance scores
Search your own sequence collection for homologsMMseqs2Hit tables with alignment coordinates, identity and E-values
Compare two genome assembliesMUMmer4Alignment coordinates, SNPs and indels
Align proteins by their 3D structuresUS-alignA structure-based residue alignment with TM-score and RMSD
Inspect an alignment you already haveMSA ViewerColor-coded columns, conservation and a consensus sequence

Clustal Omega is the usual first choice for a protein family and stays fast with thousands of sequences. MAFFT's L-INS-i mode is slower but more accurate when sequences share one conserved domain inside long unaligned flanks, and MAFFT can also add new sequences to an existing alignment without rebuilding it. When two programs disagree about a block, that block deserves less weight downstream.

Choosing a sequence alignment type

Alignment types answer different questions, and one comparison usually belongs to several of them at once. A protein comparison can be pairwise and global; a gene family is a multiple alignment of DNA.

Pairwise sequence alignment compares exactly two records, while multiple sequence alignment builds one shared column map across a set. Global alignment forces correspondence from end to end, which suits two full-length orthologs. Local alignment reports only the best matching stretch, so a 30-residue peptide can be matched inside a 500-residue protein without forcing 470 residues into gaps. Both are covered on the pairwise sequence alignment page.

Protein alignment scores amino acids with substitution matrices that reflect chemistry and evolution. DNA alignment needs consistent strand orientation and has only four letters, so chance matches are more common. Whole-genome alignment anchors on exact matches across millions of bases and reports rearrangements, and structure-based sequence alignment takes residue correspondence from superposed 3D structures when sequence identity is too low to trust.

How to run sequence alignment online

A good alignment depends more on the input set than on the program. These steps follow the featured workflow, which runs three aligners on the same sequences.

  1. Collect the sequences. Save them as one FASTA file with unique identifiers, one molecule type and, for DNA, a single strand orientation.
  2. Remove what does not belong. Drop duplicates, fragments much shorter than the rest and sequences with a different domain architecture, because a single outlier can pull gaps into every other row.
  3. Start from the default settings. Change the matrix, gap penalties or iteration strategy only for a stated reason, and record each change with the result.
  4. Run more than one aligner. The featured workflow sends the same FASTA to Clustal Omega, MAFFT and MUSCLE5 and keeps all three alignments.
  5. Compare the alignments. Blocks that every program places the same way are stable; columns that shift between programs, often in loops and termini, should be masked or treated with caution.
  6. Export the evidence. Keep the input FASTA, settings, every alignment and any masked columns, then pass the chosen alignment to a tree builder such as FastTree or to a profile search.

How to interpret sequence alignment results

Percent identity always needs a denominator. Our alignment of human β-globin and α-globin has 65 identical positions across 149 columns, which is 43.6% of the alignment but 45.8% of the 142-residue α chain. Programs differ in which length they divide by, so compare identities only when they were calculated the same way.

Raw alignment scores depend on the matrix, gap penalties and sequence length, so a score from one program cannot be compared with a score from another. Database search tools convert scores into E-values that account for the size of the search; an E-value of 1e-30 says a match is very unlikely to be chance, not that the two proteins share a function.

Gap placement is the least certain part of any alignment. Where an insertion sits in a variable loop, several positions are often equally good and different programs will choose differently. Treat those columns as uncertain before building a tree or transferring an annotation from one sequence to another.

How the featured workflow works

The hub workflow runs Clustal Omega, MAFFT, and MUSCLE5 from the same FASTA input so their native alignments can be compared.

  1. Define scope. Choose pairwise, multiple, global, local, genome, or structure-aware behavior.
  2. Curate sequences. Check type, orientation, boundaries, duplicates, fragments, and identifiers.
  3. Run three methods. Submit one FASTA set to Clustal Omega, MAFFT, and MUSCLE5.
  4. Compare columns. Review conserved blocks, gaps, outliers, and disagreement.
  5. Export evidence. Select a justified result and retain the alternatives.

Inputs and outputs for the featured workflow

Check formats before running, then inspect and download the result from every workflow step.

Inputs

Sequence evidence

FASTAPDBmmCIF

Protein, DNA, or RNA sequences and, for structure-based alignment, compatible structures.

Outputs

Alignment evidence

FASTAClustalCSVTSVPDB

Aligned sequences, score matrices, coordinates, structures, settings, and method-native files.

Frequently asked questions

AI answers from our docs. No sign-in needed.

Run your first analysis today

Start with 200 free credits and no installs. Upgrade when your project needs more compute.