Workshop on Molecular Evolution  
Centers for Disease Control and Prevention
HomePeopleScheduleSoftwareResources

Software
AWTY
BEAST
BEAUti
Clustal W
Clustal X
FigTree
GARLI
MAFFT
Modeltest
MrBayes
NCBI Resources
PAUP*
ReadSeq
SeaView
Search


MAFFT

MAFFT (Multiple Alignment with Fast Fourier Transform) is a multiple sequence alignment program. MAFFT implements the Fast Fourier Transform (FFT) to optimize protein alignments based on physical properties of the amino acids (Katoh et al., 2002; 2005). The program uses progressive alignment followed by refinement, also known as iterative alignment. Multiple progressive alignments lessens reliance on the initial guide tree. Both nucleotide or amino acid sequences in FASTA format can be aligned. MAFFT is useful for hard-to-align sequences such as those containing large gaps (e.g., rRNA sequences containing variable loop regions).

Version 6.240

Input data file format

FASTA

Instructions

At the command prompt of the terminal window, type:

mafft

MAFFT will ask you for an input file, which must be in FASTA format. You can use your own FASTA file, or use this coding DNA dataset (view, download) or this amino acid dataset (view, download). Additional unaligned nucleotide and amino acid sequences in FASTA format are available.

Type the name of the output file. By default, MAFFT outputs the file in FASTA format. For example, you can type:

output1.fasta

The program will ask you several questions, such as the number of trees to rebuild, the number of iterations, scoring matrix, gap cost penalties, etc. Hit the return key to keep the default setting for any of the questions. Make sure to change the number of iterations from 0 to any positive number when running the iterative alignment.

The default setting in MAFFT is a progressive FFT alignment with two tree-building cycles (FFT-NS-2). A quick way to generate an alignment keeping all default settings is:

mafft input.fasta output.fasta

For a list of other parameters you can type:

mafft help

For those adventurous folks that want to try to get mafft to run as an external alignment program from Seaview on Windows, here are some instructions.

  1. Make sure you have installed Cygwin and MAFFT as described here: tutorial.
  2. This process should put mafft on your $PATH, but if for some reason it doesn't, you could do this manually by, for example modifying your ~/.bashrc and adding the following line: export PATH=$PATH:/usr/local/bin
  3. Then, find your seaview.ini file -- you'll find it in the same directory as your Seaview program, or you can use the sample configuration file we're providing. If you use ours, replace the lines in it that start like "msa_*_10..." with the following two lines:
    msa_name_10=C:\CygWin\bin\bash.exe
    msa_args_10=--login -i mafft --auto %f.pir > %f.out
    Then change the "10" to a different number (for example, if you already have 4 alignment options, you're adding a fifth, so change the 10 to a 5 in both cases and also change the first line in the file, "msa_algo_count=5"
  4. Then, back in the Seaview menu, choose the alignment option that looks like "... bash.exe", which will call mafft --auto on your data file. If you want to call a different alignment program with this method (linsi, einsi, etc), or change the arguments to the program, just modify the configuration file by hand instead of using the Seaview menus.
  5. If all goes well this approach should now be working like any other alignment option.
.......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... .......... ..........

Maintained by Adam Bazinet
Direct questions and comments to Michael Cummings