- Iterative refinement is an important strategy used in multiple sequence alignment (MSA) to improve an initial alignment through repeated adjustments. Unlike traditional progressive alignment, which generally retains early alignment decisions, iterative refinement methods revisit parts of an existing alignment and attempt to improve the placement of residues and gaps. This approach is particularly useful when analysing diverse DNA, RNA, or protein sequences, where an initial alignment may contain errors or incorrectly positioned regions.
- The central principle of iterative refinement is that a multiple sequence alignment can often be improved by repeatedly modifying its structure. An algorithm begins with an initial alignment, evaluates its quality using a scoring function or consistency criterion, and then changes selected sequences, groups of sequences, or alignment regions. The revised alignment is compared with the previous version, and the process continues while improvements are possible or until a predefined stopping condition is reached.
- An initial alignment may be generated using progressive alignment, pairwise alignment information, sequence profiles, or another suitable strategy. The initial alignment provides a starting arrangement of corresponding positions across all sequences. However, the first alignment may not represent the best possible arrangement because of inaccurate guide trees, highly divergent sequences, insertions, deletions, or ambiguous regions. Iterative refinement attempts to correct some of these problems by reconsidering earlier decisions.
- One common approach is the divide-and-realign strategy. In this method, the algorithm divides the existing multiple sequence alignment into two groups of sequences. It removes the alignment relationship between the groups, realigns the two groups using sequence or profile information, and evaluates whether the new alignment is better than the original one. If the revised alignment improves the objective function, it is retained; otherwise, the previous alignment may be restored. The procedure can be repeated using different divisions of the sequences.
- For example, an alignment containing ten protein sequences may be divided into two groups of five sequences. Each group is represented by a profile that describes the amino acid distribution and gap patterns at each position. The two profiles are then aligned against one another. This allows the algorithm to reconsider the positions of entire groups rather than adjusting only individual sequences. Repeated group realignment can correct errors that were introduced during the initial progressive construction.
- Another strategy is sequence removal and realignment. In this approach, one sequence is temporarily removed from the multiple sequence alignment, leaving the remaining sequences as a profile. The removed sequence is then realigned against this profile. The algorithm evaluates whether the new placement improves the alignment score. This process can be repeated for each sequence, allowing individual sequences to be repositioned in relation to the rest of the dataset.
- Iterative refinement methods rely on an objective function to assess alignment quality. A common measure is the sum-of-pairs score, which evaluates the scores of residue pairs across alignment columns. Each pair is assessed using a substitution matrix or another scoring scheme, while gaps are penalized according to the selected gap-cost model. The scores are then combined to estimate the overall quality of the alignment. An algorithm may accept a new alignment when it increases the objective score.
- For protein alignments, substitution matrices such as BLOSUM and PAM are frequently used to score amino acid substitutions. For nucleotide alignments, scoring systems may assign values to matches, mismatches, and gaps. Gap penalties often include separate costs for opening and extending a gap. An affine gap model is commonly expressed as (G(k)=g_o+(k-1)g_e), where (g_o) represents the gap-opening penalty, (g_e) represents the gap-extension penalty, and (k) is the gap length. The exact convention and parameter values vary between software packages.
- The sum-of-pairs score is useful, but it is not a perfect measure of biological alignment accuracy. A high-scoring alignment does not necessarily represent the true evolutionary correspondence between residues. Different scoring functions may favour different gap placements, and a scoring function can be influenced by sequence composition, redundancy, and the evolutionary diversity of the dataset. Some methods therefore use additional information, such as consistency between pairwise alignments, sequence weighting, or structural evidence.
- Consistency-based refinement uses information from multiple pairwise alignments to support more reliable positional relationships. Instead of evaluating a residue pair only in the context of one alignment, consistency methods consider whether the same relationship is supported by other sequences and pairwise comparisons. This can help distinguish reliable alignment relationships from those that occur only because of an uncertain initial alignment. T-Coffee is a well-known example of a consistency-based alignment approach, although it should not be described simply as a conventional iterative refinement algorithm.
- Sequence weighting is another important consideration. Biological datasets often contain many closely related sequences and fewer distant relatives. If every sequence contributes equally, a large group of closely related sequences may dominate the alignment score. Weighting methods reduce this imbalance by assigning different contributions to sequences according to their similarity or evolutionary relationships. This can make conserved patterns more representative of the broader sequence family.
- Several widely used multiple sequence alignment programs incorporate iterative refinement or related optimization strategies. MUSCLE uses progressive alignment stages followed by refinement procedures that can improve the alignment. MAFFT offers different strategies, including methods that combine progressive construction with iterative refinement. Its L-INS-i strategy is particularly useful for relatively small datasets containing sequences with conserved local regions and potentially large unaligned regions. Clustal Omega is highly scalable and uses profile-based and clustering strategies, but it should not be treated as equivalent to every iterative refinement method. The specific algorithm used depends on the software and selected options.
- MUSCLE can be used to generate a multiple sequence alignment through its command-line interface. For example:
muscle -align protein_sequences.fasta \
-output aligned_proteins.afa
- The input file contains the unaligned protein sequences, and the output file contains the resulting alignment. MUSCLE versions have different command-line interfaces, so the installed version’s documentation should be checked before using options from older examples.
- MAFFT provides an iterative-refinement strategy through its L-INS-i method:
mafft –localpair –maxiterate 1000 \
protein_sequences.fasta > aligned_proteins.fasta
- The –localpair option uses local pairwise alignment information, while –maxiterate 1000 specifies the maximum number of iterative refinement cycles. This strategy can be computationally demanding and is generally more appropriate for datasets of manageable size than for extremely large collections of sequences.
- Another MAFFT strategy is G-INS-i, which uses global pairwise alignment information and iterative refinement. It can be useful when sequences are expected to be globally alignable across their full lengths:
mafft –globalpair –maxiterate 1000 \
protein_sequences.fasta > aligned_proteins.fasta
- The choice between local and global strategies should reflect the biological structure of the sequences. Local approaches may be preferable when sequences share conserved regions but contain substantial insertions, deletions, or variable regions. Global approaches are more appropriate when sequences are expected to be homologous and alignable across most of their lengths.
- Iterative refinement is useful in protein family analysis because protein sequences may contain conserved domains separated by variable regions. Initial alignments can incorrectly position gaps or conserved residues, particularly when the sequences have different lengths or contain insertions and deletions. Refinement can improve the correspondence of conserved amino acids and help identify functional motifs, catalytic residues, binding sites, and structurally important regions. Nevertheless, alignment alone cannot establish the function of a residue; experimental and structural evidence may also be required.
- In comparative genomics, iterative refinement can improve the alignment of related nucleotide sequences from different organisms. It can help identify conserved genes, regulatory regions, and evolutionary changes. For coding sequences, codon-aware alignment is particularly important because ordinary nucleotide alignment may introduce gaps that disrupt reading frames. Specialized tools such as MACSE can account for coding-sequence constraints and may be more suitable than general-purpose nucleotide alignment methods when frameshifts or stop codons need to be considered.
- For RNA sequences, sequence alignment may need to account for conserved secondary structures. Ordinary iterative refinement based only on nucleotide similarity does not necessarily preserve structural relationships. Structure-aware approaches, covariance models, and tools associated with resources such as Rfam may provide more suitable methods when RNA structure is central to the analysis.
- The quality of an iteratively refined alignment should be evaluated rather than assumed to be correct. Visual inspection can reveal misplaced gaps, inconsistent conserved residues, poorly aligned terminal regions, and suspiciously long insertions. Alignment viewers such as Jalview, AliView, and SeaView allow researchers to examine conservation patterns and individual alignment columns. Automated assessment tools such as GUIDANCE2 can estimate the reliability of alignment positions or sequences under alternative alignment conditions.
- Poorly aligned regions may sometimes be removed before downstream analysis using tools such as trimAl or Gblocks. However, trimming should be performed carefully because variable regions may contain genuine evolutionary information. Removing too many positions can reduce the amount of useful data and introduce bias into phylogenetic or comparative analyses. The decision to trim should depend on the research question and the reliability of the alignment.
- Iterative refinement has several advantages. It can correct some errors introduced during initial progressive alignment, reconsider the placement of gaps, improve conserved positional relationships, and make better use of information from the complete sequence dataset. It can be especially valuable for protein families containing sequences with moderate evolutionary divergence or complex patterns of insertions and deletions.
- However, iterative refinement also has limitations. It may require substantially more computation than a simple progressive alignment, particularly when many sequences or long sequences are involved. Some algorithms can become trapped in local optima, where no available refinement step improves the scoring function even though a better alignment may exist. Results also depend on the initial alignment, scoring system, gap penalties, sequence sampling, and refinement strategy. Repeated optimization cannot compensate fully for insufficient evolutionary information or fundamentally incorrect sequence comparisons.
- The distinction between alignment optimization and biological accuracy is important. An algorithm may produce a higher-scoring alignment without necessarily producing a more biologically correct one. Closely related sequences, duplicated domains, low-complexity regions, and compositional bias can all influence alignment results. Highly divergent sequences may require additional approaches, such as profile hidden Markov models, structure-guided alignment, domain-specific alignment, or careful examination of evolutionary relationships.
- Iterative refinement should also be distinguished from phylogenetic tree optimization. The refinement procedure improves the arrangement of residues and gaps in an alignment; it does not necessarily produce a reliable evolutionary tree. A phylogenetic analysis should be conducted separately using an appropriate evolutionary model and a carefully evaluated alignment. Errors in alignment can influence phylogenetic conclusions, particularly when the sequences are highly divergent or contain uncertain regions.
- For reproducible research, the original input sequences, initial and final alignments, software name, software version, command-line parameters, and any manual modifications should be recorded. Researchers should also report the alignment strategy used, including whether local or global pairwise information and iterative refinement were selected. If alignment columns are trimmed, the trimming method and settings should be documented. These details allow other researchers to reproduce the analysis and understand how the final alignment was obtained.
- Iterative refinement is therefore an important component of modern multiple sequence alignment. By repeatedly removing, realigning, and evaluating sequences or groups of sequences, it can improve alignments beyond the initial progressive construction. Its combination with profile-based scoring, consistency information, sequence weighting, and modern computational strategies makes it useful for protein family analysis, comparative genomics, functional motif identification, and evolutionary studies. Understanding its principles, advantages, and limitations helps researchers select appropriate alignment methods and interpret multiple sequence alignment results more reliably.