Choosing a strategy¶
MAFFT's strategy choice trades speed against accuracy. The right pick depends on (i) how many sequences you have, (ii) how diverged they are, and (iii) whether you suspect large insertions or alignable regions embedded in unrelated flanks.
Quick decision table¶
| Sequences | Divergence | Insertions / unalignable flanks | Strategy | CLI flag |
|---|---|---|---|---|
| any | any | no | FFT-NS-2 (default) | (none — default) |
| many, fast iter | any | no | FFT-NS-i | --maxiterate 1000 |
| < 200 | any | no | L-INS-i | --localpair --maxiterate 1000 |
| < 200 | similar lengths | no | G-INS-i | --globalpair --maxiterate 1000 |
| < 200 | mixed | yes | E-INS-i | --genafpair --maxiterate 1000 |
| 10 000+ | any | no | PartTree | --parttree |
Cheat sheet¶
use mafft::AlignmentMode;
// Default
AlignmentMode::FftNs2
// Iterative refinement
AlignmentMode::FftNsi { iterations: 1000 }
// Most accurate (< 200 seqs)
AlignmentMode::LInsi { iterations: 1000 } // local pair
AlignmentMode::GInsi { iterations: 1000 } // global pair
AlignmentMode::EInsi { iterations: 1000 } // generalized affine
Pragmatic guidance¶
- You don't know which to pick → start with FFT-NS-2. It's the default for a reason; on most inputs it's within 1–2 SP-score points of the iterative methods.
- You have time and < 200 sequences → run L-INS-i. Highest average accuracy on BAliBASE.
- Your sequences clearly differ in length but the alignable region is obvious → L-INS-i (local pairwise reduces noise from flanks).
- You have 10 000+ sequences → PartTree is the only practical
option;
O(N log N)distance estimation instead ofO(N²).
The MAFFT official docs go into more depth on the algorithmic differences. rust-MAFFT is byte-identical to the C reference for every strategy listed above, so guidance written for upstream MAFFT applies verbatim here.