MAFFT version 7
Multiple alignment program for amino acid or nucleotide sequences
Supported in versions ≥6.8
% mafft --thread -1 input > output
% mafft --thread n input > output
% mafft --thread n --globalpair (other options) input > output
n = the number of threads.
If unsure, try --thread -1,
which uses a largely appropriate number of threads in each step, after
automatically counting the number of physical cores the computer has.
Windows versions experimentally support multithreading since version 7.184 (2014/Sep).
Without the --thread option, only a single thread is used.
Separately specifying the number of threads for each calculation stage Updated (2017/Jul)
% mafft --thread n --threadtb m --threadit p --globalpair (other options) input > output
- --thread: For all-to-all pairwise comparison, the number of threads specified with the --thread option are used.
The wall-clock time for this stage linearly decreases with the number of threads.
- --threadtb: For progressive alignment stage, the efficiency is not high (requiring large RAM) when using a large number (≫20) of threads.
For iterative refinement stage, too, the efficiency is not high when using a large number (≫20) of threads.
The number of threads in this stage is automatically restricted but can be increased or decreased by --threadit.
The iterative refinement step can return different results for different runs, when using mutitple threads.
To obtain the same result for every run, add the --threadit 0 flag, which disables multithreading only for iterative refinement step. (added 2020/Dec)
- Versions <7.340: The number of threads in this stage can be specifically set with the --threadtb option.
- Versions ≥7.340: The number of threads in this stage is automatically restricted to 10 but can be increased or decreased with --threadtb.
When using many threads for the progressive alignment stage, memory shortage error can occur.
So ts's better to unset this flag in most cases.