ClustalW

From Christoph's Personal Wiki
Revision as of 22:48, 28 December 2005 by Christoph (Talk | contribs) (Started article)

Jump to: navigation, search

ClustalW is multiple alignment programme for Unix and Linux (I am ignoring other operating systems in this article/tutorial). ClustalW is a major update and rewrite of the Clustal V program which was described in Higgins et al., 1992.

The main new features are a greatly improved (more sensitive) multiple alignment procedure for proteins and improved support for different file formats. This software was described in Thompson et al., 1994.

The usage of ClustalW is largely the same as for ClustalV. Details of the new alignment algorithms are described in the manuscript by Thompson et al., 1994.

Usage

Installation

  • Create a directory where you want to store the ClustalW executables and files. Extract files from archive downloaded into this directory. For an example (under your "home" directory),
mkdir Clustal
cd Clustal
mkdir ClustalW
  • Compile source files
make
  • Add binary path to environment. For example, in a bash console, edit the .bashrc file and add the following:
export PATH=/path/to/clustalw/binary:$PATH

Installation complete!

File input (sequences to be aligned)

The sequences must all be in one file (or two files for a "profile alignment") in ONE of the following formats:

  • FASTA (Pearson)
  • NBRF/PIR
  • EMBL/Swiss Prot
  • GDE
  • CLUSTAL
  • GCG/MSF
  • GCG9/RSF

The program tries to "guess" which format is being used and whether the sequences are nucleic acid (DNA/RNA) or amino acid (proteins). The format is recognised by the first characters in the file. This is kind of stupid/crude but works most of the time and it is difficult to do reliably, any other way.

First characters in a file recognised by ClustalW
Format First non-blank word or character in the file
FASTA >
NBRF >P1; or >D1;
EMBL/SWISS ID
GDE protein %
GDE nucleotide #
CLUSTAL CLUSTAL (blocked multiple alignments)
GCG/MSF PILEUP or !!AA_MULTIPLE_ALIGNMENT or !!NA_MULTIPLE_ALIGNMENT or MSF on the first line, and '..' at the end of line
GCG9/RSF !!RICH_SEQUENCE
source: ClustalW documentation by EMBL


DNA vs. Protein: the program will count the number of A, C, G, T, U, and N charcters. If 85% or more of the characters in a sequence are as above, then DNA/RNA is assumed, protein otherwise.

File output

The alignments

The alignment output format can be set to: CLUSTAL (a self explanatory blocked alignment). There are other outputs, however, I am only interested in the "CLUSTAL" output.

The trees

The Alignment Algorithms

Terminal gaps

Speed of the initial (pairwise) alignments (fast approximate/slow accurate)

Delaying alignment of distant sequences

Iterative realignment/Reset gaps between alignments

Profile alignment

Notes on "Bootstrapping"

When you use the BOOTSTRAP in ClustalW to estimate the reliability of parts of a tree, many of the uncorrected distances may randomly exceed the arbitrary cut off of 0.93 (sequences only 7% identical) if the sequences are distantly related. This will happen randomly i.e. even if none of the pairs of sequences are less than 7% identical, the bootstrap samples may contain pairs of sequences that do exceed this cut off. If this happens, you will be warned. In practice, this can happen with many data sets. It is not a serious problem if it happens rarely. If it does happen (you are warned when it happens and told how often the problem occurs), you should consider removing the most distantly related sequences and/or using the PHYLIP package instead.

A further problem arises in almost exactly the opposite situation: when you bootstrap a data set which contains 3 or more sequences that are identical or almost identical. Here, the sets of identical sequences should be shown as a multifurcation (several sequences joing at the same part of the tree). Because the Neighbor-Joining method only gives strictly dichotomous trees (never more than 2 sequences join at one time), this cannot be exactly represented. In practice, this is NOT a problem as there will be some internal branches of zero length seperating the sequences. If you display the tree with all branch lengths, you will still see a multifurcation. However, when you bootstrap the tree, only the branching orders are stored and counted. In the case of multifurcations, the exact branching order is arbitrary but the program will always get the same branching order, depending only on the input order of the sequences. In practice, this is only a problem in situations where you have a set of sequences where all of them are VERY similar. In this case, you can find very high support for some groupings which will disappear if you run the analysis with a different input order. Again, the PHYLIP package deals with this by offering a JUMBLE option to shuffle the input order of your sequences between each bootstrap sample.

Summary of the command line usage (very brief)

ClustalW is designed to be run interactively. However, all parameters can be set and run from the command line by giving options after the clustalw command. Options should be preceded by '-'.

If anything is put on the command line, the program will (attempt to) carry out whatever is requested and will exit. If you wish to use the command line to set some parameters and then go into interactive mode, use the command line switch: interactive. For an example:

clustalw -quicktree -interactive

This will set the default initial alignment mode to fast/approximate and will then go to the main menu.

To see a list of all the command line parameters, type:

clustalw -options

This will return a list with no explanation.

To get (very brief) help on command line usage, use the -help or -check options. Otherwise, the command line usage is self explanatory or is explained in clustalv.doc. The defaults for all parameters are set in the file param.h which can be changed easily (remember to recompile the program afterwards).

References

  • Thompson, J.D., Higgins, D.G. and Gibson, T.J. (1994) CLUSTAL W: improving the sensitivity of progressive multiple sequence alignment through sequence weighting, position specific gap penalties and weight matrix choice. Nucleic Acids Research, 22(22):4673-4680.
  • Higgins, D.G., Bleasby, A.J. and Fuchs, R. (1992) CLUSTAL V: improved software for multiple sequence alignment. Computer Applications in the Biosciences (CABIOS), 8(2):189-191.