Multiple Sequence Alignment

Align sequences given in a multi-fasta file

Before constructing phylogenetic (evolutionary) trees, sequences need to re-arranged to match best to each other, for example, by inserting gaps. There exits several tools for sequence alignment including MAFFT and MUSCLE.

If you have more than 200 sequences, try → PASTA or → UPP. If your sequences are fragmented, try → UPP.

For short read alignment, see → bowtie2 or → BWA


Download and Install

sudo apt-get update

sudo apt-get install mafft

Run mafft

mafft --localpair --maxiterate 1000 sequences.fasta > aligned_sequences.aln

--maxiterate 1000 for less than 200 sequences

--globalpair (instaed of --localpair) for sequences of similar lengths

MAFFT online web-tool


MUltiple Sequence Comparison by Log-Expectation

Download and install on Ubuntu


tar -zxvf muscle3.8.31_i86linux64.tar.gz

mv muscle3.8.31_i86linux64 muscle

mv muscle tools/ # move to your tools/ directory

Run muscle

muscle -in sequences.fasta -out aligned_sequences.aln

Muscle online web-tool

Clustal Omega

protein sequence alignment tool

Install on Ubuntu

sudo apt-get update

sudo apt-get install clustalo

Example (command line)

clustalo -i sequences.fasta -o aligned_sequences.fasta --auto -v

--auto set alignment options automatically

-v print "verbose" progress info

# see more options

clustalo --help

Clustal Omega online web-tool (max 4000 sequences)


See also:

→ EMBL-EBI list of Multiple Sequence Alignment tools

→ Alignment viewer